-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 876 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 876 Bytes
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
30
31
32
FROM amazon/aws-cli:2.34.6
LABEL org.opencontainers.image.title="AWS CLI with SSM Plugin"
LABEL org.opencontainers.image.description="The AWS CLI with pre-installed AWS Session Manager plugin"
LABEL org.opencontainers.image.source="https://github.com/getprobo/docker-aws-cli-with-ssm-plugin"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.vendor="Probo Inc"
ENV SSM_BASE_URL="https://s3.amazonaws.com/session-manager-downloads/plugin/latest"
RUN <<EOF
set -e
yum update -y
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
ARCH_PATH="linux_arm64"
elif [ "$ARCH" = "x86_64" ]; then
ARCH_PATH="linux_64bit"
else
echo "Unsupported architecture: $ARCH"
exit 1
fi
yum install -y "${SSM_BASE_URL}/${ARCH_PATH}/session-manager-plugin.rpm"
yum clean all
EOF
WORKDIR /aws
ENTRYPOINT ["/usr/local/bin/aws"]