Skip to content

Commit d8d3715

Browse files
committed
Run dockerfile actions as non-root users
1 parent 4d8eba0 commit d8d3715

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

next-image-tag-number/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
FROM alpine:latest
22
RUN apk add --update --no-cache --no-progress curl jq
3+
RUN adduser -u 1001 -D action
4+
USER action
35
COPY action.sh /action.sh
46
ENTRYPOINT ["/action.sh"]

set-vendir-channels-path-to-imgpkg-bundle/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ RUN apk add --update --no-cache --no-progress bash perl-utils \
66
&& wget -O- https://carvel.dev/install.sh | bash \
77
&& apk del bash perl-utils
88

9+
RUN adduser -u 1001 -D action
10+
USER action
11+
912
COPY action.sh /action.sh
1013
ENTRYPOINT ["/action.sh"]

0 commit comments

Comments
 (0)