Skip to content

Commit 34f624e

Browse files
Init Dockerfile
0 parents  commit 34f624e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as installer
2+
ARG EXE_FILENAME=awscli-exe-linux-x86_64.zip
3+
COPY $EXE_FILENAME .
4+
RUN yum update -y \
5+
&& yum install -y unzip \
6+
&& unzip $EXE_FILENAME \
7+
# The --bin-dir is specified so that we can copy the
8+
# entire bin directory from the installer stage into
9+
# into /usr/local/bin of the final stage without
10+
# accidentally copying over any other executables that
11+
# may be present in /usr/local/bin of the installer stage.
12+
&& ./aws/install --bin-dir /aws-cli-bin/
13+
14+
FROM public.ecr.aws/amazonlinux/amazonlinux:2
15+
RUN yum update -y \
16+
&& yum install -y less groff \
17+
&& yum clean all
18+
COPY --from=installer /usr/local/aws-cli/ /usr/local/aws-cli/
19+
COPY --from=installer /aws-cli-bin/ /usr/local/bin/
20+
WORKDIR /aws
21+
ENTRYPOINT ["/usr/local/bin/aws"]

0 commit comments

Comments
 (0)