gpt4 book ai didi

docker - docker-compose文件vs docker bundle

转载 作者:行者123 更新时间:2023-12-02 20:47:50 28 4
gpt4 key购买 nike

之前已经问过这个问题,但我不确定当时是否可以使用docker-compose文件完成docker堆栈部署。
由于最新版本支持使用compose将服务部署到堆栈,因此,我无法理解dab文件的值。

我检查了通过compose创建的dab文件,并且JSON中的结构类似于compose中的yml服务设置。

那么,dab是否已死,或者compose无法提供某些赎回功能?

最佳答案

What is the value of the DAB (Distributed Application Bundle) file?



根据GitHub上以下关于 “docker stack deploy”路线图issue,DAB文件表示跨不同Swarm环境的多图像应用程序的可移植 bundle 格式。

如你所说:

"the dab file created out of compose and the structure in json resembles the yml services setup in compose"



除了应用程序 bundle 包文件之外,您还需要在部署期间针对每个Swarm环境附加一个特定的配置文件。这样,您将获得关注点分离:
  • bundle 文件将是核心和静态内容;
  • 配置文件将是经常更改的内容,
    让我们假设,例如,配置, secret 对象等。

  • 引用正式的Docker文档 here,此功能仍处于试验阶段。这似乎是一个不错的主意,它将有助于避免编写冗长且参数化的堆栈文件,从而导致难以维护。

    正如 Moby project的维护者之一所说,在以下 GitHub issue中,“ docker stack deploy ”的默认行为应为 bundle 包名称。

    关于docker - docker-compose文件vs docker bundle ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48613392/

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