Skip to content

Commit

Permalink
[WIP][Dind] Fix : error "aws not found for amd64" from unit test "aws…
Browse files Browse the repository at this point in the history
… --version"
  • Loading branch information
bonnai.djicko committed Sep 1, 2022
1 parent decdf0c commit 84a89ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Versions
========

2022-09-31
----------
* Dind : build arm64 docker image

2022-08-31
----------

Expand All @@ -22,7 +26,6 @@ Versions
* Python SRC Config : Add linux/amd64 and linux/arm64 as values for the new config property base_platforms
* CI : use docker/setup-qemu-action@v2 and docker/setup-buildx-action@v1 as gitflows step actions
* Images : Only [OCI images](https://github.com/opencontainers/image-spec/blob/main/spec.md) for amd64 architecture are built
* Dind : build arm64 docker image


2022-06-30
Expand Down
12 changes: 5 additions & 7 deletions dind/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ ENV PYTHON_PIP_VERSION ${PIP_VERSION}

FROM base as base-amd64
ARG TRIVY_ARCH="Linux-64bit"
ARG AWSCLI_ARCH="x86_64"
ARG AWSCLI_ARCH="linux-x86_64"

FROM base as base-arm64
ARG TRIVY_ARCH="Linux-ARM64"
ARG AWSCLI_ARCH="aarch64"
ARG AWSCLI_ARCH="linux-aarch64"

FROM base-$TARGETARCH
ARG AWSCLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-${AWSCLI_ARCH}.zip"
ADD requirements.txt .
RUN echo "Install AWS & Azure CLIs" && \
apk add -q --no-cache bash build-base ca-certificates curl gettext git libffi-dev linux-headers musl-dev openldap-dev openssh-client python3-dev gcc libffi-dev libressl-dev make rsync tzdata groff zip && \
Expand All @@ -29,8 +28,7 @@ RUN echo "Install AWS & Azure CLIs" && \
curl -sSL https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk -O && \
apk add --update -q glibc-${GLIBC_VERSION}.apk glibc-bin-${GLIBC_VERSION}.apk && \
rm /etc/apk/keys/sgerrand.rsa.pub glibc-${GLIBC_VERSION}.apk glibc-bin-${GLIBC_VERSION}.apk && \
curl ${AWSCLI_URL} -o "awscliv2.zip" && \
ls -sh awscliv2.zip && \
curl https://awscli.amazonaws.com/awscli-exe-${AWSCLI_ARCH}.zip -o awscliv2.zip && \
unzip awscliv2.zip && \
./aws/install && \
rm -f awscliv2.zip && rm -rf aws && \
Expand All @@ -44,8 +42,8 @@ RUN echo "Install AWS & Azure CLIs" && \
echo "Done install Docker Compose" && \
echo "Install Trivy" && \
apk add -q curl && \
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_${TRIVY_ARCH}.tar.gz -o trivy_{TRIVY_ARCH}.tar.gz && \
tar -zxf trivy_{TRIVY_ARCH}.tar.gz -C /usr/bin/ && \
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_${TRIVY_ARCH}.tar.gz -o trivy_${TRIVY_ARCH}.tar.gz && \
tar -zxf trivy_${TRIVY_ARCH}.tar.gz -C /usr/bin/ && \
echo "Done install Trivy" && \
echo "Adding an up to date mime-types definition file" && \
curl -sSL https://salsa.debian.org/debian/mime-support/raw/master/mime.types -o /etc/mime.types && \
Expand Down
2 changes: 1 addition & 1 deletion dind/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ versions:
"1":
platforms:
- linux/amd64
- linux/arm64 # to fix error comment this line
- linux/arm64
build_args:
GLIBC_VERSION: 2.29-r0
PIP_VERSION: 21.2.1
Expand Down

0 comments on commit 84a89ba

Please sign in to comment.