Skip to content

Commit

Permalink
feat(aws-alpine): add new image for aws with alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
bonnai.djicko committed Jul 10, 2023
1 parent 5fe83fd commit 1c51ac0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions aws-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG ALPINE_VERSION
FROM python:3.11-alpine3.18 as base

FROM base as base-arm64
ARG AWS_CLI_VERSION
RUN apk add --no-cache git unzip groff build-base libffi-dev cmake curl python3-dev
RUN pip3 install --no-cache --upgrade pip setuptools wheel
RUN git clone --single-branch --depth 1 -b ${AWS_CLI_VERSION} https://github.com/aws/aws-cli.git
WORKDIR aws-cli
RUN ./configure --with-install-type=portable-exe --with-download-deps
RUN make
RUN make install
# reduce image size: remove autocomplete and examples
RUN rm -rf \
/usr/local/lib/aws-cli/aws_completer \
/usr/local/lib/aws-cli/awscli/data/ac.index \
/usr/local/lib/aws-cli/awscli/examples
RUN find /usr/local/lib/aws-cli/awscli/data -name completions-1*.json -delete
RUN find /usr/local/lib/aws-cli/awscli/botocore/data -name examples-1.json -delete
RUN (cd /usr/local/lib/aws-cli; for a in *.so*; do test -f /lib/$a && rm $a; done)
14 changes: 14 additions & 0 deletions aws-alpine/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
test_config: &test_config
cmd:
- aws --version

versions:
"1":
platforms:
- linux/amd64
- linux/arm64
test_config: *test_config
build_args:
ALPINE_VERSION: 3.17
AWS_CLI_VERSION: 2.11.11
GLIBC_VERSION: 2.29-r0

0 comments on commit 1c51ac0

Please sign in to comment.