Skip to content

Commit

Permalink
Change dockerfile to use non-alpine image varients.
Browse files Browse the repository at this point in the history
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
   aws/aws-cli#4685 (comment).
   This approached seems very brittle so I opted to use non-alpine
   images instead.
  • Loading branch information
avrittrohwer committed Oct 11, 2022
1 parent 92739a1 commit f27c09c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cloud/cloud.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand All @@ -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/

0 comments on commit f27c09c

Please sign in to comment.