Skip to content

Instantly share code, notes, and snippets.

@PetrGlad
Last active April 6, 2024 16:57
Show Gist options
  • Save PetrGlad/d2955348a7c5afb55c9226789cd0f4e3 to your computer and use it in GitHub Desktop.
Save PetrGlad/d2955348a7c5afb55c9226789cd0f4e3 to your computer and use it in GitHub Desktop.
$ echo "ertyoiu" | podman secret create asdf -
c680db24d26dc024f36f90e90
$ podman secret ls
ID NAME DRIVER CREATED UPDATED
c680db24d26dc024f36f90e90 asdf file 5 seconds ago 5 seconds ago
$ podman run --rm -ti --secret asdf alpine
/ # ls /var/run/secrets/
asdf
/ # ls /var/run/secrets/asdf
/var/run/secrets/asdf
/ # cat /var/run/secrets/asdf
ertyoiu
/ # export SECRET_VALUE=$(cat /var/run/secrets/asdf)
/ # echo $SECRET_VALUE
ertyoiu
/ #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment