1
docker pull java:8
2
mkdir docker_files
3
vim Dockerfile
4
FROM java:8
MAINTAINER xeclass <822210260@qq.com>
ADD heima-springboot-1.0-SNAPSHOT.jar app.jar
CMD java -jar app.jar
5
在docker_files目录上传jar包
6
docker build -f ./Dockerfile -t app .
7
docker images
8
docker run -id -p 宿主机端口:虚拟机端口 app
9
docker ps -a