ARG TAG FROM public.ecr.aws/zero-downtime/alpine-builder:$TAG ARG ALPINE="v3.16" ARG SYSROOT=/home/alpine/sysroot-aarch64 USER root # Workaround for apk fetch bug related to `g++-aarch64` name, todo RUN wget https://cdn.zero-downtime.net/alpine/v3.16/kubezero/x86_64/g%2B%2B-aarch64-11.2.1_git20220219-r2.apk && \ apk add --no-cache g%2B%2B-aarch64-11.2.1_git20220219-r2.apk && rm -f g%2B%2B-aarch64-11.2.1_git20220219-r2.apk RUN apk -U --no-cache add \ build-base-aarch64@kubezero # gcc-gnat-aarch64@kubezero RUN mkdir -p ${SYSROOT} && \ apk -X https://dl-cdn.alpinelinux.org/alpine/${ALPINE}/main -U --allow-untrusted --no-scripts -p ${SYSROOT} --initdb --arch aarch64 add alpine-base && \ apk -X https://dl-cdn.alpinelinux.org/alpine/${ALPINE}/main --arch aarch64 -p ${SYSROOT} --allow-untrusted add alpine-keys && \ cp /etc/apk/repositories ${SYSROOT}/etc/apk RUN apk -U --arch aarch64 -p ${SYSROOT} add \ libgcc \ libstdc++ \ musl-dev USER alpine