Docker all commands

Β·

3 min read

List of Important Docker commands :

1. πŸƒβ€β™‚οΈ `docker run` - Run a container from an image.

2. 🚚 `docker pull` - Pull an image from a registry.

3. 🚒 `docker push` - Push an image to a registry.

4. πŸ—οΈ `docker build` - Build an image from a Dockerfile.

5. πŸ“¦ `docker ps` - List running containers.

6. ⏹️ `docker stop` - Stop a running container.

7. ▢️ `docker start` - Start a stopped container.

8. ♻️ `docker restart` - Restart a container.

9. πŸ“œ `docker logs` - Show the logs of a container.

10. πŸ’Ό `docker exec` - Execute a command inside a running container.

11. πŸ–ΌοΈ `docker images` - List available images.

12. πŸ—‘οΈ `docker rm` - Remove a container.

13. πŸ—‘οΈ `docker rmi` - Remove an image

14. πŸ” `docker inspect` - Show information about a container

15. 🌐 `docker network create` - Create a network for containers to communicate

16. ➑️ `docker network connect` - Connect a container to a network

17. ⬅️ `docker network disconnect` - Disconnect a container from a network

18. πŸšͺ `docker port` - Show the mapped ports of a container

19. πŸ“ `docker cp` - Copy files between a container and the host

20. πŸ”„ `docker commit` - Create a new image from a container's changes

21. πŸ”’ `docker login` - Log in to a registry

22. πŸ”“ `docker logout` - Log out of a registry

23. 🏷️ `docker tag` - Tag an image with a new name

24. πŸ“¦ `docker export` - Export the contents of a container as a tar archive

25. πŸ“¦ `docker import` - Create a new image from a tar archive

26. πŸ’Ύ `docker save` - Save an image as a tar archive

27. πŸ“₯ `docker load` - Load an image from a tar archive

28. πŸ”„ `docker top` - Show the processes running inside a container

29. πŸ“Š `docker stats` - Show resource usage statistics of containers

30. πŸ“‚ `docker diff` - Show the changes made to a container's filesystem

31. πŸ“… `docker events` - Show the events generated by Docker

32. πŸ•°οΈ `docker history` - Show the history of an image

33. ⏸️ `docker pause` - Pause a running container

34. ▢️ `docker unpause` - Unpause a paused container

35. ⏹️ `docker kill` - Send a signal to a container to stop it abruptly

36. ⏳ `docker wait` - Wait for a container to exit and return its exit code

37. πŸ“Ί `docker attach` - Attach to a running container's console

38. πŸ—οΈ `docker buildx` - Build and push multi-platform images

39. πŸ”„ `docker compose` - Manage multi-container applications with Docker Compose

40. 🐝 `docker swarm` - Create and manage a cluster of Docker nodes

41. πŸ“¦ `docker volume create` - Create a named volume for persistent data storage

42. πŸ“¦ `docker volume ls` - List available volumes

43. πŸ—‘οΈ `docker volume rm` - Remove a named volume

44. 🧹 `docker system prune` - Remove all unused objects from Docker

45. πŸ“Š `docker system df` - Show the usage of Docker objects

46. πŸ“… `docker system events` - Show the events generated by Docker on the system

47. ℹ️ `docker system info` - Show the system-wide information about Docker

48. πŸ” `docker system inspect` - Show detailed information about Docker objects

49. πŸ“ƒ `docker system logs` - Show the system logs of Docker

50. πŸ“‹ `docker system version` - Show the version of Docker installed on the system.

Β