Docker - useful commands

Gagandeep Singh
To run a container using an image docker run <image name> example: docker run hello-world Override the default command for a container docker run <image name> command example: docker run busybox ls Show running containers docker ps docker ps --all This will list all the containers that were ever created on your machine. Restart stopped containers docker start <container id> example: run docker ps –all to get the list of containers