Skip to content

Commit 0203344

Browse files
authored
Update Dockerfile
1 parent 0523902 commit 0203344

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

aws-cli/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/amazonlinux/amazonlinux:2023.7.20250609.0-minimal
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023.7.20250609.0-minimal@sha256:c278930b7f4d5b703962bbcfb7a0ac4c6dc6c318ee02dd8123005d68cd94df17
22

33
HEALTHCHECK NONE
44

@@ -28,6 +28,15 @@ RUN dnf upgrade -y \
2828
&& dnf clean all \
2929
&& rm -rf /var/cache/yum
3030

31+
RUN chmod 777 /opt \
32+
&& adduser --home-dir "${USER_HOME}" --uid "${USER_ID}" "${USER_NAME}"
33+
34+
USER "${USER_NAME}"
35+
36+
ENV HOME="${USER_HOME}"
37+
38+
WORKDIR /opt
39+
3140
# @TL FIXME: --break-system-packages not supported until Python 3.11.
3241
RUN pip3 install --no-cache-dir --upgrade \
3342
cfn-policy-validator==0.0.36 \
@@ -38,15 +47,6 @@ RUN pip3 install --no-cache-dir --upgrade \
3847
exit 1 ; \
3948
fi
4049

41-
RUN chmod 777 /opt \
42-
&& adduser --home-dir "${USER_HOME}" --uid "${USER_ID}" "${USER_NAME}"
43-
44-
USER "${USER_NAME}"
45-
46-
ENV HOME="${USER_HOME}"
47-
48-
WORKDIR /opt
49-
5050
CMD ["/bin/bash"]
5151

5252
ENTRYPOINT []

0 commit comments

Comments
 (0)