Dockerfile configured

docker start command with volume written
This commit is contained in:
ivan_chuvakhin 2021-06-29 21:35:53 +03:00
parent 1f85d31bc4
commit bb42fb739b
2 changed files with 17 additions and 0 deletions

16
Dockerfile Normal file
View 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
View file

@ -0,0 +1 @@
server.port=8081