Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--env-file option does not match docker-compose's behavior #847

Open
thomas-huegel opened this issue Feb 17, 2024 · 0 comments
Open

--env-file option does not match docker-compose's behavior #847

thomas-huegel opened this issue Feb 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@thomas-huegel
Copy link

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 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.

Environment:

  • OS: Linux
  • podman version: 4.9.2
  • podman compose version: 1.0.6

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant