Skip to content

Latest commit

 

History

History

secrets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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