From 1b387d4be0e46335102d3ec7260df3d6dc0f1399 Mon Sep 17 00:00:00 2001 From: Marc Johnson Date: Sun, 31 Dec 2017 15:33:55 +0000 Subject: [PATCH] Use maven artefacts to build docker image CIRC-58 --- .dockerignore | 4 ---- Dockerfile | 2 +- build-docker-image.sh | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 7cb08627c1..0000000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!Dockerfile -!docker -!build/libs diff --git a/Dockerfile b/Dockerfile index b3b751d4df..53f8f003b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV VERTICLE_FILE mod-circulation.jar ENV VERTICLE_HOME /usr/verticles # Copy your fat jar to the container -COPY build/libs/${VERTICLE_FILE} ${VERTICLE_HOME}/${VERTICLE_FILE} +COPY target/${VERTICLE_FILE} ${VERTICLE_HOME}/${VERTICLE_FILE} # Expose this port locally in the container. EXPOSE 9801 diff --git a/build-docker-image.sh b/build-docker-image.sh index 9b10c4fbe1..da46abbcc8 100755 --- a/build-docker-image.sh +++ b/build-docker-image.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -gradle fatJar +mvn clean package -q -Dmaven.test.skip=true || exit 1 docker build -t mod-circulation .