Look to the Container Build
In general it is a good idea to take a look in the Dockerfile
to see what base image is being used and what additional software is installed before the taxonomy is built and installed.
Currently the content of the Dockerfile
is the following:
# This is a multi-stage build.
# The first stage is used to prepare the runtime image.
# The second stage is used to build the application.
# The third stage is used to run the application.
# The local versions of the builder and runtime images.
# These are replaced by the CI/CD pipeline.
ARG BUILDER_BASE_IMAGE=clojure:temurin-22-tools-deps-jammy
ARG RUNTIME_BASE_IMAGE=eclipse-temurin:22-jre-alpine
# The image used to run the application
# Here we add the helper software that do not change often.
# Also setup the user that will run the application and
# give it permissions for the application folder.
# This caches the layer and speeds up the build.
FROM $RUNTIME_BASE_IMAGE as runtime
RUN apk add --update --no-cache graphviz ttf-freefont && \
addgroup -S runner && \
adduser -S runner -G runner
# The image used to build the application.
# We copy the entire directory so that we get the benefit
# of caching the dependencies and prepared libraries.
FROM $BUILDER_BASE_IMAGE as builder
WORKDIR /build
COPY . .
# If built in a clean repo, this step is needed
# to prepare the clojure libraries.
RUN clojure -A:prod:build -P
# Build the application uber-jar.
RUN clojure -T:build uber
# The final image that will run the application.
# We copy the built jar and the resources,
# expose the default port and run the application.
FROM runtime
WORKDIR /app
COPY --from=builder /build/target/app.jar app.jar
COPY --from=builder /build/resources/taxonomy.zip resources/taxonomy.zip
COPY --from=builder /build/resources/mappings resources/mappings
RUN chown -R runner:runner /app
USER runner
EXPOSE 3000
CMD java -jar app.jar