-
Notifications
You must be signed in to change notification settings - Fork 567
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
using invalid format for service secrets doesn't fail, but misbehaves instead
Steps to reproduce the behavior
- create a secret
echo "aaa" | podman secret create test-secret - - create
docker-compose.yml
services:
tester:
image: debian:trixie-slim
command: "tail -f /dev/null"
container_name: tester
init: true
secrets:
test-secret: # this is not valid according to [docker compose spec](https://docs.docker.com/reference/compose-file/services/#secrets)
source: test-secret
type: env
target: MY_VAR
secrets:
test-secret:
external: true
- run
docker compose up -d
Expected behavior
the command fails because services.tester.secrets in the docker compose file is invalid
Actual behavior
command runs, and the secret test-secret is mounted to /run/secrets/test-secret, but not as env variable
Output
$ podman-compose version
podman-compose version 1.5.0
podman version 5.7.0
Additional context
Reason for this is likely that dicts in python are enumerable and this line here
enumerates keys of secrets dict, which is incorrect behaviour here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working