37
Docker Cheatsheet
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production. In this post, I will mention docker commands which we need or most of the use-cases.
docker create [IMAGE]
docker rename [CONTAINER_NAME] [NEW_CONTAINER_NAME]
docker run [IMAGE] [COMMAND]
docker run --rm [IMAGE]
docker run -td [IMAGE]
docker run -it [IMAGE]
docker run -it-rm [IMAGE]
docker exec -it [container]
docker rm [CONTAINER]
docker update [CONTAINER]
docker start [CONTAINER]
docker stop [CONTAINER]
docker restart [CONTAINER]
docker pause [CONTAINER]
docker unpause [CONTAINER]
docker wait [CONTAINER]
docker kill [CONTAINER]
docker attach [CONTAINER]
docker build [URL/FILE]
docker build -t <tag> [URL/FILE]
docker pull [IMAGE]
docker push [IMAGE]
docker import [URL/FILE]
docker commit [CONTAINER] [NEW_IMAGE_NAME]
docker rmi [IMAGE]
docker load [TAR_FILE/STDIN_FILE]
docker save [IMAGE] > [TAR_FILE]
docker ps
docker ps -a
docker logs [CONTAINER]
docker inspect [OBJECT_NAME/ID]
docker events [CONTAINER]
docker port [CONTAINER]
docker top [CONTAINER]
docker stats [CONTAINER]
docker diff [CONTAINER]
docker [image] ls
docker history [IMAGE]
docker network ls
docker network rm [NETWORK]
docker network inspect [NETWORK]
docker network connect [NETWORK] [CONTAINER]
docker network disconnect [NETWORK] [CONTAINER]
Hope you find these resources useful. If you like what you read and want to see more about system design, microservices, and other technology-related stuff... You can follow me on
37