podman-compose/tests/secrets/docker-compose.yaml
Sam 62aa337f17 feat(secrets): Add support for secrets
Adds support for -
- (1) Declared secrets with the file location.
- (2) Declared secrets with file location, mounted as a different named secret.
- (3) Declared secrets with file location, mounted at arbitrary location.
- (4) External secrets (type=mount), mounted as original secret name.
- (5) External secrets (type=mount), mounted as original secret name, with specified uid, gid and mode.
2021-07-24 02:29:32 +03:00

43 lines
866 B
YAML

version: "3.8"
services:
test:
image: busybox
command:
- /tmp/print_secrets.sh
tmpfs:
- /run
- /tmp
volumes:
- ./print_secrets.sh:/tmp/print_secrets.sh
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
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