Docksal on Windows 10 Home

Submitted by Andy on Fri, 08/02/2019 - 19:22

If you want to install Docker on Windows 10 Home you will need to use a virtual machine. You have 2 options for controlling the Docker Virtual machine. Your options are Docker Toolbox or Docksal.

In this Guide I'm going to cover installing Docksal. It provides a Docker based web developments environment. Docksal provides automated tools for developing using many common web development systems. These include Drupal, and WordPress.

Before installing Docksal you need to have a basic knowledge the Windows command prompt and Unix-like command line.

Step 1 - Preparation

Before starting any install you should make sure that Windows and your virus protection is up to date. These update normally occur automatically.

Docksal uses both Babun and Virtualbox. It also creates a Virtual machine that contains Docker and all your containers. It therefore requires about 25GB and a processor with SSE2 (any CPU from the last 10 years)

Step 2 - Install Virtualbox

First download the Virtualbox installer. When the installer has downloaded run it.

Follow the on screen instructions accepting the defaults. Virtualbox installs new network interfaces. Windows may show dialogs asking for permission to install these interfaces. on The last installation dialog there is a checkbox to open Virtualbox. You should have this checked by default.

When Virtualbox opens it will check for the latest version and for "Oracle VM Virtualbox Extension Pack" is installed and the latest version. If see a dialog asking you wish to download the Extension Pack click the "Download" button. Follow the onscreen instructions to install the extensions.

The extensions help virtual machines interact with host machine better.

Step 3 - Install Babun

Docksal requires Babun (Cygwin) to install on Windows 10 Home. The installation of Babun is covered here.

Once you have finished the installation you will have a Working Babun unix-like command prompt. Before continuing make sure that Babun command line is running.

Step 4 - install Docksal

Open the Babun CLI (if it's not already open from the previous step).

In the Babun command prompt type:

curl -fsSL get.docksal.io | bash

This downloads and installs Docksal and the remaining requirements.

The installer will take a few minutes. During the installation Windows will ask for permission for the "Windows Command Processor" to make changes to your system. This may occur more than once. When the install completes you will messages like the following in Babun.

Going to optimize Windows network settings for file sharing...
You may see an elevated command prompt - click Yes.
Adjusting git defaults...
git config --global core.autocrlf input
git config --system core.longpaths true
[STEP 4/4] Updating system images...
Update finished

All Docksal command need to run from the Babun CLI.

Step 5 - Start the Docker Vitual Machine

On Windows 10 Home Docksal uses a virtual machine to run docker. To use Docksal you need start the virtual machine using:

fin vm start

The first time this it is run it will take a few minutes to commission the virtual machine. You will be asked permission for VirtualBox to make system changes 1 or more times. This is to configure the network interfaces to communicate with the Docker Virtual Machine. Windows will ask for permission for the "Windows Command Processor" to make changes to your system. Grant the permissions so the set-up can continue.

You will now see the following message:

Would you like to generate a default SSH key pair now? [y/n]:

Type "y" and Enter.

Would you like to generate a default SSH key pair now? [y/n]:

Type "y" and Enter. you should now see the following message:

Configuring SMB shares...
Enter your Windows account password:

Enter your password and press enter.

Windows will ask for permission for the "Windows Command Processor" to make changes to your system. Grant the permissions to set-up the network shares required.

Step 6 - Test Docker

You should now have a Docker Virtual Machine running and be able to use Docker /Docksal commands. To test that Docker is running we can run the Hello World container.

Type:

fin docker run hello-world

If everything is working correctly you will see the following message:

Unable to find image 'hello-world:latest' locally 
latest: Pulling from library/hello-world 
1b930d010525: Pull complete 
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535 
Status: Downloaded newer image for hello-world:latest 

Hello from Docker! 
This message shows that your installation appears to be working correctly. 

To generate this message, Docker took the following steps: 
 1. The Docker client contacted the Docker daemon. 
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 
    (amd64) 
 3. The Docker daemon created a new container from that image which runs the 
    executable that produces the output you are currently reading. 
 4. The Docker daemon streamed that output to the Docker client, which sent it 
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

Step 7 - Shutdown Docker

When you have finished using Docker you need to stop the virtual machine. If you don't stop the virtual machine you may get warnings when shutting down Windows.

To stop the virtual machine you need to type:

fin vm stop

Windows will ask for permission for the "Windows Command Processor" to make changes to your system. Grant the permissions to allow the VM to stop. once the VM has stopped you will see the following message:

Disabling automatic *.docksal DNS resolver...
Clearing DNS cache...
Stopping "docksal"...
Machine "docksal" was stopped.

To close Babun type:

exit
Category
Level