Skip to content

Commit 8760f14

Browse files
committed
🔧 Enhance Dockerfile to dynamically download AWS CLI based on architecture
1 parent 426fc62 commit 8760f14

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎Dockerfile‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ RUN apt-get update && \
88
curl \
99
unzip \
1010
ca-certificates && \
11+
# Detect architecture and download appropriate AWS CLI version
12+
ARCH=$(uname -m) && \
13+
if [ "$ARCH" = "aarch64" ]; then \
14+
AWS_CLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip"; \
15+
else \
16+
AWS_CLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"; \
17+
fi && \
1118
# Download and install AWS CLI in a custom location
1219
mkdir -p /tmp/awscli && \
1320
cd /tmp/awscli && \
14-
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" && \
21+
curl "$AWS_CLI_URL" -o "awscliv2.zip" && \
1522
unzip awscliv2.zip && \
1623
./aws/install && \
1724
cd / && \

0 commit comments

Comments
 (0)