Skip to content

Commit

Permalink
Use clean when running shadowJar in Dockerfile (MarquezProject#2145)
Browse files Browse the repository at this point in the history
* Add clean to build cmd for docker

Signed-off-by: wslulciuc <[email protected]>

* Remove MARQUEZ_VERSION usage in docker/entrypoint.sh

Signed-off-by: wslulciuc <[email protected]>

Signed-off-by: wslulciuc <[email protected]>
  • Loading branch information
wslulciuc committed Sep 27, 2022
1 parent 5e47e0e commit 0a3e3e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.md
.*
Dockerfile
build
api/build
docs
web/node_modules
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 0a3e3e7

Please sign in to comment.