m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-11-25 21:18:52 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-11-25 21:18:52 +0100
commit2d91bf16ed944c592820295b34d51ee45733f1b6 (patch)
tree32c24a60ff0956488f42785e7e4a749ba346ba08
parenta5f8dad427865bda921d9c2f92079c9f2710b8f6 (diff)
Add docker sheet
-rw-r--r--docker.md13
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.