Small improvement to the layering of the Dockerfile
This commit is contained in:
parent
c30ed02659
commit
77ca199b59
11
Dockerfile
11
Dockerfile
@ -1,6 +1,12 @@
|
||||
FROM eclipse-temurin:23 AS build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Create as small a runtime as possible but Spring/Tomcat needs a lot of modules
|
||||
RUN jlink \
|
||||
--output jre \
|
||||
--add-modules java.sql,java.desktop,java.management,java.naming,java.security.jgss,java.instrument
|
||||
|
||||
COPY pom.xml mvnw ./
|
||||
COPY .mvn .mvn
|
||||
|
||||
@ -19,11 +25,6 @@ COPY src src
|
||||
|
||||
RUN ./mvnw compile
|
||||
|
||||
# Create as small a runtime as possible but Spring/Tomcat needs a lot of modules
|
||||
RUN jlink \
|
||||
--output jre \
|
||||
--add-modules java.sql,java.desktop,java.management,java.naming,java.security.jgss,java.instrument
|
||||
|
||||
FROM debian:stable-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
Loading…
x
Reference in New Issue
Block a user