> For the complete documentation index, see [llms.txt](https://danhnhan-phung.gitbook.io/dnpi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://danhnhan-phung.gitbook.io/dnpi/command-line/docker-cheat-sheet.md).

# Docker cheat sheet

Follow this site for more details: https\://docs.docker.com/

## Basics

Show a list of available images:

```bash
$ docker images
```

Show a list of containers:

```bash
$ docker container ls
```

Open Docker bash:

```bash
$ docker exec -it <docker container> bash
```

Show docker container logs:

{% hint style="info" %}
use the option: `--follow` to continuously stream the log&#x20;
{% endhint %}

```bash
$ docker logs <docker container> 
```
