Hello, how are you? In this opportunity, I want to talk about the software containers we can do with them and how to install it on Windows 10. In detail, A software container wraps a piece of software in a complete file system that contains everything you need to run the application. It consists of a complete execution environment, a package of elements that in addition to containing the application itself will contain its dependencies, as well as the libraries and binary and configuration files necessary for the proper functioning of the application.
In other words, it is a very powerful tool that allows us to carry out light virtualization, that is to say, it is not in charge of virtualizing an entire operating system as Hyper V or Virtual Box can do. Indeed, what it does is in charge of virtualizing applications such as a web server, FTP server, or a Linux bash terminal. Moreover, Docker is the application par excellence for running containers. In this tutorial, we are going to learn how to install it in windows 10.
The first thing to know is that this function is not available for all versions of Windows 10. In fact, we have to use Windows 10 Professional or Enterprise. In addition, we need to have virtualization activated in our system, and of course, a processor with the ability to do so. If you don’t know how to activate this feature, I recommend you check out our Hyper V tutorial. Please note, if you do not manually activate the virtualization, the installer will do it automatically for you. Now, let’s get down to work.
Installing Docker in Windows 10
In order to download the most recent version of Docker for Windows, we have to register in Docker Hub.
Next, we have to run the file, and the installer will start. It is very intuitive and will start downloading from the internet everything you need to run.
We will be asked if we want to use Windows containers instead of Linux ones. Keep in mind that this option can be changed after the installation.
The installer will unpack the files and start the installation.
The wizard will finish its work, and ask us to log out in order to complete the installation.
Once we enter again, a pop-up window will warn us that the container and Hyper V features are not activated. We can activate it automatically whatever restarts the computer.
After this restart, a sale will warn us that docker is not running and if we want to activate it.
Configuring and testing Docker for Windows
After starting the server, the Docker logo will appear at the bottom right of the screen.
If we double click on it, we see the Docker options where we will be able to access the options of the software itself, check for updates, or switch from Linux containers to Windows containers easily. In addition, we will also be able to make use of our Docker ID to access the Docker Hub repositories.
In the configuration section, we can modify the options relative to the amount of memory and processor assigned, the network options, and if we want Docker to start with the system.
Once we have configured it, we will be able to check its operation through CMD or Powershell.
If we want a list of all available docker commands, we have to insert the following command.
Running a container in Docker
The classic example in Docker is to run the “Hello World” container. To do this we simply write “docker run hello-world”. As we do not have the previously downloaded image, Docker connects to the Hub to get it and save it on our PC. Then it executes the container on the downloaded image and ends the life cycle of the container.
docker run hello-world
Finally we have installed and configured Docker for windows. Now we can start to run our images and containers. In next articles we will continue studying this tool.