What is Docker client?
The Docker client ( docker ) is the primary way that many Docker users interact with Docker. When you use commands such as docker run , the client sends these commands to dockerd , which carries them out. The docker command uses the Docker API. The Docker client can communicate with more than one daemon.
How to configure docker client?
You can configure docker client using 2 ways.
- Environment variables
- config.json
Location of config.json?
By default, the Docker command line stores its configuration files in a directory called .docker within your $HOME directory. Docker manages most of the files in the configuration directory and you should not modify them. However, you can modify the config.json file to control certain aspects of how the docker command behaves.
To specify a different directory, use the DOCKER_CONFIG environment variable or the –config command line option. If both are specified, then the –config option overrides the DOCKER_CONFIG environment variable. The example below overrides the docker ps command using a config.json file located in the ~/testconfigs/ directory.
$ docker –config ~/testconfigs/ ps
Working with Docker Config Command

Environment variables
For easy reference, the following list of environment variables are supported by the docker command line:
DOCKER_API_VERSIONThe API version to use (e.g.1.19)DOCKER_CONFIGThe location of your client configuration files.DOCKER_CERT_PATHThe location of your authentication keys.DOCKER_CLI_EXPERIMENTALEnable experimental features for the cli (e.g.enabledordisabled)DOCKER_DRIVERThe graph driver to use.DOCKER_HOSTDaemon socket to connect to.DOCKER_NOWARN_KERNEL_VERSIONPrevent warnings that your Linux kernel is unsuitable for Docker.DOCKER_RAMDISKIf set this will disable ‘pivot_root’.DOCKER_STACK_ORCHESTRATORConfigure the default orchestrator to use when usingdocker stackmanagement commands.DOCKER_TLSWhen set Docker uses TLS.DOCKER_TLS_VERIFYWhen set Docker uses TLS and verifies the remote.DOCKER_CONTENT_TRUSTWhen set Docker uses notary to sign and verify images. Equates to--disable-content-trust=falsefor build, create, pull, push, run.DOCKER_CONTENT_TRUST_SERVERThe URL of the Notary server to use. This defaults to the same URL as the registry.DOCKER_HIDE_LEGACY_COMMANDSWhen set, Docker hides “legacy” top-level commands (such asdocker rm, anddocker pull) indocker helpoutput, and onlyManagement commandsper object-type (e.g.,docker container) are printed. This may become the default in a future release, at which point this environment-variable is removed.DOCKER_TMPDIRLocation for temporary Docker files.DOCKER_CONTEXTSpecify the context to use (overrides DOCKER_HOST env var and default context set with “docker context use”)DOCKER_DEFAULT_PLATFORMSpecify the default platform for the commands that take the--platformflag.
Because Docker is developed using Go, you can also use any environment variables used by the Go runtime. In particular, you may find these useful:
HTTP_PROXYHTTPS_PROXYNO_PROXY
Docker Tutorials Fundamental To Advanced-2021 Crash Course:- https://bit.ly/3hOIbTB
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND