mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-23 15:51:45 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/docker-context
Normal file
25
tldr/docker-context
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# docker context
|
||||||
|
|
||||||
|
> Switch between contexts to manage multiple Docker environments.
|
||||||
|
> More information: <https://docs.docker.com/reference/cli/docker/context/>.
|
||||||
|
|
||||||
|
- 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`
|
||||||
4
tldr/pwd
4
tldr/pwd
@@ -15,7 +15,3 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
- Print the current directory, and resolve all symlinks (i.e. show the "physical" path):
|
- Print the current directory, and resolve all symlinks (i.e. show the "physical" path):
|
||||||
|
|
||||||
`pwd -P`
|
`pwd -P`
|
||||||
|
|
||||||
- Print the current logical directory:
|
|
||||||
|
|
||||||
`pwd -L`
|
|
||||||
|
|||||||
Reference in New Issue
Block a user