Docker Setup for Windows 10 Home

Aakaash Jois
4 min readFeb 15, 2019

--

Photo by chuttersnap on Unsplash

Docker has become one of the industry standards for containerization. I recently started working with Docker when I started to work with Big Data. Installing and configuring software like Hadoop and Spark on a Windows machine is painful. Docker makes this task very simple and makes it very easy to get the environment setup.

Generally, setting up Docker straightforward when you have an OS like Ubuntu, MacOS or Windows 10 Pro. But it is a little tricky with Windows 10 Home. In this small guide, I will show the steps I used to set up my Docker environment.

For Windows 10 Home, the default Docker setup file does not work. You need to download the Docker Toolbox. Once Docker Toolbox is downloaded, just run the setup file and install with all the default settings.

Docker Toolbox installs VirtualBox to create a small Linux based virtual machine (VM)which it uses as the base operating system. Run Docker Quickstart Terminal to make sure the installation has run successfully. On the first run, Docker will automatically create the VM mentioned above. You should be greeted with an interactive shell once the setup is complete.

Docker Interactive Shell

You can close this window now by typing exit. Next is to configure the VM which was created. To do this, open up VirtualBox.You should see something like the screenshot below. It will have a VM called default.

Virtualbox Manager

Power Off the VM by selecting it and pressing Ctrl + F. Once it is Powered off, select the Settings button. Here select Shared Folders. We need to add a folder here which the VM can access so that any file which is moved into that folder in Windows can be accessed by the VM.

Adding a shared folder

Select the correct path of the folder here and give it an appropriate name. The Folder Name is where the folder is going to be mounted in the VM. Also, make sure to select Auto-mount so that this folder is mounted every time the VM is started up. Once this is done, just select OK in all the open windows and close VirtualBox Manager.

Now run Docker QuickStart Terminal again. This will restart the VM and the changes made will be applied. Let us now create the quickstart container by Cloudera. You can do this with the following code

docker run --hostname=quickstart.cloudera --privileged=true -t -i -d -p 8888:8888 -p 8080:8080 -v /home/bigdata:/home/bigdata cloudera/quickstart /usr/bin/docker-quickstart

This long command will pull the quickstart image and create the container.

Creating the Docker container

Once it is done, you can run docker ps to check if the container is running. It should display the Container ID. Then run the command

docker exec -it [Container ID] bash

This will give you access to the shell inside the container. Here you should be able to find the folder which you provided when creating the container. In my case, it is /home/bigdata . Now, when you move any file into the folder in Windows, it shows the same file in the docker container.

Now, this folder can be used as the interface to send inputs to the docker container and get outputs from the docker container.

Another thing which is slightly different for Windows 10 Home is the port forwarding procedure. When creating the docker container, we mapped the ports 8888 and 8080 from the docker container to the localhost. But, since Docker uses a VM as the base OS, the port 8888 and 8080 of the docker container is being mapped to the port 8888 and 8080 on the VM. To access these ports, you need to port forward these ports in VirtualBox.

Open VirtualBox again select Settings. In this window select Network and then select Adapter 1. Here click on the Advanced option to show Port Forwarding button. Select Port Forwarding and it will open up a new window to add the ports.

Here you can add the port which can be forwarded. Now you can go to localhost:8888 in your browser to access these ports from Docker.

These are some of the configurations which I made when working with Docker on Windows 10 Home. If you have any more tips, just let me know in the comments.

Cheers!

--

--

Aakaash Jois

Machine Learning Engineer at Xandr (part of AT&T) | Deep Learning | Computer Vision Machine Learning | NYU Grad | Electrical and Electronics Engineering