Skip to content

disable env variable substitution in docker compose env files #7648

@simonm11

Description

@simonm11

I updated docker and notice a significant change of behavior when using my env files in docker-compose

I have the following:

env_file:
      - ./file.env

and, in file.env

property=${something}

Before updating, doing echo $property in my running container would produce the string ${something}. Which was what I wanted.

Now (docker 19.03.12), $property is empty because docker is trying to find $something from my system env variables.

What caused this change of behavior? Is there a way to disable it or work around it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions