Skip to content

No error for --env-file if the ./env file does not exist #6853

@asglover

Description

@asglover

Description

This would be really nice QoL improvement for devcontainers. Many devs will have personal .env files with API keys for services, but it's annoying to have to make an empty .env file just so that the docker CLI doesn't error at you. You can do a workaround by using "initialize command" "source .env". I believe this behavior is different than docker compose which lets you provide a path with no file actual file necessary.

I believe the fix would be straightforward just having a different default behavior for the parser which powers this features. If you would like I can make a PR.

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