Hello Docker

Updated at

2024.3.5

Created at

2021.10.31

I'm going to write down the very basic usage of Docker, because I forget it every time I use it.

Retrieve the container image

Retrieve the container image from Docker Hub.

terminal
$ docker pull <repository>

Show the list of the containers

terminal
$ docker images

Create and run the container

terminal
$ docker run -it <repository>

Show the running containers

terminal
$ docker ps

Use -a option to show sleeping containers as well.

terminal
$ docker ps -a

Run the created container

terminal
$ docker start <container id or name>

Stop the container

terminal
$ docker stop <container id or name>

mktia's note

Research & Engineering / Blockchain / Web Dev

© 2017-2025 mktia. All rights reserved.