Support docker context#2036
Merged
eddumelendez merged 18 commits intodocker-java:masterfrom Feb 7, 2023
skagedal:support-docker-context
Merged
Support docker context#2036eddumelendez merged 18 commits intodocker-java:masterfrom skagedal:support-docker-context
eddumelendez merged 18 commits intodocker-java:masterfrom
skagedal:support-docker-context
Conversation
eddumelendez
requested changes
Jan 9, 2023
Member
eddumelendez
left a comment
There was a problem hiding this comment.
Thanks for the PR @skagedal ! I have left some comments. Indeed, this is something we would like to support
docker-java-core/src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
eddumelendez
reviewed
Feb 6, 2023
Member
eddumelendez
left a comment
There was a problem hiding this comment.
Thanks for the contribution @skagedal! I've left a few suggestions.
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
docker-java/src/test/java/com/github/dockerjava/core/DockerClientBuilderTest.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Outdated
Show resolved
Hide resolved
…erContextMetaFile.java Co-authored-by: Eddú Meléndez Gonzales <[email protected]>
…entBuilderTest.java Co-authored-by: Eddú Meléndez Gonzales <[email protected]>
Co-authored-by: Eddú Meléndez Gonzales <[email protected]>
eddumelendez
approved these changes
Feb 7, 2023
Member
|
Thanks for your contribution, @skagedal ! This is now merged in |
Contributor
|
@eddumelendez I think #1946 can be closed now. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Opening up this proof-of-concept pull request to support docker contexts. The end goal for me would be to be able to run testcontainers tests running in a Docker environment such as Colima without having to set specific environment variables like
DOCKER_HOSTand instead have it just work, but the use case can of course be other things.I know this isn't up to par to get merged, regarding code style and test coverage, but before I work any further I'd love to get just some input on whether the general idea is right.
So, what it does is that it's looking for the
currentContextsetting in the~/.docker/config.jsonfile and then matching that to the context description file in~/.docker/contexts/meta/. This is briefly documented here but the details of the file format I have just inferred from looking at the files set up on my system.Implements issue #1946.