In this tutorial, we will learn useful Docker commands that are frequently used when working with Docker containers.
\> docker –version
This command displays the docker version and exits. This command is useful to know the docker version.
build command builds a docker image from the Dockerfile.
\> docker build [OPTIONS] PATH
pull command is used to pull a docker image from the docker registry.
\> docker pull <image name>
Docker push command is the reverse of the pull command. The push command is used to push an image to a registry. For understanding, these commands are like git pull and push.
\> docker images
This command is used to list the Docker images in the local repository.
\> docker ps
This command is used to list the Docker containers.
\> docker run <command>
This command is used to run the command in Docker container.
Some command examples are shown in the following tutorial: