Docker Cheat Sheet :

Docker Cheat Sheet :

Here is a Docker cheat sheet with some commonly used commands:

  1. docker build: Build an image from a Dockerfile

  2. docker run: Run a container from an image

  3. docker ps: List running containers

  4. docker stop: Stop a running container

  5. docker rm: Remove a stopped container

  6. docker images: List all images on the system

  7. docker rmi: Remove an image from the system

  8. docker exec: Run a command inside a running container

  9. docker logs: Show the logs of a container

  10. docker network: Manage Docker networks

  11. docker-compose: Manage multi-container Docker applications

  12. docker pull: Download an image from a registry

  13. docker push: Upload an image to a registry

  14. docker inspect: Display low-level information about a container or image

  15. docker tag: Assign a new name and tag to an image

  16. docker commit: Create a new image from a container's changes

  17. docker save: Save one or more images to a tar archive

  18. docker load: Load an image from a tar archive

  19. docker attach: Attach local standard input, output, and error streams to a running container

  20. docker cp: Copy files/folders between a container and the local filesystem

  21. docker volume: Manage Docker volumes

  22. docker-compose build: Build or rebuild services defined in a docker-compose.yml file

  23. docker-compose up: Create and start containers defined in a docker-compose.yml file

  24. docker system prune: Remove all unused containers, networks, images, and volumes

  25. docker network create: Create a new Docker network

  26. docker network connect: Connect a container to a Docker network

  27. docker network disconnect: Disconnect a container from a Docker network

  28. docker-compose down: Stop and remove containers, networks, and volumes defined in a docker-compose.yml file

  29. docker-compose start: Start services defined in a docker-compose.yml file

  30. docker-compose stop: Stop services defined in a docker-compose.yml file

  31. docker-compose logs: Display logs for services defined in a docker-compose.yml file

  32. docker-compose ps: List the services defined in a docker-compose.yml file

  33. docker-compose run: Run a one-time command on a service defined in a docker-compose.yml file

These commands are just a few of the many available commands in Docker. It's essential to understand how Docker works and the different commands available before using it to manage containers and images. The official Docker documentation provides comprehensive guides and tutorials to help you get started.

************************************************************************

Thanks for reading! Hope you find this helpful.

Happy learning !!!

Suggestions are always welcome.

checkout my GitHub.

~Sumit

Thank You - Shubham Londhe