Remove support for DOCKER_HOST
in .env
files
#9871
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
orDOCKER_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