top of page

How to install Docker locally on Windows

  • Writer: Subhasish Sahu
    Subhasish Sahu
  • Jun 14, 2020
  • 3 min read

Updated: May 25, 2021





Pre - Requisite :

  1. Docker ToolBox

  2. Docker HUB Account


Lets install Docker locally on windows.



ree

Or

If you are having Windows 10 (Home Edition), then you need to install an older version from ToolBox site.




ree

Download and install



ree

ree

To run Dockers, your machine must have a 64-bit operating system running Windows 8 or higher. Additionally, you must make sure that virtualization is enabled on your machine.


Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:



ree

Once the Setup is completed, you will see below at


C:\Users\XYZ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Docker



ree

Double Click on “DOCKER QUICKSTART TERMINAL”



ree

ree

ree

Type the docker run hello-world command and press RETURN. The command does some work for you, if everything runs well, the command’s output looks like this:



ree

We need to note down the Docker IP assigned to this Container. We will access this IP to access the Applications installed inside Docker. To know the IP from the command prompt use command docker-machine ip.



ree

Start Docker Service


ree

Docker provides a command that will clean up any resources which is not associated with a container and are dangling in nature.

command : docker system prune

ree

To remove any stopped containers and all unused images

command : docker system prune -a

ree

To display/list all the images

command : docker images

ree

To remove any image

command : docker rmi -f <image id >

If you see the below error(error response from daemon.....) then you have to use the -f (force) keyword

ree

To stop a docker , first list all the container using


a) list container : docker ps -a or docker images

ree

b) run any id/container : docker run <image id>

ree

ree

c) To stop the container : docker stop <container id>


ree

ree

ree

To Know the docker version

command: docker version

ree

To commit a container into an image

command : docker commit <container id> <user/repository:tag>

ree

To View Context

command : docker context ls


ree

To find changes to files/directories on a container’s file system

command : docker diff <container id>

ree

To get events from the docker server

command : docker events --since <date>

ree

To run a new command in a running container

first we need to make a container up and then run the below command

command : docker exec <container id > ls


ree

ree

To export a docker container’s file system as a tar file

IF you get "permission denied" error, then you need to make a temp folder and export it

command : docker export --output"<tar file name>" <container id>


ree

To see the history of any image

command : docker history <image id>

ree

To display system-wide information

command: docker info


ree

To import the contents from a tar to create a file system image

command: docker import <tar file name> <repository name>

ree

To inspect low-level information on docker objects

command : docker inspect <image id>

ree

To kill one or more running containers

command: docker kill <container id>

ree

To fetch the logs of a container

We need to make some container run or need to find a running container id

command: docker logs --details <container id>

ree

To manage network

command: docker network ls

ree

To pause all processes within one or more containers

command: docker pause <container id>

ree

To unpause all processes within one or more containers

command: docker unpause <container id>


To find/list port mappings for the container

command: docker port <name>

ree

To login to docker hub

command: docker login

ree


To rename a container

command: docker rename <container id> <new name>

ree

To restart one or more containers

command: docker restart <name>

ree

To remove a container

We need to stop any running any container first

command: docker rm <name>

ree

To search the Docker Hub for images

command: docker search <image name to be searched>

ree

To start one or more stopped containers

command: docker start <container id>

ree

To stop one or more started containers

command: docker stop <container id>

ree

To display a live stream of container(s) resource usage statistics

command: docker stats <name>

ree

To create a tag TARGET IMAGE that refers to SOURCE IMAGE

command: docker tag <image id> <repository name:version/tag>

ree

To Display the running processes of a container

command: docker top <container id>

ree

To show low-level information about keys and signatures

command: docker trust inspect <image name>


ree

Comments


bottom of page