Skip to content

support --env-file in docker-compose run command #8379

@briceburg

Description

@briceburg

NOTE: this is different than the .env file that is read by docker-compose commands and used for substitutions in the composition file... first mentioned here: #6170 (comment)


We generate an env file that we would like to include via the docker-compose run command. e.g.

echo "FOO=bar" > vars.env
docker-compose run --env-file=vars.env --rm test-service

docker run supports this flag and it would be great if we saw docker-compose run maintain parity.

Is there planned support for this feature -- or will it be implemented in composev2 / "docker compose" ?

our generated vars file is cumbersome (with multiline values) and relatively complicated to convert to various -e FOO=bar flags...

thanks!

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