Some best practices on using multi-stage build to supercharge your docker build process, also some details about Buildkit for improved build experience
COPY src ./src RUN mvn -e -B package -DskipTests FROM openjdk:8-jre-alpine AS release COPY --from=builder /app/target/hello.jar /hello.jar ENTRYPOINT [ "java" , "-cp", "/hello.jar", "Hello"] FROM builder AS test RUN mvn -e -B test FROM release AS debug RUN apk add --no-cache strace ENTRYPOINT [ "ash"]