Skip to content

Commit

Permalink
Merge pull request #8807 from davsclaus/multistage-user-1001
Browse files Browse the repository at this point in the history
Building container image with multistage script should setup user 100…
  • Loading branch information
geoand authored Apr 24, 2020
2 parents e3ed0f2 + f477bba commit 772e10d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,16 @@ RUN mvn -f /usr/src/app/pom.xml -Pnative clean package
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /work/
COPY --from=build /usr/src/app/target/*-runner /work/application
RUN chmod 775 /work
# 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"]
----

Expand Down

0 comments on commit 772e10d

Please sign in to comment.