愿您有个好心情
2 years ago
1 changed files with 32 additions and 14 deletions
@ -1,14 +1,32 @@ |
|||||
#编排容器 |
# docker-compose 部署 |
||||
|
|
||||
|
militar-security 项目使用 docker-compose 部署文件 |
||||
|
## 命令 |
||||
|
|
||||
|
- 编排容器 |
||||
|
|
||||
docker-compose up -d --build |
docker-compose up -d --build |
||||
#打包镜像 |
|
||||
docker save -o military2.0.tar military-system:2.0 military-earth:2.0 military-web:2.0 |
- 打包镜像 |
||||
#导入镜像 |
|
||||
|
docker save military-system:2.0 military-earth:2.0 military-web:2.0 -o military2.0.tar |
||||
|
|
||||
|
- 导入镜像 |
||||
|
|
||||
docker load -i military.tar |
docker load -i military.tar |
||||
|
|
||||
|
- 启动容器 |
||||
|
|
||||
|
docker-compose -p #{项目名称} up -d |
||||
|
|
||||
|
- 启动已经存在的服务容器启动容器 |
||||
|
|
||||
|
docker-compose start |
||||
|
|
||||
|
- 停止容器 |
||||
|
|
||||
|
docker-compose stop |
||||
|
|
||||
|
- 停止 up 命令所启动的容器,并移除网络 |
||||
|
|
||||
#运行后台镜像 |
docker-compose down |
||||
docker run -d --name military-system -p 8049:8049 -v \你自己的路径\application-prod.yml:/military/config/application-prod.yml -v \你自己的路径\opt\upFiles:/opt/upFiles military-system:2.0 |
|
||||
#运行前端服务镜像 |
|
||||
docker run -d --name military-web -p 3001:3001 military-web:2.0 |
|
||||
#运行地图服务镜像 |
|
||||
docker run -d --name military-earth -p 3000:3000 military-earth:2.0 |
|
Loading…
Reference in new issue