2 Star 4 Fork 0

limeng32 / flying-demo-use-springboot

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Dockerfile 536 Bytes
Copy Edit Web IDE Raw Blame History
limeng32 authored 2018-08-22 20:45 . 采用多层构建方式;
FROM maven:3.5.0-jdk-8-alpine AS builder
ADD ./pom.xml pom.xml
ADD ./src src/
# RUN mvn clean install && cp -f target/flying-demo-use-springboot.jar flying-demo-use-springboot.jar && rm -rf pom.xml src/ target/
RUN mvn clean install
From openjdk:8-jre-alpine
COPY --from=builder target/flying-demo-use-springboot.jar flying-demo-use-springboot.jar
# CMD ["java", "-jar", "flying-demo-use-springboot.jar"]
ENTRYPOINT ["java", "-jar", "flying-demo-use-springboot.jar", "--spring.datasource.password=${MYSQL_PASSWORD}"]

Comment ( 0 )

Sign in for post a comment

1
https://gitee.com/limeng32/flying-demo-use-springboot.git
git@gitee.com:limeng32/flying-demo-use-springboot.git
limeng32
flying-demo-use-springboot
flying-demo-use-springboot
master

Search