For Beginners

Docker commands for beginners


Docker is a container technology for Linux / MacOS / FreeBSD (and even Windows, but not full support) that allows a developer to package up an application with all of the parts it needs.

It can also be called “Docker commands cheat sheet“.

List currently running docker containers:

docker ps

List all docker containers (running and stopped):

docker ps -a

Start a container:

docker start {{container}}

Stop a container:

docker stop {{container}}

Start a container from an image and get a shell inside of it:

docker run -it {{image}} bash

Run a command inside of an already running container:

docker exec {{container}} {{command}}

Remove a container:

docker rm {{container}}

Get a docker image but url:

docker pull {{url}}