diff --git a/content/blog/docker-cheat-sheet/Image-Docker-Command-Cheat-Sheet.png b/content/blog/docker-cheat-sheet/Image-Docker-Command-Cheat-Sheet.png new file mode 100644 index 0000000..e8cf80f Binary files /dev/null and b/content/blog/docker-cheat-sheet/Image-Docker-Command-Cheat-Sheet.png differ diff --git a/content/blog/docker-cheat-sheet/content.md b/content/blog/docker-cheat-sheet/content.md index b227e22..23e650f 100644 --- a/content/blog/docker-cheat-sheet/content.md +++ b/content/blog/docker-cheat-sheet/content.md @@ -1,14 +1,21 @@ +++ title = "Docker Cheat Sheet" -#subtitle = "This is my Docker commands sheat sheet." +subtitle = "This is my Docker commands sheat sheet." + date = "2020-12-02" +lastmod = "2020-12-16" + fragment = "content" weight = 100 tags = ["docker", "cheat", "sheet"] +++ +![Header Image](Image-Docker-Command-Cheat-Sheet.png) + # A list of docker commands +--- + ### List images ``` bash @@ -26,8 +33,32 @@ docker images [OPTIONS] [REPOSITORY[:TAG]] | `--no-trunc` | | Don’t truncate output | | `--quiet , -q` | | Only show numeric IDs | +--- + ### Remove one or more containers ``` bash docker rm [OPTIONS] CONTAINER [CONTAINER...] ``` + +#### Options + +| Name, shorthand | Default | Description | +|:----------------|:-------:| ------------------------------------------------------- | +|`--force , -f` | | Force the removal of a running container (uses SIGKILL) | +|`--link , -l` | | Remove the specified link | +|`--volumes , -v` | | Remove anonymous volumes associated with the container | + +--- + +### Stop one or more running containers + +``` Bash +docker stop [OPTIONS] CONTAINER [CONTAINER...] +``` + +#### Options + +| Name, shorthand | Default | Description | +|:----------------|:-------:| ------------------------------------------- | +|`--time , -t` | 10 | Seconds to wait for stop before killing it. |