From f27c09c6476c65604b0c5b6b622f54008a0efd1e Mon Sep 17 00:00:00 2001 From: Avritt Rohwer Date: Tue, 11 Oct 2022 16:07:40 -0700 Subject: [PATCH] Change dockerfile to use non-alpine image varients. aws-cli expects glibc shared objects which are not present on alpine. Alternatives considered: 1. Adding gcompat to the apk add list. The aws-cli still linked against missing shared objects. 1. Add missing shared objects manually like in https://github.com/aws/aws-cli/issues/4685#issuecomment-615872019. This approached seems very brittle so I opted to use non-alpine images instead. --- cloud/cloud.Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cloud/cloud.Dockerfile b/cloud/cloud.Dockerfile index 2fc8b36f..64918669 100644 --- a/cloud/cloud.Dockerfile +++ b/cloud/cloud.Dockerfile @@ -4,8 +4,8 @@ # workaround uses an aarch64 (arm64) image instead when an optional platform argument is set to arm64. # Docker's BuildKit skips unused stages so the image for the platform that isn't used will not be built. -FROM eclipse-temurin:11.0.16_8-jre-alpine as amd64 -FROM bellsoft/liberica-openjre-alpine:11.0.16-8 as arm64 +FROM eclipse-temurin:11.0.16_8-jre as amd64 +FROM bellsoft/liberica-openjre-debian:11.0.16-8 as arm64 FROM ${TARGETARCH} @@ -14,8 +14,12 @@ COPY --from=amazon/aws-cli:2.8.2 /usr/local /usr/local COPY --from=amazon/aws-cli:2.8.2 /aws /aws # TODO(#3222): Add Azure CLI and make sure It works with arm64. -RUN /bin/sh -c set -o pipefail && apk update && \ - apk add --upgrade apk-tools && apk upgrade --available && \ - apk add --no-cache --update bash python3 git less groff +RUN /bin/sh -c set -o pipefail && apt-get update && \ + apt-get upgrade --yes && apt-get install --yes bash python3 git + + +#apk update && \ +# apk add --upgrade apk-tools && apk upgrade --available && \ +# apk add --no-cache --update bash python3 git less groff COPY ./cloud/ cloud/