@@ -89,6 +89,16 @@ Create the specified secret via stdin.
89
89
$ printf <secret> | podman secret create my_secret -
90
90
```
91
91
92
+ Create or rotate a cryptographically secure random secret just under the maximum ` 512000 ` bytes via stdin.
93
+ ```
94
+ openssl rand -base64 378000 | podman secret create --replace my_secret -
95
+ ```
96
+
97
+ Mount local file based secret securely in a container.
98
+ ```
99
+ podman run --rm --secret source=my_secret,type=mount,uid=1001,gid=1001,mode=440 docker.io/library/alpine ls -l /run/secrets/my_secret
100
+ ```
101
+
92
102
Create gpg encrypted secret based on local file using the pass driver.
93
103
```
94
104
$ podman secret create --driver=pass my_secret ./secret.txt.gpg
@@ -100,8 +110,9 @@ $ podman secret create --env=true my_secret MYSECRET
100
110
```
101
111
102
112
## SEE ALSO
103
- ** [ podman(1)] ( podman.1.md ) ** , ** [ podman-secret(1)] ( podman-secret.1.md ) ** , ** [ podman-login(1)] ( podman-login.1.md ) **
113
+ ** [ podman(1)] ( podman.1.md ) ** , ** [ podman-secret(1)] ( podman-secret.1.md ) ** , ** [ podman-login(1)] ( podman-login.1.md ) ** , ** [ podman-run(1) ] ( podman-run.1.md ) **
104
114
105
115
## HISTORY
106
- January 2021, Originally compiled by Ashley Cui < acui@redhat.com >
107
- February 2024, Added example showing secret creation from an environment variable by Brett Calliss < brett@obligatory.email >
116
+ * January 2021, Originally compiled by Ashley Cui < acui@redhat.com >
117
+ * February 2024, Added example showing secret creation from an environment variable by Brett Calliss < brett@obligatory.email >
118
+ * May 2025, Added example showing secure secret generation / rotation & mounting by [ Stuart Cardall] ( https://github.com/itoffshore )
0 commit comments