Skip to content

Commit 1674f20

Browse files
authored
Merge pull request #6 from pdsinterop/fix/cln-010
add non-root user to run the server
2 parents bdf0dd2 + 795a0e3 commit 1674f20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ RUN openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 && \
2121
openssl req -new -key server.key -out server.csr -subj "/C=NL/ST=Overijssel/L=Enschede/O=PDSInterop/OU=PDSInterop/CN=solid.pdsinterop.org" && \
2222
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
2323

24+
# Create a custom user with UID 1234 and GID 1234
25+
RUN groupadd -g 1234 pubsubgroup && \
26+
useradd -m -u 1234 -g pubsubgroup pubsubuser
27+
28+
USER pubsubuser
29+
2430
WORKDIR /app/server/
2531
EXPOSE 8080
2632
CMD ["php", "server.php"]

0 commit comments

Comments
 (0)