docker 容器部署_根据Docker映像更新已部署的容器

docker 容器部署

Here is how you can update a deployed container after you updated the image on Docker Hub.

在Docker Hub上更新映像后,可以通过以下方法更新已部署的容器。

First you stop the container:

首先,您停止容器:

docker stop <ID or name>

Then you remove the container:

然后删除容器:

docker rm <ID or name>

Then you pull the image from Docker Hub:

然后从Docker Hub提取图像:

docker pull <image name>

Then you start a new container from the image:

然后,从图像开始一个新的容器:

docker run <image name> ...options

Of course that’s not practical to do manually.

当然,手动执行是不实际的。

Applications like Watchtower, deployed as a Docker container, lets you setup an automated workflow for watching changes on Docker Hub (or any other image registry) and automatically gracefully shut down an existing container and restart it with the same options that were used to deploy it initially.

Watchtower这样的应用程序(已部署为Docker容器),使您可以设置自动化的工作流,以监视Docker Hub(或任何其他映像注册表)上的更改,并自动正常关闭现有容器并使用与部署它相同的选项重新启动它原来。

翻译自: https://flaviocopes.com/docker-update-container/

docker 容器部署

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值