fix (buildx) : BuildX failing for Docker CLI on MacOS #1754
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.
Description
Related to #1749
Revert workaround for checking docker version added in fix (buildx) : Always pass --config option for latest versions of Docker CLI (#1701) #1703 for checking whether to add
docker --config
flag or not. We need to always add config to builder whenever it involves pulling or pushing images.Currently Docker CLI on Mac OS don't seem to respect
--config
flag. When DMP tries to override default Docker config directory by providing--config
flag, Docker CLI is no longer able to recognize buildx options. This seems to happening for scenarios where docker-buildx is installed in~/.docker/cli-plugins
, wheneverdocker --config new/path/config
is provided docker CLI uses new config path (which does not contain buildx). See Buildx not work properly on Mac with Apple Silicon chip docker/for-mac#6928 (comment)Add a workaround to copy
docker-buildx
binary to temporary config directory created for docker buildx build. This seems to make docker recognize buildx even after config override.