mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-02 12:54:44 +00:00
Update cheatsheets
This commit is contained in:
@@ -14,23 +14,23 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run command in a new container in background and display its ID:
|
||||
|
||||
`docker run --detach {{image}} {{command}}`
|
||||
`docker run {{[-d|--detach]}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a one-off container in interactive mode and pseudo-TTY:
|
||||
|
||||
`docker run --rm --interactive --tty {{image}} {{command}}`
|
||||
`docker run --rm {{[-i|--interactive]}} {{[-t|--tty]}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with passed environment variables:
|
||||
|
||||
`docker run --env '{{variable}}={{value}}' --env {{variable}} {{image}} {{command}}`
|
||||
`docker run {{[-e|--env]}} '{{variable}}={{value}}' {{[-e|--env]}} {{variable}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with bind mounted volumes:
|
||||
|
||||
`docker run --volume {{/path/to/host_path}}:{{/path/to/container_path}} {{image}} {{command}}`
|
||||
`docker run {{[-v|--volume]}} {{/path/to/host_path}}:{{/path/to/container_path}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with published ports:
|
||||
|
||||
`docker run --publish {{host_port}}:{{container_port}} {{image}} {{command}}`
|
||||
`docker run {{[-p|--publish]}} {{host_port}}:{{container_port}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container overwriting the entrypoint of the image:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user