一、先构建需要部署的项目
image.png
二、找到对应项目,复制pull更新命令(更新镜像)
image.png
三、在Xshellell中输入pull命令
[root@test28-nginx ~]# docker pull userdev.p.wondersrnd.com:10099/bot/bot-boss:latest
latest: Pulling from bot/bot-boss
f25d82609194: Already exists
529f30ff461e: Already exists
cbd7ba5c7809: Pull complete
3132e07b1c38: Pull complete
891617e8414d: Pull complete
Digest: sha256:b8b278c1121c425eea1cb8c1c7eaa9ff3f50e5465f12358cd98f7b6dcac5dcbd
Status: Downloaded newer image for userdev.p.wondersrnd.com:10099/bot/bot-boss:latest
四、移除老容器
[root@test28-nginx ~]# docker rm -f bot-boss
bot-boss
五、运行新镜像
[root@test28-nginx ~]# docker run -p 8086:8086 -d --name=bot-boss --restart=always userdev.p.wondersrnd.com:10099/bot/bot-boss
65779a3489ce3c4ea5d5bf0c65f63a90ae4fd271253bc680b7c3af698685b4a0
完成。
//查看日志
docker logs -f bot-boss
//显示文件
docker ps
//移除容器
docker rm -f bot-tenant-boss