mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-09 00:53:24 +02:00
docker-context: add page (#15070)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
5a43246280
commit
c82637811e
1 changed files with 20 additions and 0 deletions
20
pages/common/docker-context.md
Normal file
20
pages/common/docker-context.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 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`
|
Loading…
Add table
Reference in a new issue