Skip to content

env_file ignored for environment #891

@Vic-M

Description

@Vic-M

Describe the bug
Although podman-compose passes the values in the env_file to the container, it ignores the value in the compose file

To Reproduce
.env

SOME_ENV_VALUE=qqq

docker-compose.yml

version: "3.8"

services:
  container:
    image: some_image
    env_file:
      - ./../.env
     environment:
      SOME_ENV: ${SOME_ENV_VALUE}

Expected behavior

root@7ad1edad1404:/var/www/html# echo $SOME_ENV
qqq
root@7ad1edad1404:/var/www/html# echo $SOME_ENV_VALUE
qqq

Actual behavior

root@7ad1edad1404:/var/www/html# echo $SOME_ENV

root@7ad1edad1404:/var/www/html# echo $SOME_ENV_VALUE
qqq

Output

podman-compose version
podman-compose version 1.0.7
podman version 4.9.3-dev

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