Docker CLI provides a comprehensive set of commands. Here is a quick cheat sheet of the commonly used commands:
Purpose | Command |
---|---|
Build an image | docker build –rm=true . |
Install an image | docker pull ${IMAGE} |
List of installed images | docker images |
List of installed images (detailed listing) | docker images –no-trunc |
Remove an image | docker rmi ${IMAGE_ID} |
Remove all untagged images | docker rmi $(docker images | grep “^” | awk “{print $3}”) |
Remove all images | docker rm $(docker ps -aq) |
Run a container | docker run |
List containers | docker ps |
Stop a container | docker stop ${CID} |
Find IP address of the container | docker inspect –format ‘{{ .NetworkSettings.IPAddress }}’ ${CID} |
Attach to a container | docker attach ${CID} |
Remove a container | docker rm ${CID} |
Remove all containers | docker rm $(docker ps -aq) |
What other commands do you use commonly ?
Hi,
Really interesting blog.
I am a developer with some minor Devops tasks
Your Docker posts are really helpful.
One thing though,
Is there a way to subscribe to your blog with RSS?
There’s one error in your list. The “Remove all images” task should be named “Remove all containers” since docker rm $(docker ps -aq) removes containers, not images.
Miami has many lenders who provide these short-term loans for the unemployed, nevertheless, you will need to use your vehicle as collateral for your car title loan.
Most interest rates on these plans are less than the eye rates on credit cards.
We have many option to get more xbox gold codes but i would like to choose xbox live membership codes.
This blog will show how to setup a Couchbase cluster using Docker Services.