【发布时间】:2020-08-07 12:14:03
【问题描述】:
在开发环境中,将 docker-compose 与为 Docker Swarm 制作的 compose 文件一起使用,例如:
version: "3.8"
services:
some-service:
image: nginx
ports:
- "8080:80"
configs:
- source: some-config
target: /etc/nginx/nginx.conf
configs:
some-config:
external: true
总是有这样的警告:
WARNING: Some services (some-service) use the 'configs' key, which will be ignored. Compose does not support 'configs' configuration - use `docker stack deploy` to deploy to a swarm.
此主文件用于生产,并与其他 compose 文件组合,添加绑定挂载和调试配置,但不知道如何删除“configs”键。
有没有办法通过撰写文件覆盖来抑制此警告或删除“configs”键?
【问题讨论】:
-
你能分享你的撰写文件吗?
标签: docker docker-compose yaml