Install Docker on Windows 10: A Brief Discussion
In this article, I will tell you the procedure to install docker on windows 10. But, first of all, you need to know what is a Docker. Docker is a Linux container based open-source project. It is developed by Dotcloud and is written in “go”.
The Docker uses the features of Linux Kernel like automating application deployment on the container, and building containers on top of an operating system, to control groups and namespace.
The Docker makes the environment light, in order to help you run the application code. It is also very useful to move the application which you are working on, to the place where you can test it. The Docker is fast and it is capable of running on platforms which are Linux Kernel compatible.
For the backend storage of the Docker, it uses the Copy-on-write union file system. In this process, only the changes get saved which are made to the container. Additionally, with the help of Docker, you can build a container in very little time.
Procedure To Install Docker On Windows 10
Before installing the Docker, you have to know the requirements of your computer. It requires 64-bit Windows 10, the 1511 November update, Build 10586, or later, Education, and Enterprise. However, the developers are improving the Docker to support more Windows 10 versions.
Steps To Install
- First of all, you have to download the Docker file, which is “InstallDocker.msi”.
- Then, you have to double-click on the “InstallDocker.msi” to install the Docker.
- After that, you need to follow the given steps with the Install Wizard. You have to accept the license. Then you have to make the installer authorize and then install.
- Now you can launch the Docker by clicking on “Finish”.
- Then the Docker will start and will show you a window saying “Welcome”. After that, you will be given access to the documentation of the Docker.
This is the process of how you can install Docker on Windows 10. But, you have to check whether it is stable or not.
Checking The Installation
- At first, you have to open a terminal window. This can be PowerShell or a Command Prompt, but it must not be PowerShell ISE.
- After that, you have to run “docker –version”. This will help you to confirm that the Docker versi0on you are having is supported by your computer.
- Then, you have to take the hello-world image and run a container from the Docker Hub:
> docker run hello-world
docker : Unable to find image ‘hello-world:latest’ locally
…
latest:
Pulling from library/hello-world
ca4f61b1923c:
Pulling fs layer
ca4f61b1923c:
Download complete
ca4f61b1923c:
Pull complete
Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
- Now, from the download of the Docker Hub, you have to list the “hello-world” image.
> docker image ls
- Then, you have to list the container “hello-world”.
> docker container ls –all
- Lastly, you can run some help commands to check the docker:
> docker –help
> docker container –help
> docker container ls –help
> docker run –help
Explore Docker
So, now let’s see the power and the ease with which a docker can run applications that have been Dockerized. We will test it by running something complex.
- So, we will run an Ubuntu OS within the new container:
> docker run –interactive –tty ubuntu bash
docker : Unable to find image ‘ubuntu:latest’ locally
…
latest:
Pulling from library/ubuntu
22dc81ace0ea:
Pulling fs layer
1a8b3c87dba3:
Pulling fs layer
91390a1c435a:
Pulling fs layer
…
Digest: sha256:e348fbbea0e0a0e73ab0370de151e7800684445c509d46195aef73e090a49bd6
Status: Downloaded newer image for ubuntu:latest
- Now, you are inside a Docker container. Check the container’s “hostname” in the root prompt:
root@8aea0acb7423:/# hostname
8aea0acb7423
You will see that the Container ID is the hostname.
- After that, by using the “exit” command you can exit the shell.
root@8aea0acb7423:/# exit
>
- Next, by using the “–all” option, you have to list the containers. The container “hello-world” will stop after showing its message. The container “ubuntu” will stop when you will exit the container.
> docker container ls –all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8aea0acb7423 ubuntu “bash” 2 minutes ago Exited (0) 2 minutes ago laughing_kowalevski
45f77eb48e78 hello-world “/hello” 3 minutes ago Exited (0) 3 minutes ago relaxed_sammet
- Now you have to take a Dockerized nginx web server and run it, and it is named “webserver”:
> docker run –detach –publish 80:80 –name webserver nginx
Unable to find image ‘nginx:latest’ locally
latest: Pulling from library/nginx
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
716f7a5f3082: Pull complete
7b10f03a0309: Pull complete
Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff12debeb7a092730d638c33e0de3e
Status: Downloaded newer image for nginx:latest
dfe13c68b3b86f01951af617df02be4897184cbf7a8b4d5caf1c3c5bd3fc267f
- To display the nginx start page, you have to point your web browser at “http://localhost”.
- Then you have to select only the “running container” and then list them
- After that, you have to select the nginx container by the name of “webserver” and stop its running.
- Lastly, you have to locate the containers with the names “–” and remove them. The last two names for you will be different.
Conclusion
I hope that you have understood the steps to install Docker on Windows 10. Also, the procedure to check the installation and exploring the docker is important. With these steps, you will know whether the version of the Docker you are having is the correct one or not.