Skip to content

How to run docker and build save cloud on WIN10

Peter Trifanov edited this page Mar 11, 2021 · 1 revision

Install Docker

Docker is a useful and convenient tool that helps developers and development teams build and ship apps. It's very important to correctly instal and run docker to proper apps work.

  1. First of all, you need to enableWindows Subsystem for Linux (WSL) 2 to launch docker on Windows. WSL2 introduces a significant architectural change as it is a full Linux kernel built by Microsoft, allowing Linux containers to run natively without emulation.
      1. Check Windows version requerment and run this command in PowerShell openned as Administrator dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart and then restart your machine.
      1. Then, enable the Virtual Machine Platform by running follow command: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart and then restart again.
      1. Download the Linux kernel update package https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
      1. Set WSL 2 as your default version wsl --set-default-version 2
      1. Install Linux distribution. You can do this by open Microsoft Store and select Linux distribution (you can choose another)
      1. You can check your WSL version: wsl -l -v
  2. Install Docker. You can download docker here. For Windows ther is only docker desktop.
  3. Create .testcontainers.properties file in C:\Users\User with the following content: docker.client.strategy=org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy
  4. Then, you can run tests in save and see container creation in docker

Notion

If you have an error with \\.\pipe\docker_engine you need to change directory to Docker folder ('C:\Program Files\Docker\Docker>') and run DockerCli.exe -SwitchDaemon.

Other prerequisites

  • Install msys2 and install pacman -S mingw-w64-x86_64-curl for save-agent
  • Install docker inside WSL (e.g. on Ubuntu) and install runsc runtime (see gvisor instructions). Run ip a and look for docker network IP (172...). Add it to test configuration of orchestrator. This is required to run orchestrator tests using runsc.