DOCKER

How To Install Docker on Windows 7/8/10 Home and Pro

Founded in 2010 by Solomon Hykes, Docker is by far the most popular virtualization platform available.

Widely used in DevOps for continuous development and deployment purposes, Docker stands as a reference for managing, deploying and running applications all over the world.

In today’s tutorial, we are going to see how to install Docker on Windows, from 7 to 10, and for Home and Pro editions.

0 – Prerequisites

First of all, you want to determine the current version of Windows running on your computer.

a – Get your current Windows version

Installations are different between the Windows Pro Edition and the Windows Home Edition as Windows Home does not ship the Hyper-V feature (necessary to run “Docker for Windows”)

To determine your current Windows version, open your control panel.

Control panel on Windows

Click on System and Security, and you should see this panel.

Detailed Control Panel on Windows

Click on the System option, and you should be able to see your system version.

As you can see, I am running Windows 10 Pro (or Enterprise), so I will be able to install Docker Desktop for Windows.

If you are running Windows 7/8 or 10 Home, you should install the Docker Toolbox.

System panel in Windows

b – Verify virtualization is enabled on Windows

In order to verify that virtualization is enabled on Windows, press Ctrl + Alt + Del and head over to the “Performance” panel.

On this panel, you should see the Virtualization option.

Make sure virtualization is enabled.

Resources panel on Windows

Docker heavily relies on virtualization, making it impossible to run Docker if this option is not enabled on your computer.

If you need to enable Windows virtualization, you can follow this tutorial.

1 – Install Docker on Windows 7/8/10 Home

First, we are going to see how you can install Docker for computers that do not have the Hyper-V feature available.

For those computers, you are going to need Docker Toolbox.

a – Download the Docker Toolbox executable

First of all, head over to the official Docker Toolbox repository on Github and download the latest executable available.

At the time of this tutorial, version v19.03.1 is available.

Click on the executable available.

As you can see, the Docker Toolbox comes with multiple executables:

  • Docker: the docker binaries available to create and run containers on your computer. When installing Docker, you get a Docker CLI for you to communicate with a Docker server. This way, you can launch instructions and they will be executed on your containers;
  • Docker-machine: a tool that handles provisioning on your containers (installing packages, deleting packages, running them etc.);
  • Docker-compose: a tool for environments containing multiple containers with different environments. This way, you can start multiple containers together, or stop them together;
  • Kitematic: a sweet graphical interface for you to control your containers on Windows and Mac;
  • Boot2Docker ISO: a tiny Linux distribution for you to run Docker on Windows;
  • VirtualBox: open-souce hypervisor for Windows and used to emulate operating systems on your Windows system.

If you are looking to install Docker on Linux, follow this tutorial

Install Docker Toolbox on Windows

Save your executable somewhere appropriate, and run it to install Docker on Windows.

b – Run the Docker Toolbox installer for Windows.

First, this is what you should see when running the executable on Windows.

Docker Toolbox for Windows installer step one

Click on Next.

For the second screen, choose a location where to store your Docker files, and click on Next.

Docker Toolbox installer for Windows step two

Select the full installation on Windows, and check the Git for Windows option if not already installed on your computer.

If VirtualBox is already installed on your computer, you can uncheck this option (it won’t get reinstalled if you let the checkbox checked)

Docker Toolbox for Windows installer step three

Click on Next.

For the additional tasks, you can let the default options and click on Next.

Docker Toolbox for Windows installer step four

Finally, click on Install to start the Docker Toolbox installation.

Install for Docker toolbox for Windows

After a short while, your installation should complete. Leave the checkbox checked in order to see the shortcuts created by Docker.

Docker Toolbox installation for Windows complete

c – Run the Docker Quickstart for Windows

Now that Docker is installed, you are going to run the Docker quickstart process.

Running Docker Quickstart on Windows

Double-click on the icon to start Docker Quickstart.

A terminal shell opens and starts running some commands on your computer to setup Docker properly. This setup step will create a VirtualBox VM using the Boot2Docker ISO downloaded.

Docker Toolbox starting screen

Wait a few moments for the setup to complete.

After some moments, you should see Moby (the whale of Docker!), meaning that your installation was successful.

Docker Toolbox welcome screen

To verify your current Docker version, run the following command

$ docker version
Docker version command on Docker Toolbox

Awesome!

You have successfully installed Docker on Windows 7/8 and 10 Home.

2 – Install Docker on Windows 10 Pro and Enterprise

Windows 10 has the Hyper-V feature available, so we are going to install the Docker Desktop version that includes the Docker Community Edition for Windows.

a – Check your virtualization settings

First, we are going to check if Hyper-V is enabled on your machine. If not, you will have to enable it.

In Windows search menu, type “Type Windows Features On and Off“, and select it.

Turn Windows features on or off panel

A window similar to this one should appear. Make sure that the Hyper V checkbox is enabled.

Turning Hyper V on on Windows 10

Restart your computer for the changes to be applied.

Nice!

Now let’s download Docker Desktop for Windows.

b – Create an account on Docker Hub

In order to download Docker Desktop, you are going to need a Docker Hub account.

Head over to the Docker Hub sign up page, and create a new account.

Docker Hub sign up page

Click on “Continue“.

On the next screen, fill the information needed, and click on “Continue”.

Docker Hub profile page

On the next screen, you are asked to verify your email. Make sure to check your inbox and to click on the verify link from Docker Hub.

Docker Hub email verification

As an example, this is the email that I received from Docker.

Docker Hub email confirmation

Click on “Confirm your email with Docker”, and this is what you should see.

Docker Hub verification success

Click on “Go to Sign In” and sign in using the credentials you specified before.

Docker Hub Log In page

Great! Now let’s download Docker Desktop for Windows.

c – Install Docker Desktop for Windows

In order to download Docker Desktop, head over to this page, and click on “Get Docker“.

Install Docker Desktop for Windows

Your browser should start download the executable file. When the download is done, click on it to start the Docker Desktop installation for Windows.

Install Docker on Windows running file

Make sure that the executable is coming from “Docker Inc” and click on “Run”.

Initially, the Docker Desktop installer should start download some packages. This is completely normal, just wait a couple of seconds until it is done.

Installing Docker Desktop for Windows welcome page

When it is done, just leave the default options on the next screen, unless you want to use Windows containers in the future.

Configuring Docker Desktop for Windows

Right after, Docker will start unpacking some files. Just wait a couple of seconds until it is done.

Finally, click on “Close and Log Out”. Make sure that you don’t have any unsaved work or important programs running in the background.

Docker Desktop Installation for Windows success

When signing back in, this is what you should see at the bottom right corner of your desktop.

Docker Desktop is starting

Now that Docker Desktop is running, open a Powershell console and check your Docker version.

Running a docker command in the Powershell

Great, as you can see I am now running the latest stable version of Docker on my Windows 10 Pro.

d – Configuring Docker Desktop

Before using Docker Desktop for Windows 10 Pro, you may need to do some quick configuration steps for it to run as smoothly as possible.

Sharing Drives

At the bottom right corner of your screen, click on the Docker icon and select “Settings”.

Configuring Docker Desktop on Windows 10

On the “Shared drives” section, make sure to enable some of your hard drives if you plan on writing code on them and running it inside Docker.

This can be useful in case you plan on mapping volumes for example to Docker containers. Without checking those hard drives, you might not be able to do it.

Configuring Shared Drives in Docker Desktop

In my case, I will share the C: drive on my computer and click on “Apply”.

Docker filesystem permission box

Docker will need to access your computer’s filesystem in order to share drives. Simply enter your account password and click on “Ok”.

Customize Docker resources

In the “Advanced” tab, make sure that you are allocating the right amount of resources to Docker for it to run smoothly.

Those are the parameters set by default but you may need to have higher specifications if Docker is running badly.

Configuring Docker Desktop resources

Great! You learned how to install Docker Desktop on Windows 10 Pro.

3 – Conclusion

In this tutorial, you learned how to install Docker Toolbox and Docker Desktop for the latest versions of Windows.

Now that you have a complete Docker setup, it is time for you to run your first container.

Have a look at this video in order to create your first Docker container.

Until then, have fun, as always.

The post How To Install Docker on Windows 7/8/10 Home and Pro appeared first on techefix.

Related Articles

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Check Also
Close
Back to top button