The top essential Docker commands are:
Docker General Commands
docker info
– Displays system-wide information about Docker[1]docker --help
– Gets help with Docker commands[1]
Docker Registry Commands
docker login
– Log in to a Docker registry[1]docker logout
– Log out from a Docker registry[1]
Docker Image Commands
docker build
– Build an image from a Dockerfile[1]docker tag
– Create a tag for an image[1]docker images
– List all Docker images[1][2]docker pull
– Pull an image from a registry[1][5]docker push
– Push an image to a registry[1]docker save
– Save one or more images to a tar archive[1]docker load
– Load an image from a tar archive[1]docker rmi
– Remove one or more images[1]
Docker Container Commands
docker run
– Run a command in a new container[1][5]docker ps
– List containers[1][2][4]docker stop/start/restart
– Stop, start or restart one or more containers[1][5]docker logs
– Get log output from containers[1][2]docker exec
– Run a command in a running container[1][2][4]docker cp
– Copy files/folders between a container and the local filesystem[2][4]docker rm
– Remove one or more containers[1]
Docker System Commands
docker system prune
– Remove unused data[1]
These are some of the most frequently used Docker commands for managing images, containers, registries, and the Docker system itself. Commands like docker run
, docker ps
, docker images
, docker pull
, docker exec
, and docker build
are essential for working with Docker on a daily basis.[1][2][4][5]
Citations:
[1] https://dev.to/tungbq/the-essential-docker-commands-1c23
[2] https://www.upgrad.com/blog/top-essential-docker-commands-you-should-know/
[3] https://docs.docker.com/reference/cli/docker/container/top/
[4] https://www.reddit.com/r/selfhosted/comments/g3p37k/25_basic_docker_commands_for_beginners/
[5] https://www.edureka.co/blog/docker-commands/