-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (23 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.9.19-slim-bookworm
ARG TARGETARCH
RUN mkdir -p /root/aws-cli
WORKDIR /root/aws-cli
RUN apt-get update -y && apt-get install -y aeson-pretty curl git groff less make unzip && apt-get clean
RUN if [ "$TARGETARCH" = "amd64" ]; then \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"; \
elif [ "$TARGETARCH" = "arm64" ]; then \
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"; \
fi && \
unzip awscliv2.zip && \
./aws/install && \
rm awscliv2.zip && \
rm -Rf aws
RUN if [ "$TARGETARCH" = "amd64" ]; then \
curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip" -o "aws-sam-cli.zip"; \
elif [ "$TARGETARCH" = "arm64" ]; then \
curl -L "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip" -o "aws-sam-cli.zip"; \
fi && \
unzip aws-sam-cli.zip -d sam-installation && \
./sam-installation/install && \
rm aws-sam-cli.zip && \
rm -Rf sam-installation