1 手动制作1
2
3
4
5
6
7
8
9docker run -itd XXX
docker attach xxx
ctrl +p +q 不关闭容器 从新定位到本地目录
docker cp /Users/xx a5:/usr/xx
docker commit a5 java
把镜像导出为压缩文件
docker save -o service.tar a5
ocker load -i service.tar
docker tag fd12 java:zhuanli
2 Dockerfile1
2
3FROM java
MAINTAINER zhuanli
COPY xx /usr/xx
运行1
docker build -t java:zhuanli .
3 docker-compose.yml1
2
3
4
5
6
7
8version: "3"
services:
sharelist:
image: java
volumes:
- /home/zhuanli/java:/app/cache
ports:
- "33001:33001"