-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix support TLS configuration from docker context #2130
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
Fix support TLS configuration from docker context #2130
Conversation
initial implementation was done based on docker documentation of output of CLI, which is different that real files stored by docker
This is fixed for my PR #2105 |
It is connected to my other PR in testcontainers testcontainers/testcontainers-java#7178 |
@eddumelendez I noticed that my initial implementation was wrong as I based it on documentation from docker cli not looking at real files on filesystem, this time I did full check and make it work with test container, so it should be fine to merge this and connected PR in testcontainers |
Can you please share links to the documentation, etc as part of the PR description? |
here is link to documentations https://github.com/docker/cli/blob/a0756c3c2cacebf5e5dc6454cc280c3ddf675176/docs/reference/commandline/context_inspect.md?plain=1#L42 |
some insight can be found in here https://github.com/docker/cli/blob/33c7baa7edf962559a07c1fb59581f863a7e8862/cli/context/store/store.go#L26 |
I think a need a clear description. Those links are not helping. Thanks |
I don't know what kind of description you have in mind but let me summarised what happen. Initial support for docker context was lacking support for TLS, so it was not working in case you want to use docker remote with TLS - this was initial support #2036 In attempt to extend it I created PR #2105, but I assumed that was is described as output of In my next attempt (this PR) I dig dipper what in fact is stored in ~/.docker/contexts and there are two folders for metadata and for tls.
This PR is relying on folder structure to pick up TLS information and provide them to docker-java when context is used. I hope it is enough, but if not, let me know what more I can do to make this merged |
docker-java-core/src/main/java/com/github/dockerjava/core/DockerContextMetaFile.java
Show resolved
Hide resolved
Thanks! Indeed, it helps. I wanted to clarify this before to continue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For further reference, I tested it following https://blog.devgenius.io/docker-security-securing-docker-daemon-using-tls-5234b4782047
Thanks for your contribution, @piotrwielgolaski-tomtom ! |
initial implementation was done based on docker documentation of output of CLI, which is different that real files stored by docker