Install Docker on Windows 10

Docker Desktop – Windows is Docker designed to run on Windows 10. It is a native Windows application that provides an easy-to-use development environment for building, shipping, and running dockerized apps. Docker Desktop – Windows uses Windows-native Hyper-V virtualization and networking and is the fastest and most reliable way to develop Docker apps on Windows. Docker Desktop – Windows supports running both Linux and Windows Docker containers.

Install Docker on Windows 10

Docker works cross-platform and such supports execution on a Windows host, including Windows 10 (Pro or Enterprise). This makes Windows 10 a perfect development environment for Docker use-cases. On top of this, Windows is also the only platform, for now at least, that can run Windows and Linux based containers. This is because containers share the hosts kernel, so Windows can run Windows containers and, thanks to nested virtualization in Hyper-V, we can also run Linux containers inside of a very small Linux VM, that is 100 percent managed by Docker. Right now, however we must decide if we want Linux or Windows containers, we cannot run both at the same time.

Double click Docker for Windows Installer to run the installer.

Click OK to continue.

Wait until the installation finished.

Click on Close and log out to complete the installation.

After login you will see that Docker is still busy with the first initialization. After the initialization you will see the next popup:

Login with your Docker account and password. if you don’t have one then create one on hub.docker.com.

Note: Login with you Docker ID and not with your email address.

When trying to pull images from the Docker registry docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password. This happens if you sign in to Docker using your email address instead of your username.

The whale in the status bar indicates a running (and accessible via PowerShell) Docker instance.

Open PowerShell and enter the following command:

Result:

Run docker run hello-world to verify that Docker can pull and run images.

By default, Docker is configured to run Linux containers and to support these Docker will create a small Hyper-V VM on your machine:

Windows Docker container

In your taskbar, you will  find a icon in the form of a whale carrying tiny containers. From here you can switch Docker over to “Windows containers”, follow any prompts, if any, and wait for the Docker whale to be done switching over to Windows containers.

Click on Switch to switch to Windows containers.

In PowerShell execute the following to download and run your first Windows Server 2016 Nano Server based container:

This will download a Windows Server 2016 Nano Server based container image from the public Docker Hub container registry.

Finished download the Windows Server 2016 Nano Server based container.

To run your Windows Server 2016 Nano Server based container, execute the following command:

From your PowerShell. Docker will create a new container and attach your current shell in an interactive session with an input command line / TTY (“-it” parameter) to the process specified on the command line, in our case “PowerShell.”

Open a separate PowerShell, console and enter “docker ps” to see your currently running containers and get some information about them. To exit the container, simply enter “exit” until you end up in your local session.

Result:

Have fun with Docker 😀

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon 😉

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply