다음 명령으로 실행된 컨테이너다.
mkdir ~/aws-cli
cd ~/aws-cli
cat <<EOF > Dockerfile
# Dockerfile to create a container with the latest AWS CLI installed
# Base image is an official minimal image that includes some basic utilities
FROM amazonlinux:2
# Update the base image and install dependencies to download and install AWS CLI V2
RUN yum update -y && \
yum install -y unzip curl less && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip aws && \
yum clean all
# Set the command to keep the container running
CMD ["sleep", "infinity"]
EOF
# Docker 이미지 빌드
docker build -t gasbugs/aws-cli .
# Docker 컨테이너 실행
docker run -d --name my-aws-cli gasbugs/aws-cli
# Docker exec
docker exec -it my-aws-cli aws --version
# Docker push
docker push gasbugs/aws-cli
Content type
Image
Digest
sha256:f37887046…
Size
124.5 MB
Last updated
almost 2 years ago
docker pull gasbugs/aws-cli