Faster Maven builds in Docker

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • fast-maven-builds

  • To compute a helpful baseline, we need a sample project. I created one just for this purpose: it's a relatively small Kotlin project.

  • buildkit

    concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit

  • The last command line used the DOCKER_BUILDKIT environment variable. It's the way to tell Docker to use the legacy engine. If you didn't update Docker for some time, it's the engine that you're using. Nowadays, BuildKit has superseded it and is the new default.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • maven-mvnd

    Apache Maven Daemon

  • FROM openjdk:11-slim-buster as build ADD https://github.com/mvndaemon/mvnd/releases/download/0.6.0/mvnd-0.6.0-linux-amd64.zip . #1 RUN apt-get update \ #2 && apt-get install unzip \ #3 && mkdir /opt/mvnd \ #4 && unzip mvnd-0.6.0-linux-amd64.zip \ #5 && mv mvnd-0.6.0-linux-amd64/* /opt/mvnd #6 COPY .mvn .mvn COPY mvnw . COPY pom.xml . COPY src src RUN /opt/mvnd/bin/mvnd -B package #7 FROM openjdk:11-jre-slim-buster COPY --from=build target/fast-maven-builds-1.4.jar . EXPOSE 8080 ENTRYPOINT ["java", "-jar", "fast-maven-builds-1.4.jar"]

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts