gpt4 book ai didi

Docker 从私有(private)存储库中拉取图像并拉取图像上的更改

转载 作者:行者123 更新时间:2023-12-02 19:34:28 25 4
gpt4 key购买 nike

我想管理一个 docker 私有(private)存储库,以便使用不安全协议(protocol)(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 ,您的工作流程/设置应该允许您:
  • pull新形象
  • stop您正在运行的容器
  • 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.



    这里提到: The misunderstood Docker tag: latest

    关于Docker 从私有(private)存储库中拉取图像并拉取图像上的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47346179/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com