This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Manthan Ankolekar
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
This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Manthan Ankolekar
Manthan Ankolekar | Sciencx (2022-11-07T05:08:17+00:00) Docker Cheatsheet. Retrieved from https://www.scien.cx/2022/11/07/docker-cheatsheet-5/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.