Skip to main content

Deploy Docker Desktop on Windows with WSL2

You can install and run Keysight Eggplant IAM (Identity and Access Manager), which is also known as Keycloak in a Docker Desktop container on a Microsoft Windows system with Windows Subsystem for Linux 2 (WSL 2). WSL is a Windows operating system feature that enables you to run a Linux environment on Windows without dual booting or installing another virtual machine implementation. Ubuntu is the default Linux distribution type installed with WSL 2. See the Microsoft article What is the Windows Subsystem for Linux?, which includes information about WSL 2, for more information.

Deploying Docker Desktop on Windows with WSL 2 involves the following tasks:

  • Verifying your system meets the minimum hardware and software requirements.
  • Setting up Docker Desktop, which includes:
    • Enabling virtualization on the Windows system
    • Installing WSL 2 on the Windows system.
    • Installing Docker Desktop

Docker-Specific Software Requirements for Eggplant IAM on Windows

Before you can install and run Eggplant IAM in Docker Desktop on a Windows system, you need to verify your system meets the following prerequisites:

note

See the Prerequisites page for information about the required hardware and memory for Keycloak.

SoftwareVersion
Microsoft Windows (64-bit)
  • Server 2022 (Build 20348.740 and higher) / 2023
  • 10 (version 2004 and higher, Build 19043 and higher) / 11
  • Must support virtualization with WSL 2 enabled
Docker DesktopDesktop with WSL 2 enabled, up-to-date.
Docker ComposeCompose 2.23.0 or higher (included in the Docker Desktop bundle)

Deploying Docker Desktop on a Windows System

Perform the following tasks to set up Docker Desktop on the Windows system where you plan to run the Docker container that will host Eggplant Generator.

1. Enable Virtualization on the Windows System

See the Microsoft article Enable Virtualization on Windows for instructions.

2. Install WSL 2 to run a Linux environment on Windows

See the Docker article Install Docker Desktop on Windows for instructions.

3. Install Docker Desktop

  1. Download the required software. Refer to the Software Requirements table above for the list of what you need.

  2. Install Docker Desktop with the default settings that have Use WSL 2 instead of Hyper-V (recommended) enabled as shown in the sample Docker Desktop installation panel below. For more information, see Install Docker Desktop on Windows in the Docker documentation.

    The default Use WSL 2 instead of Hyper-V (recommended) accepted during Docker Desktop installation

  3. Proceed through the installation. The Docker installation progress displays in the installer.

    The Docker Desktop installation program installing files

4. Verify the Docker Desktop Deployment

This includes two tasks, instructions for which are provided below:

Verifying the Docker Desktop Version and Installation at the Command Line

  1. Open a shell on your Windows system, if you do not already have one open.

  2. Verify that the Docker Compose version is 2.23.0 or higher by running the following command in your shell. If the output from the following command shows an older version, delete the cache folder at C:\Users\<username>\.docker and restart Docker Desktop.

    docker compose version
  3. Verify the Docker Desktop installation is working correctly by running the hello-world command.

    docker run hello-world

    The resulting output should be similar to the following and include the message your installation appears to be working correctly:

    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.
    (arm64v8)
    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/

Verifying WSL 2 is Enabled in the Docker Desktop App

  1. In the Docker Desktop app, verify that WSL 2 is enabled in the Settings, under Resources > Advanced as shown in the following sample Docker Desktop screen.

    Verifying that WSL 2 is enabled in the Docker Desktop app

Next Step: Deploying Eggplant IAM with Docker

After you install and verify your Docker Desktop installation, and complete the pre-deployment checklist, continue to Deploying Eggplant IAM with Docker to install and deploy Eggplant IAM.