Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aws): Fix AWS CLI v2 for Alpine Linux #6279

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions Dockerfile.java11.slim
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM python:3.8-alpine3.16
FROM python:3.8-alpine3.20
LABEL maintainer="[email protected]"
ARG TARGETARCH

ENV KUBECTL_DEFAULT_RELEASE=1.22.17
ENV KUBECTL_RELEASES="${KUBECTL_DEFAULT_RELEASE} 1.26.12 1.27.9 1.28.5 1.29.0"
ENV AWS_CLI_VERSION=2.15.22
ENV AWS_CLI_VERSION=2.15.57
ENV AWS_AIM_AUTHENTICATOR_VERSION=0.6.14
ENV GOOGLE_CLOUD_SDK_VERSION=476.0.0
ENV ECR_TOKEN_VERSION=v1.0.2

Check warning on line 10 in Dockerfile.java11.slim

View workflow job for this annotation

GitHub Actions / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ECR_TOKEN_VERSION") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

ENV PATH "$PATH:/usr/local/bin/:/opt/google-cloud-sdk/bin/:/usr/local/bin/aws-iam-authenticator"
ENV PATH="$PATH:/usr/local/bin/:/opt/google-cloud-sdk/bin/:/usr/local/bin/aws-iam-authenticator"

RUN apk update \
&& apk upgrade \
Expand All @@ -24,14 +24,7 @@
unzip

# AWS CLI 2
RUN if [ "${TARGETARCH}" = "arm64" ]; then \
wget -nv -O "awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-aarch64-${AWS_CLI_VERSION}.zip"; \
else \
wget -nv -O "awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip"; \
fi && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf ./awscliv2.zip ./aws
RUN apk add aws-cli=${AWS_CLI_VERSION}-r0

# Google cloud SDK
RUN [ $TARGETARCH == 'amd64' ] && export GCP_ARCH="x86_64" || export GCP_ARCH="arm" \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.java11.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM ubuntu:jammy
LABEL maintainer="[email protected]"
ARG TARGETARCH
ENV GOOGLE_CLOUD_SDK_VERSION=476.0.0
ENV PATH "$PATH:/opt/google-cloud-sdk/bin/"
ENV PATH="$PATH:/opt/google-cloud-sdk/bin/"
ENV KUBECTL_DEFAULT_RELEASE=1.22.17
ENV KUBECTL_RELEASES="${KUBECTL_DEFAULT_RELEASE} 1.26.12 1.27.9 1.28.5 1.29.0"
ENV AWS_CLI_VERSION=2.15.22
ENV AWS_CLI_VERSION=2.15.57
ENV AWS_AIM_AUTHENTICATOR_VERSION=0.6.14

RUN apt-get update && apt-get install -y curl gnupg && \
Expand Down
15 changes: 4 additions & 11 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM python:3.8-alpine3.16
FROM python:3.8-alpine3.20
LABEL maintainer="[email protected]"
ARG TARGETARCH

ENV KUBECTL_DEFAULT_RELEASE=1.22.17
ENV KUBECTL_RELEASES="${KUBECTL_DEFAULT_RELEASE} 1.26.12 1.27.9 1.28.5 1.29.0"
ENV AWS_CLI_VERSION=2.15.22
ENV AWS_CLI_VERSION=2.15.57
ENV AWS_AIM_AUTHENTICATOR_VERSION=0.6.14
ENV GOOGLE_CLOUD_SDK_VERSION=476.0.0
ENV ECR_TOKEN_VERSION=v1.0.2

Check warning on line 10 in Dockerfile.slim

View workflow job for this annotation

GitHub Actions / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ECR_TOKEN_VERSION") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 10 in Dockerfile.slim

View workflow job for this annotation

GitHub Actions / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ECR_TOKEN_VERSION") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

ENV PATH "$PATH:/usr/local/bin/:/opt/google-cloud-sdk/bin/:/usr/local/bin/aws-iam-authenticator"
ENV PATH="$PATH:/usr/local/bin/:/opt/google-cloud-sdk/bin/:/usr/local/bin/aws-iam-authenticator"

RUN apk update \
&& apk upgrade \
Expand All @@ -24,14 +24,7 @@
unzip

# AWS CLI 2
RUN if [ "${TARGETARCH}" = "arm64" ]; then \
wget -nv -O "awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-aarch64-${AWS_CLI_VERSION}.zip"; \
else \
wget -nv -O "awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip"; \
fi && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf ./awscliv2.zip ./aws
RUN apk add aws-cli=${AWS_CLI_VERSION}-r0

# Google cloud SDK
RUN [ $TARGETARCH == 'amd64' ] && export GCP_ARCH="x86_64" || export GCP_ARCH="arm" \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM ubuntu:jammy
LABEL maintainer="[email protected]"
ARG TARGETARCH
ENV GOOGLE_CLOUD_SDK_VERSION=476.0.0
ENV PATH "$PATH:/opt/google-cloud-sdk/bin/"
ENV PATH="$PATH:/opt/google-cloud-sdk/bin/"
ENV KUBECTL_DEFAULT_RELEASE=1.22.17
ENV KUBECTL_RELEASES="${KUBECTL_DEFAULT_RELEASE} 1.26.12 1.27.9 1.28.5 1.29.0"
ENV AWS_CLI_VERSION=2.15.22
ENV AWS_CLI_VERSION=2.15.57
ENV AWS_AIM_AUTHENTICATOR_VERSION=0.6.14

RUN apt-get update && apt-get install -y curl gnupg && \
Expand Down
Loading