问题描述
我有 3 个 docker 镜像,我的构建管道将这些镜像推送到我的私有 docker 注册表。它们是前端、后端和带有最新标签的 api。
我在其他服务器上运行 docker swarm,我使用 Portainer 作为 GUI。在 Swarm 中,我在一个堆栈中有 3 个独立的服务。
目前,每当我成功构建并在注册表中有最新图像时,我都必须为 Swarm 中的每个服务手动更新和拉取最新图像。我现在正在配置我的私有注册表以向 Portainer 发送通知,以便它可以自动提取最新图像和更新服务。
但是,在私有 docker 注册表的 config.yml 中,我不断收到错误消息,因为即使 endpoints
是复数,它似乎只能接受一个。每个服务都有一个不同的 webhook url,注册中心应该能够通知它。所以我需要 3 个端点而不是 1 个。
所以这显然不起作用,因为它使用 - 和:按顺序:
notifications:
events:
includereferences: true
endpoints:
- name: frontend
disabled: false
url: http://000.000.00.000:9000/api/webhooks/0000000-0000-000-00-00000
headers:
Accept:
- application/json
timeout: 5s
threshold: 10
backoff: 30s
ignore:
actions:
- pull
- name: backend
disabled: false
url: http://000.000.00.000:9000/api/webhooks/0000000-0000-000-00-00001
headers:
Accept:
- application/json
timeout: 5s
threshold: 10
backoff: 30s
ignore:
actions:
- pull
- name: api
disabled: false
url: http://000.000.00.000:9000/api/webhooks/0000000-0000-000-00-00002
headers:
Accept:
- application/json
timeout: 5s
threshold: 10
backoff: 30s
ignore:
actions:
- pull
我也不能使用类似的东西:
endpoints:
frontend:
- name: frontend
...
backend:
- name: backend
...
是否可以为此用例编写适当的配置?
感谢您的任何见解, 干杯
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)