Skip to content

env_file: does not match docker-compose's behavior #848

@thomas-huegel

Description

@thomas-huegel

Describe the bug
docker-compose implicitely uses the .env file to populate variables contained in the file passed to env_file, whereas podman-compose does not.

To Reproduce
.env:

BAR=bar

.foo:

FOO=$BAR

docker-compose.yml:

version: "3"

services:
  example:
    image: busybox
    env_file: .foo
    command: >
      sh -c '
        set | grep FOO
      '

Expected behavior
I would expect podman-compose to behave the same way as docker-compose.

Actual behavior

docker compose up
example-1  | FOO='bar'

podman-compose up
[example] | FOO='$BAR'

Environment:

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

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions