Katve
Katve

Reputation: 328

Docker secrets in build-time

Is there any feasible possibility to use https://docs.docker.com/engine/swarm/secrets/ inside Dockerfile during build time (NOT docker-compose specific .yml file)?

Upvotes: 5

Views: 924

Answers (1)

yamenk
yamenk

Reputation: 51906

Note: Docker secrets are only available to swarm services, not to standalone containers. To use this feature, consider adapting your container to run as a service with a scale of 1.

The answer is no. Secretes are only available in docker swarm. Swarm doesn't build images and it doesn't accept a Dockerfile.

Upvotes: 5

Related Questions