Install Docker prerequisites on Windows with WSL1

Edit on GitHub

This document describes the prerequisites for installing Spryker on Windows.

System requirements for installing Spryker

REQUIREMENT VALUE OR VERSION ADDITIONAL DETAILS
Windows 10 or 11 (64bit) Pro, Enterprise, or Education (1607 Anniversary Update, Build 14393 or later).
BIOS Virtualization Enabled Typically, virtualization is enabled by default. Note that having the virtualization enabled is different from having Hyper-V enabled. You can check it in Task Manager > Performance tab. For more details, see Virtualization must be enabled.
CPU SLAT-capable feature Enabled SLAT is CPU related feature. It is called Rapid Virtualization Indexing (RVI).
Docker 18.09.1 or higher
Docker Compose 2.0 or higher
RAM 4GB or more
Swap 2GB or more

Install and configure the required software

Outdated software

WSL1 is outdated, so we highly recommend installing and configuring the required software with WSL2. Use it only if you can’t use WSL2.

When running commands described in this document, use absolute paths. For example: mkdir /d/spryker && cd $_ or mkdir /c/Users/spryker && cd $_.

Follow the steps below to install and configure the required software with WSL1.

Install Docker Desktop

  1. Download Docker Desktop for Windows.

  2. Open the installation file and follow the instructions of the wizard.

Enable Docker experimental features

  1. Right-click the Docker icon in the tray and select Settings.
  2. Select the Daemon tab.
  3. Click the Basic checkbox.
  4. Update variables as follows:
    {
  ....
  "experimental": true,
  "features": {
    "buildkit": true
  }
}

Enable WSL1

WSL is a Windows Subsystem for Linux. It allows Linux programs to run on Windows.

To enable WSL1, follow the steps:

  1. Open Windows Control Panel > Programs > Programs and Features.

  2. Click the Turn Windows features on or off hyperlink. step 2

  3. Select Windows Subsystem for Linux and click OK. step 3

Install Ubuntu

  1. Open Microsoft Store.
  2. In the Search field, enter Ubuntu and press Enter.
  3. From the search results page, select Ubuntu 18.04 LTS and install it. Ubuntu step 3

Update Ubuntu

  1. Open the Start menu.
  2. Find and launch Ubuntu.
  3. Follow the instructions in the wizard.
  4. Set the default root mount point in /etc/wsl.conf.
# Enable extra metadata options by default
[automount]
enabled = true
root = /
options = "metadata,umask=22,fmask=11"
mountFsTab = false
  1. Restart Ubuntu.

Install Docker

  1. Update the APT package:
sudo apt-get update
  1. To allow APT to use a repository over HTTPS, install the packages:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
  1. Add Docker’s official GNU Privacy Guard key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Set up a stable repository:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
  1. Install the latest version of Docker CE:
sudo apt-get install docker-ce docker-ce-cli containerd.io

Install Docker Compose

  1. Download the current stable release of Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/2.18.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  1. Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/docker-compose

Install docker-sync

  1. Install ruby and ruby -dev:
sudo apt-get install ruby ruby-dev
  1. Install docker-sync:
sudo gem install docker-sync
  1. Set your Docker for Windows host as an ENV variable:

    a. Open the Docker for Windows settings and select Expose daemon on tcp://localhost:2375 without TLS. b. Run the following command in your WSL shell:

    echo "export DOCKER_HOST=tcp://127.0.0.1:2375" >> ~/.bashrc
    

Install OCaml

  1. Check OCaml release changelog and make sure that the version you are going to install is compatible. In the procedure below, we are using version 4.06.0.

  2. Install the build script:

sudo apt-get install build-essential make
  1. Download the Ocaml archive:
wget http://caml.inria.fr/pub/distrib/ocaml-4.06/ocaml-4.06.0.tar.gz
  1. Extract the downloaded archive:
tar xvf ocaml-4.06.0.tar.gz
  1. Change the directory:
cd ocaml-4.06.0
  1. Configure and compile Ocaml:
./configure
make world
make opt
umask 022
  1. Install Ocaml and clean:
sudo make install
sudo make clean

Install Unison

  1. Download the source code of the latest Unison version.
  2. Download the Unison archive:
wget https://github.com/bcpierce00/unison/archive/v2.51.2.tar.gz
  1. Extract the archive:
tar xvf v2.51.2.tar.gz
  1. Change the directory:
cd unison-2.51.2
  1. Compile and install Unison:
$ make UISTYLE=text
$ sudo cp src/unison /usr/local/bin/unison
$ sudo cp src/unison-fsmonitor /usr/local/bin/unison-fsmonitor

You’ve installed and configured the required software.

Next steps

To choose an installation mode, see Choose an installation mode. If you’ve already selected an installation mode, follow one of the guides below: