Docker Cheat Sheet

August 6, 2021

Containers

List running containers

docker ps

List all containers

docker ps -a

Start a container

docker start NAME

Stop a container

docker stop NAME

Kill a container

docker kill NAME

Images

Show all images

docker image ls -a

Delete image

docker image rm NAME

Run

Run container with following settings:

  • In detached mode
  • Name "dy"
  • Port 8002 externally mapped to port 8000 inside container
  • Using amazon/dynamodb-local image
docker run -d --name dy -p 8002:8000 amazon/dynamodb-local