Our great sponsors
-
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.
To compute a helpful baseline, we need a sample project. I created one just for this purpose: it's a relatively small Kotlin project.
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.
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"]