File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,21 +2,21 @@ FROM openjdk:24-jdk-slim@sha256:df6c3a966c372fa314ec0dc428bf27f8aa28316a173d3d6e
22
33# Create a custom user with UID 1234 and GID 1234
44# https://www.docker.com/blog/understanding-the-docker-user-instruction/
5- RUN groupadd -g 1234 customgroup && \
6- useradd -m -u 1234 -g customgroup customuser
5+ RUN groupadd -g 1234 app-group && \
6+ useradd -m -u 1234 -g app-group app-user
77
88# Set the directory for executing future commands
9- WORKDIR /home/customuser
9+ WORKDIR /home/app-user
1010
1111# Extract from .tar and copy the app files from host machine to image filesystem
1212ADD helidon/build/distributions/helidon-*.tar .
13- RUN mv helidon-* app && chown -R customuser:customgroup app
13+ RUN mv helidon-* app && chown -R app-user:app-group app
1414
1515# Switch to the custom user
16- USER customuser
16+ USER app-user
1717
1818# Run the Main class
1919# https://docs.docker.com/reference/build-checks/json-args-recommended/
20- ENTRYPOINT ["/home/customuser /app/bin/helidon" ]
20+ ENTRYPOINT ["/home/app-user /app/bin/helidon" ]
2121
2222EXPOSE 8080/tcp
Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ services:
66 - " 8080:8080"
77 networks :
88 - bridge-net
9+ volumes :
10+ - helidon-se:/home/app-user/
911
1012networks :
1113 bridge-net :
12- driver : bridge
14+ driver : bridge
15+
16+ volumes :
17+ helidon-se:
You can’t perform that action at this time.
0 commit comments