Skip to content

Commit

Permalink
fix(arm64-agent): Add dependencies for arm64 (#133)
Browse files Browse the repository at this point in the history
# Description

Add missing libraries required for `clang+llvm` to work in agent. Add
the missing libs in tools image.

Fixes - #130

# Testing Done

1. Built `amd64` and `arm64` image and deployed them in a K8s cluster
with both kind of nodes
2. `agent` pod is up and running in all the nodes

Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
  • Loading branch information
anubhabMajumdar authored Mar 25, 2024
1 parent c51bb00 commit cf23ecb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions controller/Dockerfile.controller
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN go build -v -o /go/bin/retina/initretina -ldflags "-X main.version="$VERSION
# Stage: Prepare clang and tools
# Bullseye -> debian11
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/mirror/docker/library/debian:bullseye@sha256:a648e10e02af129706b1fb89e1ac9694ae3db7f2b8439aa906321e68cc281bc0 AS tools

LABEL Name=retina-tools Version=0.0.1

WORKDIR /tmp
Expand All @@ -72,6 +73,15 @@ RUN if [ "$GOARCH" = "amd64" ] ; then \
else \
# GOARCH=Arm64.
# Download clang and llvm.
# Need more dependencies for Arm64.
dpkg --add-architecture arm64; \
apt-get update; \
apt-get install -y --no-install-recommends libc6:arm64 zlib1g:arm64 libncurses5:arm64; \
apt-get install -y --no-install-recommends apt-file; \
apt-file update; \
apt-file find libstdc++.so.6; \
apt-get install -y --no-install-recommends libstdc++6:arm64; \
# Download clang and llvm.
wget -O clang+llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/clang+llvm-14.0.0-aarch64-linux-gnu.tar.xz; \
tar -C /usr/local -xJf ./clang+llvm.tar.xz --no-same-owner; \
mv /usr/local/clang+llvm-14.0.0-aarch64-linux-gnu /usr/local/clang+llvm; \
Expand Down

0 comments on commit cf23ecb

Please sign in to comment.