Install Docker On Windows 10 Pro

/ Comments off

Expected installation time: 3 hours.

Dec 08, 2016 In this setup, Docker installs VirtualBox and use it as the Hypervisor. If you have Windows 10 64-bit Pro, Ent, or Edu and use VirtualBox, then follow method 2. Following the first method will make your VirtualBox VMs inoperable. Before you begin, enable Intel VT-x hardware virtualization in BIOS or UEFI firmware. As of August 2020, Microsoft enabled WSL 2 support for Windows 10 builds 1903 + 1909. Install Docker Desktop On Windows 10 Pro 64. For years prior to that you could only run it on Windows Pro, Enterprise or any edition that had Hyper-V available, but since August 2020 pretty much all supported versions of Windows 10 can use Docker Desktop.

This guide covers building new projects based on Shopsys Framework.If you want to contribute to the framework itself,you need to install the whole shopsys/shopsys monorepo.Take a look at the article about Monorepo for more information.

This solution uses docker-sync (for relatively fast two-way synchronization of the application files between the host machine and Docker volume).

Warning

Docker-sync might be a burden for intensive project development, especially when there is a huge amount of files in shared volumes of virtualized docker and when switching between branches or even between projects often. In such a case, you should consider using native installation.

Supported systems¶

  • Windows 10 Pro
  • Windows 10 Enterprise
  • Windows 10 Education

Requirements¶

  • PHP
    • At least version 7.2 or higher
  • Docker for Windows
    • Docker for Windows requires at least 4 GB of memory, otherwise, composer install can result in Killed status (we recommend to set 2 GB RAM, 1 CPU and 2 GB Swap in Docker -> Preferences… -> Advanced)
    • Version of Docker Engine should be at least 17.05 or higher so it supports multi-stage builds.
    • Version of Docker Compose should be at least 1.17.0 or higher because we use compose file version 3.4
  • Docker-sync (installation guide see below)

Installation of Docker-sync for Windows¶

Warning

Be aware of using custom firewalls or protection tools other than default Windows Defender, we experienced that some of them make synchronization malfunctioning because of blocking synchronization ports.To speed up the synchronization and developing faster, you can exclude folder from indexing and search path of Windows Defender.

Prerequisites

In settings of Windows docker check Expose daemon on localhost:2375 in General tab and check drive option in Shared Drives tab, where the project will be installed, you will be prompted for your Windows credentials.

Enable WSL

Docker

Open the Windows Control Panel, Programs and Features, click on the left on Turn Windows features on or off and check Windows Subsystem for Linux near the bottom, restart of Windows is required.

Install Debian app

Install Debian app form Microsoft Store and launch it, so console window is opened.

Execute following commands in console window.

Update linux packages so system will be up to date to install packages needed for running docker-sync.

Now install the tools needed for adding package repositories from which the system will be able to download docker, docker-sync and unison synchronization strategy driver.

Add repository for docker, then install it and configure environment variable for connecting to Windows docker.

Install docker-compose tool that will help us to launch containers via docker-compose.yml configuration file.

Install ruby as installation tool for docker-sync in specific version for working unison synchronization strategy driver.

Download, compile and install OCaml.

Download, compile and install Unison.

Remove sources of sync tools

Set timezone of the system as docker-sync requirement.

Set WSL init script for mounting of computer drives from root path / instead of /mnt path.

Add valid Debian repository for php version that is used by composer and install composer.

Close console window and open it again so the new configuration is loaded.

Note

Sometimes something may not work correctly, so we highly recommend you do restart system and continue by guide

Shopsys Framework Installation¶

1. Create new project from Shopsys Framework sources¶

After WSL installation use linux console for each command.
Pick path of some directory in Windows filesystem and move into it, for example documents of windows user myuser so path will be like this.

Install project with composer.

Notes

  • The --no-install option disables installation of the vendors - this will be done later in the Docker container
  • The --keep-vcs option initializes GIT repository in your project folder that is needed for diff commands of the application build and keeps the GIT history of shopsys/project-base

2.1 Use install script¶

In case you want to start demo of the app as fast as possible, you can now execute install script.

Unable to install docker on windows 10 pro

If you want to know more about what is happening during installation, continue with next step.

2.2 Create docker-compose.yml and docker-sync.yml file¶

Create docker-compose.yml from template docker-compose-win.yml.dist.

Create docker-sync.yml from template docker-sync-win.yml.dist.

3. Compose Docker container¶

On Windows you need to synchronize folders using docker-sync.Before starting synchronization you need to create a directory for persisting Vendor data so you won't lose it when the container is shut down.

Then rebuild and start containers

Note

During installation there will be installed 3-rd party software as dependencies of Shopsys Framework by Dockerfile with licenses that are described in document Open Source License Acknowledgements and Third-Party Copyrights

5. Setup the application¶

Legacy desktop solution. Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of Docker for Mac and Docker for Windows. We recommend updating to the newer applications, if possible.

Estimated reading time: 10 minutes

Docker Toolbox provides a way to use Docker onWindows systems that do notmeet minimal system requirements for the Docker forWindows app.

If you have not done so already, download the installer here:

What you get and how it works

Docker Toolbox includes the following Docker tools:

  • Docker CLI client for running Docker Engine to create images and containers
  • Docker Machine so you can run Docker Engine commands from Windows terminals
  • Docker Compose for running the docker-compose command
  • Kitematic, the Docker GUI
  • the Docker QuickStart shell preconfigured for a Docker command-line environment
  • Oracle VM VirtualBox

Because the Docker Engine daemon uses Linux-specifickernel features, you can’t run Docker Engine nativelyon Windows. Instead, you must use the Docker Machinecommand, docker-machine, to create and attach to asmall Linux VM on your machine. This VM hosts Docker Enginefor you on your Windows system.

Tip: One of the advantages of the newerDocker forWindows solution is thatit uses native virtualization and does not requireVirtualBox to run Docker.

Step 1: Check your version

To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine.To verify your machine meets these requirements, do the following:

  1. Right click the windows message and choose System.

    If you aren’t using a supported version, you could consider upgrading your operating system.

    If you have a newer system, specifically 64bit Windows 10 Pro, with Enterprise and Education (1607 Anniversary update, Build 14393 or later), consider using Docker for Windows instead. It runs natively on the Windows, so there is no need for a pre-configured Docker QuickStart shell. It also uses Hyper-V for virtualization, so the instructions below for checking virtualization will be out of date for newer Windows systems. Full install prerequisites are provided in the Docker for Windows topic in What to know before you install.

  2. Make sure your Windows system supports Hardware Virtualization Technology and that virtualization is enabled.


    For Windows 10

    Run Speccy, and look at the CPU information.


    For Windows 8 or 8.1

    Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:

    If virtualization is not enabled on your system, follow the manufacturer’s instructions for enabling it.


    For Windows 7

    Run a tool like the Microsoft® Hardware-Assisted Virtualization Detection Tool or Speccy, and follow the on-screen instructions.

  3. Verify your Windows OS is 64-bit (x64)

    How you do this verification depends on your Windows version.
    For details, see the Windows article How to determine whethera computer is running a 32-bit version or 64-bit version of theWindows operating system.

Step 2: Install Docker Toolbox

In this section, you install the Docker Toolbox software and several “helper” applications. The installation adds the following software to your machine:

  • Docker Client for Windows
  • Docker Toolbox management tool and ISO
  • Oracle VM VirtualBox
  • Git MSYS-git UNIX tools

If you have a previous version of VirtualBox installed, do not reinstall it with the Docker Toolbox installer. When prompted, uncheck it.

If you have Virtual Box running, you must shut it down before running theinstaller.

  1. Go to the Docker Toolbox page.

  2. Click the installer link to download.

  3. Install Docker Toolbox by double-clicking the installer.

    The installer launches the “Setup - Docker Toolbox” dialog.

    If Windows security dialog prompts you to allow the program to make a change, choose Yes. The system displays the Setup - Docker Toolbox for Windows wizard.

  4. Press Next to accept all the defaults and then Install.

    Accept all the installer defaults. The installer takes a few minutes to install all the components:

  5. When notified by Windows Security the installer will make changes, make sure you allow the installer to make the necessary changes.

    When it completes, the installer reports it was successful:

  6. Uncheck “View Shortcuts in File Explorer” and press Finish.

Install Docker On Windows 10 Pro

Step 3: Verify your installation

The installer adds Docker Toolbox, VirtualBox, and Kitematic to yourApplications folder. In this step, you start Docker Toolbox and run a simpleDocker command.

Install Docker On Windows 10 Pro 64-bit

  1. On your Desktop, find the Docker QuickStart Terminal icon.

  2. Click the Docker QuickStart icon to launch a pre-configured Docker Toolbox terminal.

    If the system displays a User Account Control prompt to allow VirtualBox to make changes to your computer. Choose Yes.

    The terminal does several things to set up Docker Toolbox for you. When it is done, the terminal displays the $ prompt.

    The terminal runs a special bash environment instead of the standard Windows command prompt. The bash environment is required by Docker.

  3. Make the terminal active by clicking your mouse next to the $ prompt.

    If you aren’t familiar with a terminal window, here are some quick tips.

    The prompt is traditionally a $ dollar sign. You type commands into thecommand line which is the area after the prompt. Your cursor is indicatedby a highlighted area or a that appears in the command line. Aftertyping a command, always press RETURN.

  4. Type the docker run hello-world command and press RETURN.

    The command does some work for you, if everything runs well, the command’s output looks like this:

Cannot Install Docker On Windows 10 Pro

Looking for troubleshooting help?

Typically, the above steps work out-of-the-box, but some scenarios can cause problems. If your docker run hello-world didn’t work and resulted in errors, check out Troubleshooting for quick fixes to common problems.

A Windows specific problem you might encounter relates to the NDIS6 host network filter driver, which is known to cause issues on some Windowsversions. For Windows Vista systems and newer, VirtualBox installs NDIS6 driver by default. Issues can range from system slowdowns to networking problems for the virtual machine (VM). If you notice problems, re-run the Docker Toolbox installer, and select the option to install VirtualBox with the NDIS5 driver.

Optional: Add shared directories

By default, Toolbox only has access to the C:Users directory and mounts it intothe VMs at /c/Users.

Note: Within the VM path, c is lowercase and the Users is capitalized.

If your project lives elsewhere or needs access to otherdirectories on the host filesystem, you can add them, using the VirtualBox UI.

  1. Open the VirtualBox UI.

  2. Click the Settings gear, then go to Shared Folders.

  3. Select any existing listing under Machine Folders, thenclick the + icon.

    • Choose the Folder Path on the host, enter the Folder Namefor within the VM (or take the default, which is the same nameas on the host), and configure any additional options you need.

    • Choose Auto-mount if you want the folder to automaticallybe mounted into the VM, and choose Make Permanent for itto be considered a permanently shared folder.

  4. Click OK to add the new folder to the Shared Folders list.

  5. Click OK again to save your changes and exit the Settings dialog.

How to uninstall Toolbox

Removing Toolbox involves removing all the Docker components it includes.

A full uninstall also includes removing the local and remote machines you created with Docker Machine. In some cases, you might want to keep machines created with Docker Machine.

For example, if you plan to re-install Docker Machine as a part of Docker for Windows you can continue to manage those machines through Docker. Or, if you have remote machines on a cloud provider and you plan to manage them using the provider, you wouldn’t want to remove them. So the step to remove machines is described here as optional.

Install Docker Toolbox On Windows 10 Pro

To uninstall Toolbox on Windows, do the following:

  1. List your machines.

  2. Optionally, remove each machine. For example:

    This step is optional because if you planto re-install Docker Machine as a partof Docker forWindows, you can import andcontinue to manage those machinesthrough Docker.

  3. Uninstall Docker Toolbox using Window’s standard process for uninstalling programs through the control panel (programs and features).

    Note: This process does not remove the docker-install.exe file. You must delete that file yourself.

  4. Optionally, remove theC:Users<your-user>.docker directory.

    If you want to remove Docker entirely, you can verify that the uninstall removed the .docker directory under your user path. If it is still there, remove it manually. This directory stores some Docker program configuration and state, such as information about created machines and certificates. You usually don’t need to remove this directory.

  5. Uninstall Oracle VirtualBox, which is installed as a part of the Toolbox install.

Next steps

  • Try out the Get started tutorial.

  • Dig in deeper with more tutorials and examples on building images, running containers, networking, managing data, and storing images on Docker Hub.

docker, documentation, install, toolbox, win