Docker 从私有存储库中拉取图像并拉取对图像的更改
Docker pull images from private repository and pulling changes on images
我想管理一个 docker 私人存储库,以便使用不安全的协议 (http) 拉取图像,我的问题是:当我拥有的图像发生某些变化时,可以拉取对图像的更改存储库或者我必须再次拉取所有图像??
例如,当我在存储库中的图像中的代码发生某些变化,然后我在我的服务器上重建它时,我想从任何 pc 上提取这些变化......像 git我是说
谢谢大家!
It is possible to pull changes on images when something changes on the image I have in the repository or I have to pull all the images again?? For example when something changes on the code that I have in the images in the repository and then I rebuild it on my server I would like to pull that changes from any pc... Something like git I mean
您不能像 git
那样只提取更改。 Docker 拉取镜像,这意味着在镜像更新后 运行 新容器。如此处所述:How to upgrade docker container after its image changed,您的 workflow/setup 应该允许您:
pull
新图片
stop
你的 运行ning 容器
remove
它
run
又是新版本
我认为您还应该对 tags
做一些研究,这可能会对您有所帮助。由于您正在更新代码,因此您可以使用具有不同标签的图像。我发现了这个问题:How to update a Docker Image 里面有很多你可能想用的有用的东西。
另外,如果您使用 :latest
标签,您应该记住以下几点:
If you are shipping Docker images to a production environment, you should just ignore the latest tag
. Don’t use it. Don’t be tempted by it. It’s easy to look at it and think that your deployment script should just pull “latest” and your build process will ensure that’s valid. It takes a lot of discipline to make that work. Just version your tags. Every time.
我想管理一个 docker 私人存储库,以便使用不安全的协议 (http) 拉取图像,我的问题是:当我拥有的图像发生某些变化时,可以拉取对图像的更改存储库或者我必须再次拉取所有图像??
例如,当我在存储库中的图像中的代码发生某些变化,然后我在我的服务器上重建它时,我想从任何 pc 上提取这些变化......像 git我是说
谢谢大家!
It is possible to pull changes on images when something changes on the image I have in the repository or I have to pull all the images again?? For example when something changes on the code that I have in the images in the repository and then I rebuild it on my server I would like to pull that changes from any pc... Something like git I mean
您不能像 git
那样只提取更改。 Docker 拉取镜像,这意味着在镜像更新后 运行 新容器。如此处所述:How to upgrade docker container after its image changed,您的 workflow/setup 应该允许您:
pull
新图片stop
你的 运行ning 容器remove
它run
又是新版本
我认为您还应该对 tags
做一些研究,这可能会对您有所帮助。由于您正在更新代码,因此您可以使用具有不同标签的图像。我发现了这个问题:How to update a Docker Image 里面有很多你可能想用的有用的东西。
另外,如果您使用 :latest
标签,您应该记住以下几点:
If you are shipping Docker images to a production environment, you should just ignore the
latest tag
. Don’t use it. Don’t be tempted by it. It’s easy to look at it and think that your deployment script should just pull “latest” and your build process will ensure that’s valid. It takes a lot of discipline to make that work. Just version your tags. Every time.