Docker create image
Dockerfile
FROM java:8
MAINTAINER dudu
ADD springts_1-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app.jar"]
create image
docker build -t marvin/spring-boot:latest .
start docker
docker run -d --name spring-docker -p 8080:8080 marvin/spring-boot:latest
zhuyi
需要用mvn打包的jar而不是spring-boot:run生成的jar