diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-11-25 21:18:52 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-11-25 21:18:52 +0100 |
commit | 2d91bf16ed944c592820295b34d51ee45733f1b6 (patch) | |
tree | 32c24a60ff0956488f42785e7e4a749ba346ba08 | |
parent | a5f8dad427865bda921d9c2f92079c9f2710b8f6 (diff) |
Add docker sheet
-rw-r--r-- | docker.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docker.md b/docker.md new file mode 100644 index 0000000..4443e13 --- /dev/null +++ b/docker.md @@ -0,0 +1,13 @@ +# Docker containers + +## `docker run` + +* `--rm` will remove the Docker container after running the command (otherwise + have to do it manually if you want to run another one-shot command) +* `-v <local path>:<container path>`: mount a volume +* `--entrypoint <command>`: use custom entry point, not from Dockerfile. Specify + just the command, give arguments after specifying image. + +## `docker exec` + +Runs a command against a *running* container. |