Skip to content

Environment Variables values are not interpolated #1115

Open
@achdmbp

Description

@achdmbp

Description:

When specifying an environment variable under the services environment section with interpolation (e.g., MYENV=${DEBUG-1}), the container is created with MYENV set to the literal value "${DEBUG-1}" instead of 1 when the DEBUG environment variable is not set.

Steps to Reproduce:

  1. Define a service in your docker-compose.yml file with an environment variable that uses interpolation:
    services:
      myservice:
        environment:
          - MYENV=${DEBUG-1}
  2. Ensure the DEBUG environment variable is not set in your shell.
  3. Run podman-compose up.

Expected Behavior:

The container should be created with MYENV set to 1 when the DEBUG environment variable is not set.

Actual Behavior:

The container is created with MYENV set to the literal value "${DEBUG-1}".

Additional Information:

  • podman-compose version: 1.3.0
  • podman version: 5.2.2
  • Operating System: Linux workspaced50dd4e90744453d-574f885c55-d4494 5.14.0-284.96.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 29 13:37:02 EST 2024 x86_64 x86_64 x86_64 GNU/Linux

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