Skip to content

Commit

Permalink
Init Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
habibimustafa authored Nov 26, 2024
0 parents commit 34f624e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as installer
ARG EXE_FILENAME=awscli-exe-linux-x86_64.zip
COPY $EXE_FILENAME .
RUN yum update -y \
&& yum install -y unzip \
&& unzip $EXE_FILENAME \
# The --bin-dir is specified so that we can copy the
# entire bin directory from the installer stage into
# into /usr/local/bin of the final stage without
# accidentally copying over any other executables that
# may be present in /usr/local/bin of the installer stage.
&& ./aws/install --bin-dir /aws-cli-bin/

FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN yum update -y \
&& yum install -y less groff \
&& yum clean all
COPY --from=installer /usr/local/aws-cli/ /usr/local/aws-cli/
COPY --from=installer /aws-cli-bin/ /usr/local/bin/
WORKDIR /aws
ENTRYPOINT ["/usr/local/bin/aws"]

0 comments on commit 34f624e

Please sign in to comment.