Why do I get a "Windows cannot be used" error when using the Octopus Deploy Execution Container workers?

I am trying out the new execution container worker feature.

The step is running on a Windows 10 Enterprise worker machine, which has docker installed/running and the image I am pulling is octopusdeploy/worker-tools:windows.ltsc2019

When I run the deployment I receive this error:

Calamari.exe : NotSpecified: image operating system “windows” cannot be used on this platform

Why is this?

This is because your Docker configuration is set to use Linux containers. As you have specified a Windows version of the octopusdeploy/worker-tools images you need to change your Docker Desktop configuration to use Windows containers.

You can do this by right clicking on the Docker Desktop icon in the icon tray and selecting Switch to Windows containers.

image

Alternatively, you can use a Linux image, which uses Ubuntu.