Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for DOCKER_HOST in .env files #9871

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

milas
Copy link
Contributor

@milas milas commented Sep 23, 2022

What I did
This reverts commit 126cb98, reversing changes made to b80222f.

Upon further review, we’ve decided to not support dynamically setting DOCKER_HOST via .env files in Compose v2.

Compose v2 is a Docker CLI plugin, and we want to ensure consistent behavior across all CLI plugins, which means using the "inherited" Docker API connection provided to the plugin, respecting all options, such as the active context.

If you were relying on this functionality, I’d recommend taking a look at projects such as direnv, which can automatically set environment variables such as DOCKER_HOST or DOCKER_CONTEXT based on the current directory.

Related issue
Reverts #9817.
JIRA: EN-255

(not mandatory) A picture of a cute animal, if possible in relation with what you did
polar bear face-palming

@milas milas added the kind/bug label Sep 23, 2022
@milas milas requested a review from a team September 23, 2022 19:44
@milas milas self-assigned this Sep 23, 2022
…loaded-envvars"

This reverts commit 126cb98, reversing
changes made to b80222f.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Copy link
Contributor

@ulyssessouza ulyssessouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F

@milas milas merged commit a95cc40 into docker:v2 Sep 26, 2022
@milas milas deleted the revert-docker-host-env branch September 26, 2022 13:26
5HT2 added a commit to effectindex/tripreporter that referenced this pull request Mar 16, 2023
Fixes issues related to docker/compose#9871 (docker-compose versions newer than v2.11.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants