修改 Dockerfile

This commit is contained in:
nekolr 2020-04-21 15:23:03 +08:00
parent c5e0b94ca3
commit 1e6f40dada

View File

@ -1,13 +1,20 @@
FROM java:8
#FROM maven:3.6.1-jdk-8-alpine AS build
# https://github.com/nekolr/maven-image/tree/master/3.6.1-jdk-8
FROM nekolr/maven:3.6.1 AS build
MAINTAINER octopus
RUN mkdir -p /usr/src/app
RUN mkdir -p /spider-flow
WORKDIR /usr/src/app
WORKDIR /spider-flow
COPY . .
RUN mvn clean package
FROM openjdk:8-jdk-alpine
COPY --from=build /usr/src/app/spider-flow-web/target/spider-flow.jar .
EXPOSE 8088
ADD ./spider-flow-web/target/spider-flow.jar ./
CMD sleep 30;java -Djava.security.egd=file:/dev/./urandom -jar spider-flow.jar
CMD java -jar spider-flow.jar