Dcoker Commands

How to load an image to Docker.

docker load --input <image path.tar>


How to run a Docker Image.

If the image is missing it will download the image from docker hub, install and run it.

Download of image happens only once, on subsequent runs the same image is used.

 docker run <image>


List if running docker Images

docker ps 

in more details

docker ps -a


To stop a docker container.


docker stop <name of container or container id>


To remove a stopped or exited container.

docker rm <name of container>


To see the list of images and sizes

docker images.


To remove image - you have to ensure all container that are running of that image should be stopped


docker rmi <container name or ID >


To get the image but not start the container with that image.


docker pull <image name>


Create Network for docker.

docker network create <name of network>






Comments