Create a function in the client/options.go to enable setting TLS verification flag
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 72.1k
- Forks
- 19.2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 164
Description
Description
Currently, it's only possible to enable or disable TLS verification through environment variables on client/options
Currently, the client reads the environment variable DOCKER_TLS_VERIFY to decide to verify the TLS or not.
To use the client as a SDK, it would be great to have the option to pass the TLS verification flag through a function parameter.
WithTLSClientConfigFromEnv is where the DOCKER_TLS_VERIFY and DOCKER_CERT_PATH variable are read.
There is also the WithTLSClientConfig function, where you can set the certificate paths without necessarily reading from environment variables. However, it's not possible to set the TLS verify through this function
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in client/options.go by reading WithTLSClientConfigFromEnv and WithTLSClientConfig, focusing on how the TLS verification setting is derived. Add the requested client option so verification can be set without relying on DOCKER_TLS_VERIFY, while preserving the existing certificate-path behavior. Done means SDK users can configure TLS verification through the client options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100