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

Add support for docker context, changes required docker constraint #3452

Merged
merged 10 commits into from
Dec 18, 2021

Conversation

rfay
Copy link
Member

@rfay rfay commented Dec 16, 2021

The Problem/Issue/Bug:

The nice new way to specify a docker endpoint instead of complicated $DOCKER_HOST is docker context.

Unfortunately neither the fsouza/go-dockerclient (that we currently use) nor the docker https://github.com/moby/moby has direct support for this, it's all written into the docker cli AFAICT.

How this PR Solves The Problem:

Use docker context inspect to find out the current context's endpoint, then use that for DOCKER_HOST (if DOCKER_HOST is not set).

TODO:

  • Cache the value so we don't have to look it up often
  • Should we support the DOCKER_CONTEXT environment variable?

Manual Testing Instructions:

Try it out with colima or another remote context

Automated Testing Overview:

Related Issue Link(s):

Release/Deployment notes:

This changes the docker constraint to 19.03.9 (oldest version I could find that supported contexts).

As a result, it needs to wait for ddev v1.19.0

@rfay rfay changed the title Add experimental support for docker context Add support for docker context Dec 18, 2021
@rfay rfay changed the title Add support for docker context Add support for docker context, changes required docker constraint Dec 18, 2021
@rfay rfay merged commit 709e748 into ddev:master Dec 18, 2021
@rfay rfay deleted the 20211216_docker_context branch December 18, 2021 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant