diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..3173affef --- /dev/null +++ b/Dockerfile @@ -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 + diff --git a/local.properties b/local.properties new file mode 100644 index 000000000..4d360de14 --- /dev/null +++ b/local.properties @@ -0,0 +1 @@ +server.port=8081