diff --git a/pages/common/docker-context.md b/pages/common/docker-context.md new file mode 100644 index 000000000..60ca757bc --- /dev/null +++ b/pages/common/docker-context.md @@ -0,0 +1,20 @@ +# docker context + +> Switch between contexts to manage multiple Docker environments. +> More information: . + +- Create a context using a specific Docker endpoint: + +`docker context create {{my_context}} --docker "host={{tcp://remote-host:2375}}"` + +- Create a context based on the `DOCKER_HOST` environment variable: + +`docker context create {{my_context}}` + +- Switch to a context: + +`docker context use {{my_context}}` + +- List all contexts: + +`docker context ls`