Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在构建期间(不是 docker-compose 特定的 .yml 文件)在 Dockerfile 中使用https://docs.docker.com/engine/swarm/secrets/是否有任何可行的可能性?
注意:Docker 机密仅适用于 swarm 服务,不适用于独立容器。要使用此功能,请考虑调整您的容器以作为规模为 1 的服务运行。
答案是不。秘密仅在 docker swarm 中可用。Swarm 不构建镜像,也不接受 Dockerfile。