结果:
报错如下:
dockfile文件如下:
ARG BASE_IMAGE
FROM ${BASE_IMAGE} as builder
WORKDIR /app
ARG JAR_FILE=target/dms-cloud-auto-bid-start-1.0.0-SNAPSHOT.jar
ADD ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
#RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo “Asia/Shanghai” > /etc/timezone
WORKDIR /app
COPY –from=builder app/dependencies/ ./
COPY –from=builder app/spring-boot-loader/ ./
COPY –from=builder app/snapshot-dependencies/ ./
COPY –from=builder app/application/ ./
EXPOSE 8080
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom org.springframework.boot.loader.JarLauncher
`