From 0a3e3e7fde6c466b450449b18748c5b1f5da76e7 Mon Sep 17 00:00:00 2001 From: Willy Lulciuc Date: Tue, 27 Sep 2022 10:00:27 -0700 Subject: [PATCH] Use `clean` when running `shadowJar` in Dockerfile (#2145) * Add clean to build cmd for docker Signed-off-by: wslulciuc * Remove MARQUEZ_VERSION usage in docker/entrypoint.sh Signed-off-by: wslulciuc Signed-off-by: wslulciuc --- .dockerignore | 2 +- Dockerfile | 2 +- docker/entrypoint.sh | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index a3b1498b04..22225457ca 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ *.md .* Dockerfile -build +api/build docs web/node_modules diff --git a/Dockerfile b/Dockerfile index 27374adae5..a8fdf1ccdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY build.gradle build.gradle COPY api ./api COPY api/build.gradle ./api/build.gradle COPY clients/java ./clients/java -RUN ./gradlew --no-daemon :api:shadowJar +RUN ./gradlew --no-daemon clean :api:shadowJar FROM eclipse-temurin:17 RUN apt-get update && apt-get install -y postgresql-client bash coreutils diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 3e279e97cf..5320c72cc9 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -12,14 +12,8 @@ if [[ -z "${MARQUEZ_CONFIG}" ]]; then echo "WARNING 'MARQUEZ_CONFIG' not set, using development configuration." fi -if [[ -z "${MARQUEZ_VERSION}" ]]; then - MARQUEZ_VERSION='*' - echo "WARNING 'MARQUEZ_VERSION' not set. Running could fail if directory contains multiple jar versions." -fi - - # Adjust java options for the http server JAVA_OPTS="${JAVA_OPTS} -Duser.timezone=UTC -Dlog4j2.formatMsgNoLookups=true" # Start http server with java options and configuration -java ${JAVA_OPTS} -jar marquez-${MARQUEZ_VERSION}.jar server ${MARQUEZ_CONFIG} +java ${JAVA_OPTS} -jar marquez-*.jar server ${MARQUEZ_CONFIG}