Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-18 00:18:35 +00:00
parent 9cdd033c95
commit a9720510d1
43 changed files with 362 additions and 132 deletions

View File

@@ -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: