0% found this document useful (0 votes)
2 views

commands

The document provides a list of basic Docker commands categorized into three sections: basic commands, image commands, and container commands. It includes commands for checking Docker version, managing images, and controlling containers, along with explanations for each command. Additionally, it clarifies the difference between 'docker pull' and 'docker run'.

Uploaded by

newsohel800
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

commands

The document provides a list of basic Docker commands categorized into three sections: basic commands, image commands, and container commands. It includes commands for checking Docker version, managing images, and controlling containers, along with explanations for each command. Additionally, it clarifies the difference between 'docker pull' and 'docker run'.

Uploaded by

newsohel800
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

BASIC COMMANDS================================================================

1. docker version
// gives version of docker
2. docker -v
// another syntax for docker version
3. docker info
// gives info regarding docker version and docker containers nd images
4. docker --help
// it lists the differnt commands available in docker
5. docker login
// to login into our docker account

IMAGES COMMANDS=====================================================
1. docker images
// lists out the total images present in docker
2. docker pull <image-name>
// it pull the image from the central repository which is dockerhub
3. docker rmi <imageid>
// it removes the available image

CONTAINER COMMANDS======================================================
1. docker ps
// it lists outthe available containers running in the system
2. docker run <image-name>
// it downloads or pull the image from docker hub
3. docker run -it <image-name>
// it runs the docker image in the background in the interactive mode.
4.docker stop <container-id>
// it will basically stop the running container
5. docker start <container-id>
// it will start the container to run

SYSTEM
COMMANDS===========================================================================
=
1. docker stats
// it will give the statistics of docker..
2.docker system df
// it will give the complete information of the images and container which are
active and avaialble in the system.

P.S: docker pull vs docker run


docker pull:it pull the image from the docker hub
docker run:it searches the images whether it is available in the system and runs
the image and if not avaiable,then it downlaods from docker hub and it runs the
image.

You might also like