2020-11-10 19:39:51 +00:00
|
|
|
# docker secret
|
|
|
|
|
|
|
|
> Manage Docker swarm secrets.
|
|
|
|
> More information: <https://docs.docker.com/engine/reference/commandline/secret/>.
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Create a new secret from `stdin`:
|
2020-11-10 19:39:51 +00:00
|
|
|
|
|
|
|
`{{command}} | docker secret create {{secret_name}} -`
|
|
|
|
|
|
|
|
- Create a new secret from a file:
|
|
|
|
|
|
|
|
`docker secret create {{secret_name}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- List all secrets:
|
|
|
|
|
|
|
|
`docker secret ls`
|
|
|
|
|
|
|
|
- Display detailed information on one or multiple secrets in a human friendly format:
|
|
|
|
|
|
|
|
`docker secret inspect --pretty {{secret_name1 secret_name2 ...}}`
|
|
|
|
|
|
|
|
- Remove one or more secrets:
|
|
|
|
|
|
|
|
`docker secret rm {{secret_name1 secret_name2 ...}}`
|