Docker multi-stage build for efficiency
The problem with the single-stage build
FROM openjdk:17
WORKDIR /app
COPY . .
RUN ./mvnw package
CMD ["java", "-jar", "target/myapp.jar"]
Above code is the example of the single stage build
The issue with this approach
Large image size - Since the ...
why-not-to-run-doc-containers-as-root.hashnode.dev2 min read