Skip to content

Move installLocalDependencies and buildServer to Dockerfile #1481

Open
@copyrights

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions