AWS Global Infrastructure

DevOps

Topics Covered
  • DevOps (65 Blogs)
  • Mastering Git and GitHub (9 Blogs)
  • Docker (8 Blogs)
  • DevOps Engineer Masters Program (4 Blogs)
SEE MORE

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-widget-banner-bg

Top 15 Docker Commands – Docker Commands Tutorial

Last updated on May 22,2019 31.6K Views
6 / 11 Blog from Docker

MI-new-launch

myMock Interview Service for Real Tech Jobs

myMock-mobile-banner-bg

myMock Interview Service for Real Tech Jobs

  • Mock interview in latest tech domains i.e JAVA, AI, DEVOPS,etc
  • Get interviewed by leading tech experts
  • Real time assessment report and video recording

In my previous blogs, I have covered What is Docker, and how you can use it. Today, in this blog, I will talk about the Top 15 Docker Commands that you will be using frequently while you are working with Docker. The trend of Docker container has been growing uncontainably with organizations actively looking for professionals possessing Docker certification and a sound knowledge of these Docker commands will give you the needed expertise.

Following are the commands which are being covered:


So, let’s get started:

Docker Commands

1. docker –version

This command is used to get the currently installed version of docker

Docker_Version - Docker Commands - Edureka

 

2. docker pull

Usage: docker pull <image name>

This command is used to pull images from the docker repository(hub.docker.com)

Docker_Pull - Docker Commands - Edureka

3. docker run

Usage: docker run -it -d <image name>

This command is used to create a container from an image

docker_run - Docker Commands - Edureka

4. docker ps

This command is used to list the running containers

docker_ps - Docker Commands - Edureka

5. docker ps -a

This command is used to show all the running and exited containers

docker_psa - Docker Commands - Edureka

6. docker exec

Usage: docker exec -it <container id> bash

This command is used to access the running container

docker_exec - Docker Commands - Edureka

7. docker stop

Usage: docker stop <container id>

This command stops a running container

docker_stop - Docker Commands - Edureka

8. docker kill

Usage: docker kill <container id>

This command kills the container by stopping its execution immediately. The difference between ‘docker kill’ and ‘docker stop’ is that ‘docker stop’ gives the container time to shutdown gracefully, in situations when it is taking too much time for getting the container to stop, one can opt to kill it

docker_kill - Docker Commands - Edureka

9. docker commit

Usage: docker commit <conatainer id> <username/imagename>

This command creates a new image of an edited container on the local system

docker_commit - Docker Commands - Edureka

10. docker login

This command is used to login to the docker hub repository

docker_login - Docker Commands - Edureka

11. docker push

Usage: docker push <username/image name>

This command is used to push an image to the docker hub repository

docker_push - Docker Commands - Edureka

12. docker images

This command lists all the locally stored docker images

docker_images - Docker Commands - Edureka

13. docker rm

Usage: docker rm <container id>

This command is used to delete a stopped container

docker_rm - Docker Commands - Edureka

14. docker rmi

Usage: docker rmi <image-id>

This command is used to delete an image from local storage

docker_rmi - Docker Commands - Edureka

15. docker build

Usage: docker build <path to docker file>

This command is used to build an image from a specified docker file

docker_build - Docker Commands - Edureka

 

Want to learn more about docker commands? Here is a Docker Tutorial to get you started. Alternatively, you can take a top down approach and start with this Devops Tutorial.

Now that you have understood what is DevOps, check out our DevOps Certification Training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. The Edureka DevOps Certification Training course helps learners gain expertise in various DevOps processes and tools such as Puppet, Jenkins, Nagios, Ansible, Chef, Saltstack and GIT for automating multiple steps in SDLC.

Got a question for us? Please mention it in the comments section and we will get back to you.

Comments
0 Comments

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.