TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Docker

Most Useful Docker Commands

Overview

In this tutorial, we will learn the most frequently used Docker commands when working with Docker containers.

Docker commands

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

\> docker –version

This command displays the docker version and exits. This command is useful to know the docker version.

docker build

The build command builds a docker image from the Docker file.

\> docker build [OPTIONS] PATH

docker pull

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 Containers

docker images

\> docker images

This command is used to list the Docker images in the local repository.

docker ps

\> docker ps

This command is used to list the Docker containers.

docker run

\> 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:

https://www.testingdocs.com/run-selenium-test-on-docker-container/

Official Website

More information on Docker can be found on the Docker official website at::

https://www.docker.com/

Related Posts

Container Technology

Docker /

Advantages of Containerization Technology

Connection Refused Error

Docker /

Fix Connection refused Error Selenium Tests On Docker

Docker Compose YAML File

Docker /

Docker Compose Tool

Docker Install Check

Docker /

Docker Install on Ubuntu

Download and Install Docker Desktop

Docker /

Download and Install Docker Desktop

‹ Getting Started with Docker› Docker Containers vs Virtual Machines

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version