Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Update Quarkus Dockerfile to run as non-root (#778)
Browse files Browse the repository at this point in the history
* Update quarkus Dockerfile to run as non-root

* Incrimented stack version

Co-authored-by: Kamran Shamsi <[email protected]>
  • Loading branch information
paulrobinson and Kamran64 authored May 1, 2020
1 parent e31befe commit 96bd1f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion incubator/quarkus/image/project/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal

WORKDIR /work/
COPY --from=build /project/user-app/target/*-runner /work/application
RUN chmod 775 /work

USER root
RUN microdnf -y install shadow-utils \
&& microdnf clean all ;\
useradd -r -g 0 -s /usr/sbin/nologin quarkus

RUN chown -R quarkus /work
RUN chmod -R g+w /work


USER quarkus
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
2 changes: 1 addition & 1 deletion incubator/quarkus/image/project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>dev.appsody</groupId>
<artifactId>quarkus</artifactId>
<version>0.3.1</version>
<version>0.3.2</version>
<packaging>pom</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion incubator/quarkus/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Quarkus
version: 0.3.1
version: 0.3.2
description: Quarkus runtime for running Java applications
license: Apache-2.0
language: java
Expand Down

0 comments on commit 96bd1f7

Please sign in to comment.