Top 15 Docker Commands You Should Know

Top 15 Docker Commands You Should Know

Image for postDocker Commands ? Edureka

The trend of Docker container has been growing uncontrollably with organizations actively looking for professionals who have a sound knowledge of Docker commands. So, in this article, I will discuss the Top 15 Docker Commands.

Following are the commands which are being covered:

  • docker ?version
  • docker pull
  • docker run
  • docker ps
  • docker ps -a
  • docker exec
  • docker stop
  • docker kill
  • docker commit
  • docker login
  • docker push
  • docker images
  • docker rm
  • docker rmi
  • docker build

1. docker ?version

Usage: docker ? ? version

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

Image for post

2. docker pull

Usage: docker pull <image name>

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

Image for post

3. docker run

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

This command is used to create a container from an image

Image for post

4. docker ps

Usage: docker ps

This command is used to list the running containers

Image for post

5. docker ps -a

Usage: docker ps -a

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

Image for post

6. docker exec

Usage: docker exec -it <container id> bash

This command is used to access the running container

Image for post

7. docker stop

Usage: docker stop <container id>

This command stops a running container

Image for post

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.

Image for post

9. docker commit

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

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

Image for post

10. docker login

Usage: docker login

This command is used to login to the docker hub repository

Image for post

11. docker push

Usage: docker push <username/image name>

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

Image for post

12. docker images

Usage: docker images

This command lists all the locally stored docker images.

Image for post

13. docker rm

Usage: docker rm <container id>

This command is used to delete a stopped container.

Image for post

14. docker rmi

Usage: docker rmi <image-id>

This command is used to delete an image from local storage.

Image for post

15. docker build

Usage: docker build <path to docker file>

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

Image for post

This brings us to the end of the article. If you wish to check out more articles on the market?s most trending technologies like Artificial Intelligence, Python, Ethical Hacking, then you can refer to Edureka?s official site.

Do look out for other articles in this series which will explain the various other aspects of DevOps.

1. DevOps Tutorial

2. Git Tutorial

3. Jenkins Tutorial

4. Docker Tutorial

5. Ansible Tutorial

6. Puppet Tutorial

7. Chef Tutorial

8. Nagios Tutorial

9. How To Orchestrate DevOps Tools?

10. Continuous Delivery

11. Continuous Integration

12. Continuous Deployment

13. Continuous Delivery vs Continuous Deployment

14. CI CD Pipeline

15. Docker Compose

16. Docker Swarm

17. Docker Networking

18. Ansible Vault

19. Ansible Roles

20. Ansible for AWS

21. Jenkins Pipeline

22. Top Git Commands

23. Git vs GitHub

24. DevOps Interview Questions

25. Who Is A DevOps Engineer?

26. DevOps Life cycle

27. Git Reflog

28. Ansible Provisioning

29. Top DevOps Skills That Organizations Are Looking For

30.Waterfall vs Agile

31. Maven For Building Java Applications

32. Jenkins CheatSheet

33. Ansible Cheat Sheet

34. Ansible Interview Questions And Answers

35. 50 Docker Interview Questions

36. Agile Methodology

37. Jenkins Interview Questions

38. Git Interview Questions

39. Docker Architecture

40. Linux commands Used In DevOps

41. Jenkins vs Bamboo

Originally published at https://www.edureka.co on November 14, 2017.

1

No Responses

Write a response