Windows in a Box: Simplified Testing with Docker


Windows in a Box: Simplified Testing with Docker

dockur/windows

2025-08-31

Cross-Platform Testing
If you're building an application that needs to work on multiple operating systems, you can use this Docker image to quickly and easily test how your software behaves on Windows without needing a dedicated virtual machine or physical machine. This is great for CI/CD pipelines.

Sandboxed Environments
It provides a safe, isolated environment to test untrusted applications or scripts. You can run something in the container, and if it's malicious or unstable, it won't affect your host machine.

Automating Windows-Specific Tasks
You can use this image to automate tasks that require a Windows environment, like running PowerShell scripts, testing legacy applications, or using Windows-only command-line tools. This can be integrated into build scripts or automated workflows.

First, you'll need Docker installed on your machine. If you don't have it, you can get it from the Docker website.

Once Docker is ready, you can pull the dockur/windows image from Docker Hub. Just open your terminal or command prompt and run this command

docker pull dockur/windows

After the image is downloaded, you can run a container from it. The simplest way to run it is like this

docker run -it --rm dockur/windows

-it
This gives you an interactive shell inside the container.

--rm
This automatically removes the container when you exit, which is great for cleanup.

This will run a shell inside the Windows container. You can run Windows commands, but it's a very stripped-down environment. To get a more useful experience, you'll want to access the desktop, which requires a VNC client.

To see the Windows desktop, you need to expose the VNC port. By default, VNC runs on port 5900 inside the container. You'll map this to a port on your host machine.

Here's an example

docker run -p 5900:5900 --name my-windows-vm dockur/windows

-p 5900:5900
This maps port 5900 on your host to port 5900 in the container.

--name my-windows-vm
This gives the container a friendly name.

Once the container is running, you can connect to it using a VNC client. Just open your VNC client and connect to localhost:5900.

The default VNC password is vncpassword. You can change this when you run the container if you like.

Let's say you have a PowerShell script named test.ps1 on your host machine that needs to be executed on Windows. You can use the dockur/windows image to do this.

Create your PowerShell script (test.ps1)

Write-Host "Hello from Windows!"

Run the Docker container and mount the script
You can use a volume mount to make your local file accessible inside the container.

docker run --rm -v $(pwd):/data dockur/windows powershell.exe -ExecutionPolicy Bypass -File C:\data\test.ps1

--rm
Cleans up the container after it's done.

-v $(pwd):/data
This is the key part. It mounts your current directory ($(pwd)) to a /data directory inside the container. This makes your test.ps1 script available at C:\data\test.ps1.

powershell.exe -ExecutionPolicy Bypass -File C:\data\test.ps1
This is the command that gets executed inside the container. It runs your PowerShell script.

This command will output

Hello from Windows!

dockur/windows




Running Windows Applications on Linux with winboat

As a developer, you often encounter situations where a client, a specific library, or a tool you need for a project only works on Windows


Winapps: Seamlessly Integrate Windows Apps into Your Linux Workflow

Imagine you're a Linux user, maybe you're developing on a powerful Ubuntu machine because of its excellent command-line tools and development environment


DIY Monitoring for Engineers: Deploying Uptime Kuma with Docker

Uptime Kuma is a versatile and user-friendly self-hosted monitoring tool that provides a slick, modern dashboard for keeping tabs on your applications and services


From Chaos to Consistency: Mastering Third-Party C++ Libraries with vcpkg

vcpkg (short for "Visual C++ Package") is a cross-platform command-line package manager for C and C++ libraries, supporting Windows


Technical Breakdown: How TrendRadar's NLP Features Streamline Software Engineering Tasks

Here is a friendly, detailed breakdown, focusing on the technical value and implementation steps.The sansan0/TrendRadar project is essentially a sophisticated AI-driven news aggregation and monitoring system


Neko: Self-Hosted Remote Browse for Engineers

At its core, m1k1o/neko is a solution that allows you to run a full-fledged web browser (like Chromium) within a Docker container


Containerized Media Management: Deploying Seerr for Automated Discovery and API-Driven Workflows

If you’re running a media server, you know the headache of friends texting you at 2 AM asking, "Hey, can you add the latest season of that one show?" Seerr solves that by providing a beautiful


Stirling-PDF: Your Privacy-First PDF Toolkit for Engineers

Stirling-PDF is a locally hosted web application that provides a full suite of PDF manipulation tools. Think of it as your personal


LizardByte/Sunshine: The Open-Source Game Streaming Host

Sunshine is a self-hosted game stream host designed to work with clients like Moonlight. Think of it as a server-side application that captures your desktop


Unlock Full Control: Deploying with Dokploy, Docker, and MySQL

Let's break down how Dokploy can be incredibly useful from a software engineer's perspective, along with implementation details and sample code