In this tutorial, we will learn the most frequently used Docker commands when working with Docker containers.
|Docker Command||Command description|
|$ docker –version||This command is used to find the Docker version.|
|$ docker start <container_name>||This command is used to start the docker container.|
|$ docker stop <contaner_name>||This command is used to stop the running docker container.|
|$ docker kill <contaner_name>||This command is used to kill a docker container. This is a non-graceful way to stop a docker container.|
|$ docker top <contaner_name>||This command is used to list the running processes within a docker container.|
\> docker –version
This command displays the docker version and exits. This command is useful to know the docker version.
The build command builds a docker image from the Docker file.
\> docker build [OPTIONS] PATH
pull command is used to pull a docker image from the docker registry.
\> docker pull <image name>
The 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 the Docker container.
Run Selenium Test on Docker Container
Some command examples are shown in the following tutorial:
More information on Docker can be found on the Docker official website at::