From 34f624edfabeaf83711b97d7171b712093be6c6f Mon Sep 17 00:00:00 2001 From: Habibi Mustafa Date: Tue, 26 Nov 2024 10:24:43 +0700 Subject: [PATCH] Init Dockerfile --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..36b06c6 --- /dev/null +++ b/Dockerfile @@ -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"]