Docker Commands Lookup Table

All the commands you need in one place

To have faster access to every command needed in Docker troubleshooting, we will list all the frequently-used commands listed below:

Command Action
docker run [image_name] Create an instance of the image that is a container. The flag -d or --detach is used run a container in background mode.
docker ps Lists all running containers. -a option will list stopped and running both
docker inspect [container_name] Provides all info about the container
docker stop [container_name] Stops the running container
docker kill [container_name] Kills(stops) the container and removes the container from the system
docker rmi [image/s] Removes the provided image
docker images Lists all images on the system
docker exec [-it] Executes command in a Docker container
docker system Gets the Docker system information such as memory usage and housekeeping stuff
docker system prune This command will save you from getting the “No memory left” nightmare with production systems

Get hands-on with 1400+ tech skills courses.