Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 674 Bytes

README.md

File metadata and controls

54 lines (39 loc) · 674 Bytes

Docker Secrets

Sample secret

less mysecret.txt
less docker-compose.yml

Deploy stack with secrets from local file

Init swarm if not yet a swarm

docker swarm init
docker stack deploy -c docker-compose.yml secret
docker service logs -f secret_test

existing secret

echo "some other secret" | docker secret create manual_secret -
docker stack deploy -c external-compose.yml external_secret
docker service logs -f external_secret_test

Clean up

docker stack rm secret
docker stack rm external_secret
docker swarm leave --force