Уровень сложностиСредний
Время на прочтение6 мин
Количество просмотров11K
Если на компьютере под Linux нужно быстренько запустить Windows или MacOS, самый простой и быстрый способ сделать это — ввести команду для скачивания и загрузки докер-контейнера с этой ОС.
В маркетплейсе RuVDS много готовых образов с установленными операционными системами. Там разные дистрибутивы Linux, Windows Server и CentOS. Но нет контейнеров с операционными системами.
Операционная система в докер-контейнере (в QEMU) не требует ручной инсталляции ОС. Всего одна команда в консоли — и контейнер Windows скачивается и запускается.
Набор контейнеров Dockur
Хороший набор докер-контейнеров с готовыми образами операционных систем в виртуальных машинах QEMU можно найти в репозитории Dockur.
Для выбора версии Windows при установке контейнера нужно изменить соответствующее значение в переменной окружения конфигурационного файла:
environment:
VERSION: "11"
В наличии следующие контейнеры Windows:
Предупреждение. Windows 8 потребляет очень много ресурсов CPU и RAM.
Есть также контейнеры MacOS, тут выбор поменьше:
Запуск через Docker Compose:
services:
macos:
image: dockurr/macos
container_name: macos
environment:
VERSION: "13"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 5900:5900/tcp
- 5900:5900/udp
volumes:
- ./macos:/storage
restart: always
stop_grace_period: 2m
Из консоли:
docker run -it --rm --name macos -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/macos:/storage --stop-timeout 120 dockurr/macos
Для выбора версии тоже следует изменить значение в переменной окружения конфигурационного файла:
environment:
VERSION: "13"
Версии MacOS перечислены в таблице выше.
Запуск контейнера Windows на сервере
Установить контейнер можно через Docker Compose, вот файл compose.yaml
, который практически идентичен файлу для MacOS:
services:
windows:
image: dockurr/windows
container_name: windows
environment:
VERSION: "11"
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
volumes:
- ./windows:/storage
restart: always
stop_grace_period: 2m
Или из командной строки:
docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/windows:/storage --stop-timeout 120 dockurr/windows
По умолчанию устанавливается Windows 11 Pro, другие версии можно указать, изменив параметр переменной окружения, как написано выше.
Дальнейший процесс полностью автоматический, нужно дождаться, пока контейнер скачается и запустится. Docker будет доступен через браузер на порту 8006.
Если зайти по нашему IP-адресу и указанному порту, мы увидим процесс скачивания ISO-образа Windows с сервера Microsoft:
Потом автоматическая установка и настройка Windows:
Это специальная версия Windows for Docker, она свободно распространяется с сайта Microsoft и требует активации для полноценной работы. Более старые версии Windows работают 30 дней без активации.
После завершения процесса в браузере откроется рабочий стол Windows:
Через браузер у нас работает система удалённого доступа к рабочему столу VNC (Virtual Network Computing), которая заметно подтормаживает, не поддерживает передачу звука и некоторых других функций. Для максимального комфорта рекомендуется настроить удалённый доступ через RDP. Собственно, этот доступ уже настроен в вышеуказанном файле compose.yaml
, в котором присутствуют такие строки:
- 3389:3389/tcp
- 3389:3389/udp
По этим портам и осуществляется удалённый доступ к системе из RDP-клиента, такого как Microsoft Remote Desktop, можно на той же физической системе.
В командной строке для запуска контейнера мы видим параметр --device=/dev/kvm
. Это указывает на использование виртуальной машины KVM (Kernel-based Virtual Machine), опенсорсной технологии виртуализации, встроенной в Linux. В частности, KVM позволяет превратить Linux в гипервизор для запуска нескольких изолированных виртуальных окружений, то есть виртуальных машин.
KVM — это часть Linux с 2006 года (с версии ядра 2.6.20), то есть в данном случае мы работаем с нативной виртуальной машиной Linux. Чтобы это стало возможным, материнская плата должна поддерживать технологию виртуализации на аппаратном уровне:
Чтобы проверить наличие поддержки KVM на сервере под Linux, можно запустить следующую команду:
sudo apt install cpu-checker
sudo kvm-ok
Если kvm-ok
выдаёт ошибку, то нужно проверить, что:
- в BIOS включены соответствующие расширения виртуализации (Intel VT-x, VT-d или AMD SVM),
- включена «вложенная виртуализация», если контейнер запускается внутри виртуальной машины.
К сожалению, большинство облачных провайдеров не разрешают вложенную виртуализацию на своих VPS:
Поэтому Windows в докер-контейнере запустится только на выделенном сервере или на домашнем сервере/ПК.
Если kvm-ok
не выдаёт никакой ошибки, но контейнер всё равно сообщает об отсутствии KVM-устройства, причиной может быть проблема с правами, в качестве решения можно добавить параметр privileged: true
в файл compose
(или sudo
в команду docker).
KVM обеспечивает виртуальной машине доступ к USB-устройствам и другим аппаратным ресурсам. Он позволит даже редактировать BIOS, как в примере выше.
По умолчанию, контейнеру Windows выделяется два ядра CPU и 4 ГБ RAM, это минимальные требования для запуска Windows 11. Чтобы изменить объём выделяемых ресурсов, следует добавить следующие строчки в конфигурационный файл:
environment:
RAM_SIZE: "8G"
CPU_CORES: "4"
Увеличение объёма дискового пространства со стандартных 64 ГБ (по умолчанию) до 100 ГБ:
environment:
DISK_SIZE: "100G"
Виртуальная машина будет занимать столько места на диске, сколько реально занимает контейнер с файлами, а не максимальное указанное значение.
Добавить несколько дисков:
environment:
DISK2_SIZE: "32G"
DISK3_SIZE: "64G"
volumes:
- ./example2:/storage2
- ./example3:/storage3
Зачем это нужно
Распространённая причина запуска Windows в контейнере — если у нас чисто линуксовое (или яблочное) окружение, вокруг нет ни одного компьютера под Windows, но срочно понадобилось запустить какую-то специфическую программу, которая работает только под Windows. В окружении виртуализации типа Wine эта программа не полностью функциональна. Например, старая утилита для редактирования BIOS (как AMIBCP на скриншоте) запускается под Wine, но не даёт реально изменять значения BIOS, то есть не сохраняет образ ROM:
Конечно, можно установить на ПК мультизагрузчик и вторую ОС или запустить виртуальную машину, но это тоже непростой и многоступенчатый процесс: сконфигурировать гипервизор, выделить аппаратные ресурсы.
Копия Windows в контейнере — самый простой и быстрый способ, если срочно нужна эта ОС. И самое удобное то, что не нужно проходить через процесс инсталляции системы вручную, потому что она устанавливается автоматически и сразу готова к работе. Вся процедура скачивания и запуска контейнера занимает несколько минут.
Другие наборы контейнеров
Кроме перечисленных выше, в репозитории Dockur есть и другие наборы докер-контейнеров, а также программы, полезные для самохостинга:
- Windows для ARM64,
- сервер Samba SMB,
- Dnsmasq,
- strfry, рилей-сервер Nostr,
- casa, операционная система CasaOS для самохостинга (личное облако или домашний дата-центр),
- statping — страничка с красивыми графиками, аналитикой и плагинами, всё для мониторинга сайтов и приложений,
- lemmy — агрегатор ссылок и форум, аналог Reddit или Hacker News, только для децентрализованной сети будущего, где у каждого пользователя свой сервер.
Windows на виртуальном сервере
Хотя KVM не работает на VPS, в маркетплейсе RUVDS есть четыре образа с установленной системой Windows Server 2019 и специализированным программным обеспечением:
- METATRADER 5 (MT5) – SERVER CORE с торговым терминалом MT5,
- SQL EXPRESS – SERVER CORE c бесплатной редакцией SQL Server 2019 и SQL Server Management Studio 18.4. Максимальный размер БД в этой редакции ограничен 10 ГБ,
- сервер Minecraft,
- VPN L2TP — позволяет сразу после установки шаблона подключаться к серверу по VPN, целиком меняя IP-адрес подключившегося.
Если выбрать такой образ — мы получаем готовую лицензированную Windows и настроенный софт.
Кроме того, при ручной конфигурации сервера в конфигураторе есть возможность выбрать несколько версий серверной ОС Windows для установки:
- Windows Server 2022.
- Windows Server 2019.
- Windows Server 2016.
- Windows Server 2012 R2.
- Windows Server Core 2022.
Есть и готовые тарифы с Windows:
Самая дешёвая Windows 2012 R2 стоит 588 руб. в месяц (470 руб. при оплате за год).
С 2023 года у российских пользователей возникли проблемы с покупкой Windows в условиях санкций. В такой ситуации выбор VPS с предустановленной Windows или докер-контейнер с официальным образом — легальный выход из ситуации.
Кстати, таким же удобным способом в Docker/QEMU можно запускать и Linux-контейнеры.
© 2025 ООО «МТ ФИНАНС»
Telegram-канал со скидками, розыгрышами призов и новостями IT 💻
Introduction
Wine is a common tool to run Windows applications on Linux. In this blog post, I would like to discuss how to run Windows applications, such as WeChat, via Wine in a Linux Docker container.
Docker Wine
We will quickly go through the Wine Dockerfile and the basic Wine usages. All the commands could also be translated to a native Ubuntu operating system.
Dockerfile
The following Dockerfile has the Wine, languages, Chinese fonts, and display scaling installed.
1 |
FROM ubuntu:20.04 |
Build Docker Image
To build the Docker image, please run the following command.
1 |
$ docker build -f wine.Dockerfile --tag wine:20.04 . |
Run Docker Container
To run the Docker container, please run the following command with additional Docker arguments if necessary.
1 |
$ xhost + |
Configure Wine
For Win32 applications, we create a directory ~/.wine32
to store the configurations.
1 |
$ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg |
For Win64 applications, we create a directory ~/.wine64
to store the configurations.
1 |
$ WINEARCH=win64 WINEPREFIX=~/.wine64 winecfg |
Run Application
For Win32 applications, we specify the Win32 configuration directory as WINEPREFIX
before wine
.
1 |
$ WINEPREFIX=~/.wine32 wine app.exe |
For Win64 applications, we specify the Win64 configuration directory as WINEPREFIX
before wine
.
1 |
$ WINEPREFIX=~/.wine64 wine app.exe |
Run Display Scaling
For some old applications, the display usually is very small. We could scale the display using a scaling script.
For example, to scale the display of app.exe by 1.5x, we could run the following command.
1 |
$ WINEPREFIX=~/.wine32 run_scaled --scale=1.5 wine app.exe |
Save Docker Image
We can save the Docker image from the Docker container we just set up using docker commit
. In case we accidentally turn off the Docker container, we can always start the Docker container again from the Docker image without having to reinstall Wine and the application.
Example
We will use running Windows WeChat as an example.
Download WeChat
1 |
$ wget https://dldir1.qq.com/weixin/Windows/WeChatSetup.exe |
Run Docker Container
1 |
$ xhost + |
Notice --rm
has been removed and -e XMODIFIERS=@im=fcitx
, -e QT_IM_MODULE=fcitx
, -e GTK_IM_MODULE=fcitx
has been added to enable the fcitx
input from the host computer.
Configure Wine
1 |
$ WINEARCH=win64 WINEPREFIX=~/.wine64 winecfg |
Make sure virtual desktop is used in winecfg
. In my case, I used resolution 2560 x 1440
for the virtual desktop.
Install WeChat
1 |
$ cd /mnt |
WeChat will be installed in ~/.wine64/drive_c/Program\ Files\ \(x86\)/Tencent/WeChat/WeChat.exe
by default.
Run WeChat
1 |
$ WINEPREFIX=~/.wine64 wine ~/.wine64/drive_c/Program\ Files\ \(x86\)/Tencent/WeChat/WeChat.exe |
I tried fcitx
input from the host computer to the WeChat in the container and it worked fine.
References
- Wine Docker Image — GitHub
- Fcitx Chinese Input Setup on Ubuntu for Gaming
- How-To: Upscale Old Games on Linux
Введение
Docker — это мощный инструмент для контейнеризации приложений и их изолированного выполнения на различных платформах. Одним из интересных случаев использования Docker является обеспечение возможности запуска Windows-приложений в среде Linux, используя Wine. Wine, являясь совместимым слоем, позволяет запускать приложения, предназначенные для Windows, на других операционных системах, а совместное использование с Docker упрощает настройку и развертывание. В этой статье мы рассмотрим, как можно использовать Wine в Docker, чтобы эффективно и удобно запускать Windows-приложения.
Что такое Wine и Docker?
Основы Wine
Wine (Wine Is Not an Emulator) — это слой совместимости, позволяющий запускать Windows-программы на Unix-подобных системах. В отличие от эмуляторов, которые создают виртуальные машины с полноценной операционной системой, Wine работает на уровне API, что позволяет достигать высокой производительности. Wine обрабатывает вызовы Windows API и переводит их в POSIX-совместимые вызовы, которые могут выполняться в среде Linux или macOS.
Основы Docker
Docker — это платформа для разработки, отправки и запуска приложений в контейнерах. Контейнеры обеспечивают изоляцию процессов и автономную среду, что делает их идеальными для разработки, тестирования и развертывания программного обеспечения. В отличие от виртуальных машин, контейнеры используют ту же операционную систему, что и хост, что делает их более легковесными и быстрыми.
Почему полезно использовать Wine в Docker?
Использование Wine в Docker позволяет объединить преимущества обоих инструментов: совместимость Windows-приложений благодаря Wine и изоляцию и простоту развертывания, предлагаемые Docker. Это дает возможность, например, запускать устаревшие программы Windows на современных системах без необходимости настройка эмуляции всего окружения Windows.
Настройка окружения для использования Wine в Docker
Подготовка Dockerfile
Для начала нам потребуется создать Dockerfile — текстовый документ с инструкциями для построения Docker-образа. Давайте рассмотрим простой пример создания Docker-образа с установленным Wine.
# Базовый образ Ubuntu
FROM ubuntu:20.04
# Установка необходимых инструментов
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y software-properties-common wget && \
wget -nc https://dl.winehq.org/wine-builds/winehq.key && \
apt-key add winehq.key && \
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' && \
apt-get update && \
apt-get install -y --install-recommends winehq-stable
# Создание директории для приложения Windows
RUN mkdir /app
# Определение рабочей директории
WORKDIR /app
# Установка переменной окружения для Wine
ENV WINEPREFIX=/wine
# Запуск командной оболочки после создания контейнера
CMD ["/bin/bash"]
В этом Dockerfile мы:
- Используем образ Ubuntu 20.04 в качестве базового.
- Добавляем архитектуру i386, актуализируем репозитории и устанавливаем необходимые инструменты.
- Добавляем репозиторий Wine и устанавливаем стабильную версию.
- Создаем рабочую директорию для файлов приложения.
Сборка и запуск образа
Теперь, когда Dockerfile готов, вы можете собрать Docker-образ и запустить контейнер. Давайте посмотрим, как это сделать.
- Сборка образа:
docker build -t wine-container .
- Запуск контейнера:
docker run -it --name my-wine-app wine-container
Контейнер запустится и предоставит вам командную оболочку, где вы сможете взаимодействовать с установленным Wine.
Запуск Windows-приложений в Docker с Wine
Копирование приложения в контейнер
Чтобы запустить Windows-программу, сначала нужно скопировать ее в контейнер. Это можно сделать с помощью команды docker cp
. Давайте рассмотрим пример.
# Копирование приложения в контейнер
docker cp /path/to/your/windows/app.exe my-wine-app:/app/
Запуск приложения
Теперь, когда приложение скопировано в контейнер, вы можете его запустить с помощью Wine. Убедитесь, что вы находитесь в контейнере (используйте команду docker exec -it my-wine-app /bin/bash
для входа в контейнер) и выполните следующую команду для запуска.
wine /app/app.exe
В этом примере приложение app.exe
будет запущено в контейнере Docker с использованием Wine.
Заключение
Способность запускать Windows-программы в изолированной среде с помощью Wine в Docker открывает множество возможностей для пользователей, которым необходимо работать с Windows-приложениями на Linux-системах. Мы рассмотрели, как создать Docker-образ с Wine, как его запустить и как использовать это окружение для запуска приложений. Такое решение может быть особенно полезным для разработки, тестирования и развертывания Windows-приложений без необходимости использования собственных средств.
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign up
I learned about an exciting project via an email from the developer. I would like to share a new project that allows you to run Windows inside a Docker container without jumping through a lot of hoops. What’s more, you can do this using a Linux Docker host with KVM installed. Let’s take a look at this really cool project in the following content to see how we can run Windows in this context.
Table of contents
- What is Dockurr?
- Prerequisites
- Install Kernel Virtual Machine (KVM)
- Pull down Dockurr in a container and spin up Windows in a Docker container
- Connecting RDP to Windows 11 desktop running in the container
- Running different Windows OS images in Docker
- Custom images
- Networking
- CPU and memory
- What use case does this solve?
- Different than traditional Windows containers
- Docker desktop is still a viable solution
- Wrapping up running Windows 11 Desktop in a Docker container
What is Dockurr?
It is a free and open-source project that allows running Windows client and Windows Server desktop installations inside a Docker container environment. It also allows you to do this on a Linux Docker host that would normally only be able to run Linux containers. Using KVM acceleration, it allows you to run Windows containers on a Linux container host without the need to install and start Docker Desktop or other compatibility issues that are typical with mixing OS’es between Linux and Windows.
You can find the project link to the official Github site here: dockur/windows: Windows in a Docker container. (github.com) .
Instead you can run Windows containers simultaneously with Linux containers using the solution after loading a Docker installation, Docker daemon, etc. Typically Docker Desktop is needed to run the Docker Engine and be able to run containers on Windows, or the reverse is true to run Linux on Windows, using something like WSL, WSL2, or Hyper-V.
It also provides a VNC connection to the container during the installation process. It also allows you to connect via Remote Desktop Protocol (RDP) to the Windows installation running in Docker.
What Windows distro configurations are supported?
- Windows 11 Pro
- Windows 10 Pro
- Windows 10 LTSC
- Windows 8.1 Pro
- Windows 7 SP1
- Windows Vista SP2
- Windows XP SP3
- Windows Server 2022
- Windows Server 2019
- Windows Server 2016
- Windows Server 2012 R2
- Windows Server 2008 R2
- Tiny 11 Core
- Tiny 11
- Tiny 10
Prerequisites
As mentioned, you will need:
- A Linux Docker host (so a Windows Docker host is not required)
- You will need to install Kernel Virtual Machine (KVM) on the Docker host
Install Kernel Virtual Machine (KVM)
First, let’s quickly look at installing Kernel Virtual Machine (KVM) that is used to run virtual machines. If you don’t have KVM installed and attempt to run the container, you will receive an error. I am using an Ubuntu Server 22.04 LTS machine running as a Virtual Machine with nested virtualization enabled on the VM, which allows you to enable hardware virtualization. However, you could use Debian, or another distribution that you like to work with.
Run the following from the command line to install KVM. Make sure you are root or in the sudo users permissions group.:
sudo apt install libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu qemu-kvm
Pull down Dockurr in a container and spin up Windows in a Docker container
After installing KVM on our Linux Docker host, we can now spin up the Docker container called Dockurr, which uses the isolation of KVM. We can do this with some simple Docker compose code. When you spin up the default container configuration, it will pull a Windows 11 Docker image. Note the example Docker compose configuration below:
version: "3"
services:
windows:
image: dockurr/windows
container_name: windows
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m
restart: on-failure
Below, we are running a docker-compose up -d command to bring up the container.
You an also use a docker run command from the docker CLI to pull the container down as well:
docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
After you use the above commands to pull down the Dockurr solution, you can connect to the container on your container host by connecting to your container host in a browser on port 8006 for UI access.
You will see the following screens during the install. It will show that itis downloading the image and a few other things as it gets distracted.
The image will show it is downloading, and then extracting the files it needs for the installation in the background.
After the extraction is complete, it will show to be building.
Setup starts with Windows 11 and the order of step configuration below will be familiar.
You will see the normal Windows installation start in the web console.
You will see the installation begin automatically as it does when you have an unattend file, which is likely what is happening under the hood.
After the installation completes, it will automatically login using the docker username.
You may wonder which variant of Windows 11 is installed by default. From the Windows command prompt, you can run a winver command using Windows terminal and it looks to install Version 23H2 OS Build 22631.3155.
Connecting RDP to Windows 11 desktop running in the container
Now, we know we can connect using VNC over port 8006. Let’s see if we can connect using Remote Desktop Protocol (RDP).
Connect to the hostname or IP of your Docker host, port 3389. The login credentials are:
- username: docker
- password: {blank}
Running different Windows OS images in Docker
As mentioned at the outset, you can run a wide range of different Windows operating systems in this tool. How do you specify a different version of Windows to be used instead of the default Windows 11 image?
environment:
VERSION: "win11"
You can use the following designators in the environment variable to note which version of Windows you want to spin up (win11, win10, ltsc10, win7, etc) in the information list below:
win11 | Windows 11 Pro | Microsoft | Fast | 6.4 GB |
win10 | Windows 10 Pro | Microsoft | Fast | 5.8 GB |
ltsc10 | Windows 10 LTSC | Microsoft | Fast | 4.6 GB |
win81 | Windows 8.1 Pro | Microsoft | Fast | 4.2 GB |
win7 | Windows 7 SP1 | Bob Pony | Medium | 3.0 GB |
vista | Windows Vista SP2 | Bob Pony | Medium | 3.6 GB |
winxp | Windows XP SP3 | Bob Pony | Medium | 0.6 GB |
2022 | Windows Server 2022 | Microsoft | Fast | 4.7 GB |
2019 | Windows Server 2019 | Microsoft | Fast | 5.3 GB |
2016 | Windows Server 2016 | Microsoft | Fast | 6.5 GB |
2012 | Windows Server 2012 R2 | Microsoft | Fast | 4.3 GB |
2008 | Windows Server 2008 R2 | Microsoft | Fast | 3.0 GB |
core11 | Tiny 11 Core | Archive.org | Slow | 2.1 GB |
tiny11 | Tiny 11 | Archive.org | Slow | 3.8 GB |
tiny10 | Tiny 10 | Archive.org | Slow | 3.6 GB |
Custom images
In addition to the versions of Windows you can install by default, you can also use custom images for your Windows media. It is as easy as defining the web location of the Windows custom ISO like the following:
environment:
VERSION: "https://example.com/win.iso"
Networking
If you want to connect your Windows containers to a specific network in production, you can do this with some additional configuration. By default, the containers use bridged networking so that it uses the IP address of the Docker host. However, according to the documentation details, you can manually change this:
docker network create -d macvlan \
--subnet=192.168.0.0/24 \
--gateway=192.168.0.1 \
--ip-range=192.168.0.100/28 \
-o parent=eth0 vlan
Then, you Docker compose file can use this new network by changing it like the following:
services:
windows:
container_name: windows
..<snip>..
networks:
vlan:
ipv4_address: 192.168.0.100
networks:
vlan:
external: true
CPU and memory
You can also configure the CPU and memory resources, using the following:
environment:
RAM_SIZE: "8G"
CPU_CORES: "4"
What use case does this solve?
In case you are wondering, where you would use this type of solution, running Windows inside a Docker container. It is true, we are adding a layer of complexity to the backend instead of just directly running Windows VMs by adding the Docker container layer on top of that.
However, I think this solution would be great for home labs or developers since it allows you to spin up Windows clients and servers very easily in running containers instead of having to provision full virtual machines. Now, granted, you can have a similar experience of easily provisioning Windows virtual machines with something like Packer and Terraform or provisioning using PowerShell.
But, the containers make this even easier. Also, by using Docker containers for the Windows environments, you are saving a considerable amount of disk space for each new virtual machine you spin up, since they are sharing the Windows image.
Different than traditional Windows containers
As noted, we are using a Linux container host, so we are not using a Windows Server to run Windows containers. Windows containers allow you to containerize Windows-based applications in the same way as Linux applications.
Docker provides the following packaged components for your applications: code, runtime, system tools, libraries, and settings. Since it uses traditional Docker technologies, Windows containers must be run on a Windows Docker host.
Keep in mind too, these are not Windows containers that run the Windows desktop. These are generally Windows Server Core images that run Windows applications which can be pulled from the Microsoft repository.
Docker desktop is still a viable solution
Docker Desktop for Windows is an application that leverages Docker’s technology to deploy and manage containers on a Windows 10 or Windows 11 system. It integrates easily with your operating system, allowing you to run both Linux and Windows containers.
Installing Docker Desktop is straightforward. You just download the installer from the Docker Hub website. Once downloaded, run the installer and follow the on-screen instructions. If you run into issues with installing or running Docker Desktop, check out my blog post guide here on Docker Desktop.
Wrapping up running Windows 11 Desktop in a Docker container
Running Windows inside Docker containers can have enormous benefits for spinning up multiple virtual machines for lab environments, development, training scenarios, or other use cases. Using KVM underneath the hood, the performance is good since it is true virtualization and not just emulation. The benefits of containerization for Windows-based applications can help with increased productivity, easier scalability, and consistent operating environments for software development and deployment.
In this article, we have seen how the Dockurr solution allows running Windows desktop environments using Docker containers. It is easy to get started using and managing Windows desktops in this way. This could be a viable alternative to running Kubevirt on top of Kubernetes as it has many features and is perfectly legal since it makes use of Microsoft’s trial software. Let me know your feedback in the comments, or post a new thread in the VHT forums.