mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-29 02:15:50 +00:00
Added Dockerfile
This commit is contained in:
parent
e7c879ed3a
commit
c9afb425ff
1 changed files with 11 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM registry.redhat.io/ubi8/ubi
|
||||
ARG JAR_FILE=target/*.jar
|
||||
RUN yum install -y java-11-openjdk && yum clean all -y
|
||||
RUN mkdir -p /opt/app
|
||||
COPY ${JAR_FILE} /opt/app/app.jar
|
||||
RUN useradd spring && \
|
||||
chown -R spring:spring /opt/app
|
||||
RUN chgrp -R 0 /opt/app && \
|
||||
chmod -R g=u /opt/app
|
||||
USER spring:spring
|
||||
ENTRYPOINT ["java","-jar","/opt/app/app.jar"]
|
Loading…
Reference in a new issue