Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move installLocalDependencies and buildServer to Dockerfile #1481

Open
copyrights opened this issue Mar 21, 2023 · 1 comment · May be fixed by #1488
Open

Move installLocalDependencies and buildServer to Dockerfile #1481

copyrights opened this issue Mar 21, 2023 · 1 comment · May be fixed by #1488
Labels
🐋 docker Related to Docker code 🍩 enhancement New feature or request

Comments

@copyrights
Copy link
Contributor

Today the build pipeline consists of two steps. Prepare server build and build server locally and then build containers.

To ease local testing I like to suggest moving the server build into a FROM maven:3-eclipse-temurin-11-focal as kroki-build-server (or similar) section of the servers dockerfile.

And copy the jar from the builder

diff --git a/server/ops/docker/jdk11-alpine/Dockerfile b/server/ops/docker/jdk11-alpine/Dockerfile
index 3b7c7da..cfa482a 100644
--- a/server/ops/docker/jdk11-alpine/Dockerfile
+++ b/server/ops/docker/jdk11-alpine/Dockerfile
@@ -211,7 +211,7 @@ ENV KROKI_PIKCHR_BIN_PATH=/usr/bin/pikchr
 ENV KROKI_D2_BIN_PATH=/usr/bin/d2
 ENV JAVA_OPTS="-Dlogback.configurationFile=/etc/kroki/logback.xml -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory"
 
-COPY --chown=kroki:kroki target/kroki-server.jar /usr/local/kroki/kroki-server.jar
+COPY --from=kroki-builder-server /kroki/target/kroki-server.jar /usr/local/kroki/kroki-server.jar
 
 EXPOSE 8000
@ggrossetie
Copy link
Member

Why not, that's a good idea 👍🏻

@ggrossetie ggrossetie added 🍩 enhancement New feature or request 🐋 docker Related to Docker code labels Mar 22, 2023
@copyrights copyrights linked a pull request Mar 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐋 docker Related to Docker code 🍩 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants