> For the complete documentation index, see [llms.txt](https://hossainemruz.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hossainemruz.gitbook.io/notes/docker/untitled.md).

# Commands

Docker command cheat sheet.

### Image

1. List all docker images

```bash
$ docker images
```

2\. List only those images who has `none` substring in information

```bash
$ docker images | grep none
```

3\. Print ID (3rd field) of the docker images who has `none` substring in their info.

```bash
$ docker images | grep none | awk '{print $3}'
```

4\. Remove the images who has `none` substring in their information.

```bash
$ docker rmi -f (docker images | grep none | awk '{print $3}')
```

5\. Free disk taken by docker images, volume etc.<br>

```bash
docker system prune --all
```
