Skip to content

Commit

Permalink
Merge pull request quarkusio#7064 from haraldatbmw/master
Browse files Browse the repository at this point in the history
Dockerfile.native - run with non-root user 1001
  • Loading branch information
cescoffier authored Feb 17, 2020
2 parents 4ce58c9 + efa9a63 commit f4270f8
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
WORKDIR /work/
COPY ${build_dir}/*-runner /work/application
RUN chmod 775 /work /work/application

# set up permissions for user `1001`
RUN chmod 775 /work /work/application \
&& chown -R 1001 /work \
&& chmod -R "g+rwX" /work \
&& chown -R 1001:root /work

EXPOSE 8080
USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

0 comments on commit f4270f8

Please sign in to comment.