Docker - Installation for Windows 7 (Docker Toolbox)

Card Puncher Data Processing


How I have installed and configured Docker in my Windows 7 laptop. The software for windows 7 is called Docker Toolbox.


Install Toolbox (for version before Windows 10)

Before version Windows 10: Toolbox:

Toolbox Componentns

Toolbox Components:

Create an host

I don't remember if it's necessary.

docker-machine create ^
    --driver virtualbox ^
    --virtualbox-memory 8192 ^
    --virtualbox-disk-size "40960"  ^
Running pre-create checks...
(test) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(test) Latest release for is v17.09.1-ce
(test) Downloading C:\Users\gerard\.docker\machine\cache\boot2docker.iso from
(test) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(test) Copying C:\Users\gerard\.docker\machine\cache\boot2docker.iso to C:\Users\gerard\.docker\machine\machines\test\boot2docker.iso...
(test) Creating VirtualBox VM...
(test) Creating SSH key...
(test) Starting the VM...
(test) Check network to re-create if needed...
(test) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\DockerToolbox\docker-machine.exe env default

The machine runs on the boot2docker operating system



docker-machine env
You can further specify your shell with either 'cmd' or 'powershell' with the --shell flag.

SET DOCKER_CERT_PATH=C:\Users\gerard\.docker\machine\machines\default
REM Run this command to configure your shell:
REM     @FOR /f "tokens=*" %i IN ('"C:\DockerToolbox\docker-machine.exe" env') DO @%i
  • Create them:
    • Windows Key > Env > Env for your account

Windows Env

  • Add the 4 env variables

Docker Windows Env Docker Machine


Add a docker host in your host file with the host ip

  • Obtain the IP
docker-machine ip

  • Open an editor as Adminsitrator and add it to the host file C:\Windows\System32\drivers\etc\hosts
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# ...........................   docker-host

SSH - Winscp

Create a new connection with the following parameters:

You should be able to see the c and d drive:

Docker Machine Via Winscp

Shared Drive

When mounting a volume with the bind method, your local drive must be made available to the host (in all case on Windows 7 with Toolbox). The steps are well explained also in the VirtualBox Doc on shared folder.

Without following this steps, you can get this kind of issue: Bind mount issue on Docker for Windows)

Step 0 - The default shared folder

By default, you will see already a shared drive with:

  • the folder path \\?\c:\Users
  • the name c/Users
  • auto-mount checked
  • Make permanent checked

It means that the path c:\\Users is already shared.

Docker Default Shared Folder

If you put your files under this directory, you are done. If not, you need to follow the below steps.

Step 1 - Create the shared folder in Virtual Box

  • Manually create a Machine Folder share.

Shared Folder Docker

  • or with a script
VBoxManage sharedfolder add "default" --name "c" --hostpath "C:\"
VBoxManage sharedfolder add "default" --name "d" --hostpath "D:\"


  • c is a name (not a path)
  • automatic mount means that the folders are mounted into the /media directory, along with the prefix sf_ (No thanks).
  • Access = Full means read and write.

For info: There are two types of shares:

  • Machine Folder are only available to the VM for which they have been defined;
  • Transient Folder can be added and removed at runtime and do not persist after a VM has stopped

Step 2 - Mount the shared folder in the docker host

docker-machine ssh 
# docker-machine ssh machineName
sudo su -
  • Create a file in your home and add the following line of code
# C
mkdir /c
mount -t vboxsf c /c

# D
mkdir /d
mount -t vboxsf d /d
  • Execute it
chmod u+x o+x g+x 
cd /home/docker

Step 3 - Make the mount automatic

  • To mount a shared folder during boot, copy the file as root to the directory /var/lib/boot2docker/
sudo su -
cp /home/docker/ /var/lib/boot2docker/

source local customisation with persistent-partition

Discover More
Card Puncher Data Processing
Docker - Installation

How I have installed and configured Docker in my Windows laptop: For: windows 7. See windows 10. See

Share this page:
Follow us:
Task Runner