mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:15:49 +00:00
Dockerfile configured
docker start command with volume written
This commit is contained in:
parent
1f85d31bc4
commit
bb42fb739b
2 changed files with 17 additions and 0 deletions
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM openjdk:11-jre
|
||||
|
||||
ARG JAR_FILE=./target/*.jar
|
||||
ENV XMS=100m
|
||||
ENV XMX=100m
|
||||
|
||||
RUN addgroup --system petclinic && adduser --system --group petclinic
|
||||
USER petclinic:petclinic
|
||||
|
||||
COPY ${JAR_FILE} application.jar
|
||||
|
||||
CMD java -jar -Xms${XMS} -Xmx${XMX} application.jar
|
||||
|
||||
# final container start command
|
||||
# docker container run -p 8080:8081 -v "$(pwd)/local.properties:/application.properties" -e "XMS=200m" -e "XMX=200m" spring-petclinic
|
||||
|
1
local.properties
Normal file
1
local.properties
Normal file
|
@ -0,0 +1 @@
|
|||
server.port=8081
|
Loading…
Reference in a new issue