Skip to content
Snippets Groups Projects
Commit 491339f9 authored by Solomon Ayalew's avatar Solomon Ayalew
Browse files

Run docker as non root user

parent e3dcebe9
No related branches found
No related tags found
1 merge request!111Draft: Run docker as non root user
Pipeline #287915 failed
......@@ -21,4 +21,10 @@ COPY ${JAR_FILE} app.jar
COPY /provider/pws-aws/build-aws/entrypoint.sh /entrypoint.sh
EXPOSE 8080
# Add a non-root user
RUN groupadd -g 10001 -r nonroot \
&& useradd -g 10001 -r -u 10001 nonroot
# Run as non-root user
USER 10001:10001
ENTRYPOINT ["/bin/sh", "-c", ". /entrypoint.sh"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment