Skip to content

Commit e038f85

Browse files
add docker-user to groupd
1 parent 1f3487e commit e038f85

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ FROM docker:dind
33
# Install required packages
44
RUN apk update && \
55
apk add --no-cache xorriso git xz curl ca-certificates iptables cpio bash perl-utils && \
6-
# Add user to the existing docker group
7-
adduser -S docker-user && \
6+
# Create user 'docker-user' and add it to the 'docker' group
7+
adduser -S -D -H docker-user && \
88
addgroup docker-user docker
99

1010
WORKDIR /usr/src/app
1111
COPY . .
1212

13-
USER docker-user # Ensure the container runs as a non-root user
13+
# Switch to 'docker-user' to run as a non-root user
14+
USER docker-user
1415

1516
CMD ["/usr/src/app/iso/scripts/generate_ISO.sh"]

0 commit comments

Comments
 (0)