Use LISA docker image on Windows

This guide will walk you through using the LISA Docker image on a Windows system.

Manual Docker Setup

If you prefer to install Docker yourself, you can use Docker Desktop or Docker CE, then run containers directly.

Install Docker Desktop on Windows

You can download Docker Desktop from the Docker website.

Start Docker service

After installing Docker, open the Docker Desktop application to start the Docker service. Or use the following command to launch and start the Docker service.

Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"

Launch LISA container

Use below command to launch the LISA container.

docker run --rm -i mcr.microsoft.com/lisa/runtime:latest lisa -r ./examples/runbook/hello_world.yml

Mount local files into the container

To override files inside the container (e.g., for testing a code fix), use the -v flag to mount a local directory into the container.

Important

Windows containers only support mounting directories, not individual files. Mount the parent directory instead.

# Mount local lisa\util directory to override container files
docker run --rm -i `
    -v C:\code\lisa\lisa\util:C:\app\lisa\lisa\util `
    mcr.microsoft.com/lisa/runtime:latest `
    lisa -r ./examples/runbook/hello_world.yml

If using quick-container.ps1, pass the mount via -ExtraArgs:

.\quick-container.ps1 -Runbook lisa/microsoft/runbook/azure.yml `
    -SubscriptionId xxx -Token $token `
    -ExtraArgs "-v C:\code\lisa\lisa\util:C:\app\lisa\lisa\util"