Skip to content

Commit 30cf69f

Browse files
ensure non-root user
1 parent 9062c5e commit 30cf69f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
FROM docker:dind
2-
# hadolint ignore=DL3018
32
RUN apk update && \
4-
apk add --no-cache xorriso git xz curl ca-certificates iptables cpio bash perl-utils \
5-
rm -rf /var/cache/apk/*
3+
apk add --no-cache xorriso git xz curl ca-certificates iptables cpio bash perl-utils && \
4+
addgroup -S docker && \
5+
adduser -S docker-user -G docker
66

7-
#RUN apk add -U --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing aufs-util
8-
9-
# RUN addgroup -g 2999 docker
10-
11-
# Create app directory
127
WORKDIR /usr/src/app
138
COPY . .
149

15-
CMD ["/usr/src/app/iso/scripts/generate_ISO.sh"]
10+
USER docker-user # Ensure the container runs as a non-root user
11+
12+
CMD ["/usr/src/app/iso/scripts/generate_ISO.sh"]

0 commit comments

Comments
 (0)