Software Engineer logging his learnings in Tech, Finance and more

Docker Cheat Sheet

Since I am working on and off with Docker right now, This post will serve as a quick reference for me to lookup my frequently used docker commands.

Login to a private container registry

docker login private-registry-server

Pull an image locally

docker pull image-name

Run a image

docker run image-name

List all running containers

docker ps

List all containers (running and stopped)

docker ps -a

Kill a running container

docker kill container-name

View all local images

docker image ls

Open Shell inside a running container

docker exec -it container-name /bin/bash

Remove all local docker images, volumes, containers

docker system purge

#cheatsheet #docker