Compare commits

..

No commits in common. "f0e4702bac94f9526b1fbd83e08b3daa34717112" and "7cfe156f3cb4222ed5598a9f3519052ed9c9ccc5" have entirely different histories.

View file

@ -1,8 +1,8 @@
--- ---
title: Goodies to know for Docker & Docker-Compose title: Docker & Compose Cheat Sheet
description: This is my list of use full Docker commands. description: This is my list of use full Docker commands.
date: 2024-11-06T21:05:38.188Z date: 2020-12-02T00:00:00.000Z
lastmod: 2024-12-27T11:26:27.203Z lastmod: 2024-09-11T21:04:52.148Z
image: /images/blog/Image-Docker-Command-Cheat-Sheet.png image: /images/blog/Image-Docker-Command-Cheat-Sheet.png
tags: tags:
- Cheat-Sheet - Cheat-Sheet
@ -13,9 +13,56 @@ slug: docker-compose-cheat-sheet
draft: true draft: true
--- ---
This is the colleton of useful knowledge this kitty has gathered for Docker and Docker-Compose over a long time. # A list of docker commands
{{< toc >}} ---
### List images
```Shell
docker images [OPTIONS] [REPOSITORY[:TAG]]
```
#### Options
| Name, shorthand | Default | Description |
| :-------------- | :------: | --------------------------------------------------- |
| `--all, -a` | | Show all images (default hides intermediate images) |
| `--digests` | | Show digests |
| `--filter, -f` | | Filter output based on conditions provided |
| `--format` | | Pretty-print images using a Go template |
| `--no-trunc` | | Dont truncate output |
| `--quiet, -q` | | Only show numeric IDs |
---
### Remove one or more containers
```Shell
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
```Shell
docker stop [OPTIONS] CONTAINER [CONTAINER...]
```
#### Options
| Name, shorthand | Default | Description |
|:----------------|:-------:| ------------------------------------------- |
|`--time, -t` | 10 | Seconds to wait for stop before killing it. |
## How to cleanup (unused) resources ## How to cleanup (unused) resources
@ -78,9 +125,3 @@ or
```Shell ```Shell
docker network ls | awk '$3 == "bridge" && $2 != "bridge" { print $1 }' docker network ls | awk '$3 == "bridge" && $2 != "bridge" { print $1 }'
``` ```
## Conclusion
First of thanks for reading this.
I hope this has been helpful and if you have any questions, suggestions or something i may have missed, please let me know.