2022-02-27 23:19:07 +01:00
|
|
|
---
|
|
|
|
# echo "sec" | podman secret create my_secret -
|
|
|
|
# echo "sec2" | podman secret create my_secret_2 -
|
|
|
|
# echo "sec3" | podman secret create my_secret_3 -
|
2021-07-21 18:22:07 +02:00
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
test:
|
|
|
|
image: busybox
|
|
|
|
command:
|
|
|
|
- /tmp/print_secrets.sh
|
|
|
|
tmpfs:
|
|
|
|
- /run
|
|
|
|
- /tmp
|
|
|
|
volumes:
|
2021-11-24 16:37:17 +01:00
|
|
|
- ./print_secrets.sh:/tmp/print_secrets.sh:z
|
2021-07-21 18:22:07 +02:00
|
|
|
secrets:
|
|
|
|
- my_secret
|
|
|
|
- my_secret_2
|
|
|
|
- source: my_secret_3
|
|
|
|
target: my_secret_3
|
|
|
|
uid: '103'
|
|
|
|
gid: '103'
|
|
|
|
mode: 400
|
|
|
|
- file_secret
|
|
|
|
- source: file_secret
|
|
|
|
target: custom_name
|
|
|
|
- source: file_secret
|
|
|
|
target: /etc/custom_location
|
|
|
|
- source: file_secret
|
|
|
|
target: unused_params_warning
|
|
|
|
uid: '103'
|
|
|
|
gid: '103'
|
|
|
|
mode: 400
|
2024-06-21 14:59:00 +02:00
|
|
|
- source: my_secret
|
|
|
|
target: ENV_SECRET
|
|
|
|
type: env
|
2021-07-21 18:22:07 +02:00
|
|
|
|
|
|
|
secrets:
|
|
|
|
my_secret:
|
|
|
|
external: true
|
|
|
|
my_secret_2:
|
|
|
|
external: true
|
|
|
|
name: my_secret_2
|
|
|
|
my_secret_3:
|
|
|
|
external: true
|
|
|
|
name: my_secret_3
|
|
|
|
file_secret:
|
|
|
|
file: ./my_secret
|