forked from dromara/ujcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (20 loc) · 872 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $ docker build -t ujcms:x.x.x --build-arg JAR_FILE=target/ujcms-x.x.x.jar .
#FROM eclipse-temurin:8-jre as builder
FROM eclipse-temurin:11-jre as builder
WORKDIR ujcms
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} ujcms.jar
RUN java -Djarmode=layertools -jar ujcms.jar extract
#FROM eclipse-temurin:8-jre
FROM eclipse-temurin:11-jre
WORKDIR ujcms
COPY --from=builder ujcms/dependencies/ ./
COPY --from=builder ujcms/spring-boot-loader/ ./
COPY --from=builder ujcms/snapshot-dependencies/ ./
COPY --from=builder ujcms/application/ ./
COPY --from=builder ujcms/application/BOOT-INF/classes/application-docker.yaml ./BOOT-INF/classes/config/application.yaml
COPY src/main/webapp/ ./static/
#COPY static/ ./static/
#VOLUME ["/ujcms/static", "/ujcms/config", "/ujcms/BOOT-INF/classes/license"]
EXPOSE 8080
ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]