Docker context
A saved setting that tells the Docker CLI which Docker daemon to talk to.
In more detail
A context holds the endpoint (a local socket or a remote host) and credentials. docker context use switches between them, so the same docker commands can manage your laptop, a build server or a remote host. docker version -f "{{.Client.Context}}" shows the current one. Not the same as a build context.
Related terms
- Docker CLI — The docker command you type into a terminal; it sends requests to the Docker daemon and prints the answers.
- Docker daemon — The background program that owns images, containers, networks and volumes and does the work the docker command asks for.
- build context — The set of files you hand to docker build, usually the current directory given as the final dot.
Taught in
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers