Docker Cheatsheet
Manthan Ankolekar
Posted on November 7, 2022
Check Docker Version :
docker version
Login into Docker :
docker login
or
docker login -u <username>
Search Hub for an image
docker search <image_name>
Publish an image to Docker Hub
docker push <username>/<image_name>
List all images :
docker image ls
Build an Image :
docker build -t <image-name> .
Run an Image :
docker run <image-name>
Start or stop an existing container :
docker start|stop <container_name> (or <container-id>)
To inspect a running container :
docker inspect <container_name> (or <container_id>)
Pull Image :
docker pull manthanank/<image-name>
List all containers :
docker ps -a
or
docker ps -all
Running containers :
docker ps
Stop an image :
docker stop <container-id>
Delete container :
docker rm <container-id>
Delete an Image :
docker rmi <image-name>
Remove all unused images :
docker image prune
💖 💪 🙅 🚩
Manthan Ankolekar
Posted on November 7, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
nvidia Running Ollama and Open WebUI containers on Jetson Nano with GPU Acceleration: A Complete Guide
November 30, 2024