From 2d91bf16ed944c592820295b34d51ee45733f1b6 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Wed, 25 Nov 2020 21:18:52 +0100 Subject: Add docker sheet --- docker.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docker.md (limited to 'docker.md') 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 :`: mount a volume +* `--entrypoint `: 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. -- cgit v1.2.3