Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Bruno E. Grossi
Bruno E. Grossi

Posted on

     

Using Docker on a Windows 10 Home Edition

I like Linux. And I used it for many years. But now, I need to use some software that does not support Linux. So, I'm using Windows 10 here. And it is a Windows 10Home Edition. Docker does not support it on its official release. So, you need to get the legacyDocker Toolbox.

But, why the native version does not work?

A Docker container should be isolated from all other machine resources not granted by the user. For this, it uses Linux's namespace and control groups. Fromthis article:

Linux namespaces are provided and supported by Linux kernel to allow separation (virtualization) of process ID space (PID numbers), network interfaces, interprocess communication (IPC), mount points and kernel information.
Control groups in Linux allow accurate resource control: using control groups allows Docker to limit CPU or memory usage for each container.

To run Docker "natively" on Windows, they don't have namespaces and control groups. So, developers use Hyper-V virtual hosts to create this isolation. However,Windows 10 Home does not support Hyper-V functions. Hyper-V specifically provideshardware virtualization and process isolation. That's why we need the legacy Docker toolbox.

Docker Toolbox is a solution that uses Oracle'sVirtualBox Headless mode to run Docker on a Linux virtual container.

Docker Toolbox setup

Explaining the trick

Thetrick here is that Docker is separated into two parts. A docker client and an engine daemon. So, Toolbox uses a tool, calleddocker-machine to create a Linux virtual machine and run a Docker Engine inside it. It's not a native solution but works very well. The Docker client may be used to control not only a local docker but a remote one too. So, we only need this windows client (included on toolbox) and point it to our virtual server. This can be done settings some environment variables, and the commanddocker-machine.exe env teaches you how to do this. I will talk about docker-machine utility in another post.

But, to be more productive, Toolbox comes with a utility shell script that checks it docker's VM machine is running and starts it if not. It's used through theDocker Quickstart Terminal link created on Windows' Start Menu. This link simply call a git'sbash.exe (or some other Linux terminal ported to windows) and execute astart.sh (you can see ithere).

Originally posted onhttps://brunogrossi.com/tech/using-docker-on-windows-10-home-edition/, on May 3, 2019

Do you know best practices and more information about running Docker on Windows Home edition? Share it on comments!

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Dual Citizen Italian and Brazilian with a strong background in Software Engineering.
  • Location
    Belo Horizonte, Minas Gerais, Brazil
  • Work
    Senior Software Architect at Banco Inter
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp