From 794232f1611a71f2d8aca1075a51419eb504d894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 13 Jun 2025 10:54:12 +0200 Subject: [PATCH 1/2] install awscli, curl, jq --- Dockerfile.bootstrap-prefix-debian-11 | 7 +++++++ Dockerfile.bootstrap-prefix-debian-13 | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Dockerfile.bootstrap-prefix-debian-11 b/Dockerfile.bootstrap-prefix-debian-11 index fca32c0f..d9983b12 100644 --- a/Dockerfile.bootstrap-prefix-debian-11 +++ b/Dockerfile.bootstrap-prefix-debian-11 @@ -1,4 +1,7 @@ +ARG awscliversion=1.32.22 + FROM debian:11-slim +ARG awscliversion COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh @@ -12,6 +15,10 @@ RUN python3 -m venv --system-site-packages /opt/ansible && \ ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \ deactivate RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh +# tools for deploying tarballs +RUN apt-get install -y curl jq +# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) +RUN pip3 install awscli==${awscliversion} ENV LC_ALL=C.UTF-8 ENV PATH=/usr/local/bin:$PATH diff --git a/Dockerfile.bootstrap-prefix-debian-13 b/Dockerfile.bootstrap-prefix-debian-13 index 1597f4ba..fbfb6db8 100644 --- a/Dockerfile.bootstrap-prefix-debian-13 +++ b/Dockerfile.bootstrap-prefix-debian-13 @@ -1,4 +1,7 @@ +ARG awscliversion=1.32.22 + FROM debian:trixie-20250520-slim +ARG awscliversion COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh @@ -12,6 +15,10 @@ RUN python3 -m venv --system-site-packages /opt/ansible && \ ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \ deactivate RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh +# tools for deploying tarballs +RUN apt-get install -y curl jq +# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) +RUN pip3 install awscli==${awscliversion} ENV LC_ALL=C.UTF-8 ENV PATH=/usr/local/bin:$PATH From 6390a0377ac45387842b45dd14cff7d5d1020b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 13 Jun 2025 11:20:50 +0200 Subject: [PATCH 2/2] install awscli using virtual environment --- Dockerfile.bootstrap-prefix-debian-11 | 9 +++++++-- Dockerfile.bootstrap-prefix-debian-13 | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile.bootstrap-prefix-debian-11 b/Dockerfile.bootstrap-prefix-debian-11 index d9983b12..619ba2e2 100644 --- a/Dockerfile.bootstrap-prefix-debian-11 +++ b/Dockerfile.bootstrap-prefix-debian-11 @@ -1,3 +1,4 @@ +# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) ARG awscliversion=1.32.22 FROM debian:11-slim @@ -17,8 +18,12 @@ RUN python3 -m venv --system-site-packages /opt/ansible && \ RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh # tools for deploying tarballs RUN apt-get install -y curl jq -# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) -RUN pip3 install awscli==${awscliversion} +RUN python3 -m venv --system-site-packages /opt/awscli && \ + . /opt/awscli/bin/activate && \ + pip3 install --upgrade pip && \ + pip3 install awscli==${awscliversion} && \ + ln -s /opt/awscli/bin/aws /usr/local/bin/ && \ + deactivate ENV LC_ALL=C.UTF-8 ENV PATH=/usr/local/bin:$PATH diff --git a/Dockerfile.bootstrap-prefix-debian-13 b/Dockerfile.bootstrap-prefix-debian-13 index fbfb6db8..eab7e95a 100644 --- a/Dockerfile.bootstrap-prefix-debian-13 +++ b/Dockerfile.bootstrap-prefix-debian-13 @@ -1,3 +1,4 @@ +# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) ARG awscliversion=1.32.22 FROM debian:trixie-20250520-slim @@ -17,8 +18,12 @@ RUN python3 -m venv --system-site-packages /opt/ansible && \ RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh # tools for deploying tarballs RUN apt-get install -y curl jq -# stick to awscli v1.x, 2.x is not available through PyPI (see https://github.com/aws/aws-cli/issues/4947) -RUN pip3 install awscli==${awscliversion} +RUN python3 -m venv --system-site-packages /opt/awscli && \ + . /opt/awscli/bin/activate && \ + pip3 install --upgrade pip && \ + pip3 install awscli==${awscliversion} && \ + ln -s /opt/awscli/bin/aws /usr/local/bin/ && \ + deactivate ENV LC_ALL=C.UTF-8 ENV PATH=/usr/local/bin:$PATH