moby / moby/moby

Create a function in the client/options.go to enable setting TLS verification flag

Open
#46,598 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature status/0-triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.