Useful Docker Commands

Just a collection of useful Docker commands

List all Docker images

docker images

List all docker process

docker ps -a

Stop a Docker container by its name.

docker stop $(docker container ls -a | grep "name" | awk '{print $1}')

Remove a Docker container by its name.

docker rm $(docker container ls -a | grep "name" | awk '{print $1}')

Remove a Docker image by its name

docker rmi -f $(docker images | grep "name" | awk '{print $3}')

Load a Docker image from a file

docker load < image.gz