diff --git a/golang/Dockerfile.golang b/golang/Dockerfile.golang index b8939ed..0df86dd 100644 --- a/golang/Dockerfile.golang +++ b/golang/Dockerfile.golang @@ -16,9 +16,9 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | g echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ apt update && apt install -y gh unzip; -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \ - unzip awscliv2.zip && \ - ./aws/install +COPY resources/install_awscli.sh ./install_awscli.sh +RUN bash install_awscli.sh && \ + rm -rf install_awscli.sh RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ diff --git a/node/Dockerfile.node b/node/Dockerfile.node index e749303..18ec1ef 100644 --- a/node/Dockerfile.node +++ b/node/Dockerfile.node @@ -21,9 +21,9 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | g WORKDIR /app RUN npm install -g --registry=${REGISTRY_URL} pnpm -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \ - unzip awscliv2.zip && \ - ./aws/install +COPY resources/install_awscli.sh ./install_awscli.sh +RUN bash install_awscli.sh && \ + rm -rf install_awscli.sh RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ diff --git a/python/Dockerfile.python b/python/Dockerfile.python index b8ac523..a12fc2d 100644 --- a/python/Dockerfile.python +++ b/python/Dockerfile.python @@ -27,11 +27,11 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | g RUN pip install --index-url ${INDEX_URL} \ poetry pytest playwright \ pytest-cov pydantic - -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \ - unzip awscliv2.zip && \ - ./aws/install - + +COPY resources/install_awscli.sh ./install_awscli.sh +RUN bash install_awscli.sh && \ + rm -rf install_awscli.sh + RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ # diff --git a/resources/install_awscli.sh b/resources/install_awscli.sh new file mode 100644 index 0000000..60c6259 --- /dev/null +++ b/resources/install_awscli.sh @@ -0,0 +1,20 @@ +#! /usr/bin/env bash + +set -e + +apt upgrade && \ + apt install -y coreutils + +ARCH=$(arch) + +if [[ "$ARCH" == "arm64" ]]; then + curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install +else + curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + sudo ./aws/install +fi + +rm -rf awscliv2.zip \ No newline at end of file