Describe the bugdocker-compose searches the env file relatively to the working directory.
podman-compose searches the env file relatively to the directory containing the docker-compose.yml passed via the -f option.
To Reproduce
docker-compose.yml:
version: "3"
services:
example:
image: busybox
environment:
- FOO=${FOO}
command: >
sh -c '
set | grep FOO
'
env-files/my-env:
FOO=foo
This works for docker-compose and not for podman-compose:
cd env-files
docker compose --env-file my-env -f ../docker-compose.yml up
podman-compose --env-file my-env -f ../docker-compose.yml up
This works for podman-compose and not for docker-compose:
cd env-files
docker compose --env-file env-files/my-env -f ../docker-compose.yml up
podman-compose --env-file env-files/my-env -f ../docker-compose.yml up
Expected behavior
I would expect podman-compose to behave the same way as docker-compose.
Describe the bug
docker-compose
searches the env file relatively to the working directory.podman-compose
searches the env file relatively to the directory containing thedocker-compose.yml
passed via the-f
option.To Reproduce docker-compose.yml:
env-files/my-env:
This works for docker-compose and not for podman-compose:
This works for podman-compose and not for docker-compose:
Expected behavior I would expect podman-compose to behave the same way as docker-compose.
Environment:
Thanks!