syyunn
12/29/2019 - 9:59 PM

Docker Commands

Docker Commands

Install Docker

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04

Test Docker Version

docker --version

List CLI commands

docker container --help

Check docker installations

docker info or docker version

Execute docker image

docker run <Image Name>

List Docker Images

docker image ls

List Docker containers (running, all, all in quiet mode)

docker container ls

docker container ls --all

docker container ls -aq

Remove image

docker rmi -f <image id>

clean up containers, images, volumes, and networks all in one command

docker system prune

remove all stopped containers

docker container prune

delete all images

docker rmi -f $(docker images -aq)