From 7fea4e15078696f93e47441b68583c04063bc080 Mon Sep 17 00:00:00 2001 From: Dylan Richards Date: Thu, 17 Jun 2021 21:01:35 -0500 Subject: [PATCH] Fixes issue #236 Changed line 5 to create the parent directory. Added the PROJ_JAR environment variable similar to api-audit. Only copied the needed jar file. Changed execution from wildcard to the PROJ_JAR. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82050815..9423f060 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,17 @@ FROM openjdk:8-jre VOLUME ["/hygieia/logs"] -RUN mkdir /hygieia/config +RUN mkdir -p /hygieia/config EXPOSE 8080 ENV PROP_FILE /hygieia/config/application.properties +ENV PROJ_JAR api.jar WORKDIR /hygieia -COPY target/*.jar /hygieia/ +COPY target/api.jar /hygieia/ COPY docker/properties-builder.sh /hygieia/ CMD ./properties-builder.sh &&\ - java -Djava.security.egd=file:/dev/./urandom -jar *.jar --spring.config.location=$PROP_FILE \ No newline at end of file + java -Djava.security.egd=file:/dev/./urandom -jar $PROJ_JAR --spring.config.location=$PROP_FILE