echo 's3cr3t' | docker secret create db_pass -

Category: Docker

echo 's3cr3t' | docker secret create db_pass -

Create a swarm secret from stdin

Feeds the secret value through stdin, with - as the file argument, keeping it out of shell history. Swarm secrets mount into tasks as files at /run/secrets. Rotate by creating a new secret and updating the service.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.