From 59c86f4d6b89d83c34b6590c52e134c30b49dad8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:52:09 +0000 Subject: [PATCH] fix(aws): Fix AWS CLI v2 for Alpine Linux (#6279) (#6280) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(aws): Fix AWS CLI v2 for Alpine Linux Install a version using musl instead of glibc * Fix for legacy key/value format (cherry picked from commit 0226100a95b16e1176a296198b1f892c4514e4d6) Co-authored-by: Jørgen Jervidalo --- Dockerfile.java11.slim | 15 ++++----------- Dockerfile.java11.ubuntu | 4 ++-- Dockerfile.slim | 15 ++++----------- Dockerfile.ubuntu | 4 ++-- 4 files changed, 12 insertions(+), 26 deletions(-) diff --git a/Dockerfile.java11.slim b/Dockerfile.java11.slim index 6820a86bb8..8fc0818bf5 100644 --- a/Dockerfile.java11.slim +++ b/Dockerfile.java11.slim @@ -1,15 +1,15 @@ -FROM python:3.8-alpine3.16 +FROM python:3.8-alpine3.20 LABEL maintainer="sig-platform@spinnaker.io" 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 -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 \ @@ -24,14 +24,7 @@ RUN apk update \ 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" \ diff --git a/Dockerfile.java11.ubuntu b/Dockerfile.java11.ubuntu index 8a5b67d0f9..37f18f0541 100644 --- a/Dockerfile.java11.ubuntu +++ b/Dockerfile.java11.ubuntu @@ -2,10 +2,10 @@ FROM ubuntu:jammy LABEL maintainer="sig-platform@spinnaker.io" 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 && \ diff --git a/Dockerfile.slim b/Dockerfile.slim index 017ee67443..374b6323d5 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -1,15 +1,15 @@ -FROM python:3.8-alpine3.16 +FROM python:3.8-alpine3.20 LABEL maintainer="sig-platform@spinnaker.io" 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 -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 \ @@ -24,14 +24,7 @@ RUN apk update \ 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" \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index ecab15d6f2..27f33038b2 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -2,10 +2,10 @@ FROM ubuntu:jammy LABEL maintainer="sig-platform@spinnaker.io" 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 && \