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




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


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


tldr-pages: Your Command-Line Cheat Sheet for Software Engineers

As software engineers, we frequently interact with the command line. Whether it's git for version control, docker for containerization


The API-First Note-Taking Solution: Why Engineers are Switching to Memos

Memos is essentially a "lightweight self-hosted micro-blogging" platform. Think of it as a private, open-source version of Twitter (X) or Google Keep


A Software Engineer's Guide to Clash Verge Rev

Clash Verge Rev is a modern, cross-platform GUI client for Clash, designed for Windows, macOS, and Linux. As a software engineer


Architecting Autonomous Chatbots: A Deep Dive into AstrBot, Docker, and Python Plugins

Think of it as the "Swiss Army Knife" for building AI agents that actually live where people talk—whether that's Discord


Stop Fumbling with Your Phone: A Guide to Seamless Android Control via escrcpy

Think of it as a polished, user-friendly graphical wrapper for scrcpy (the legendary command-line tool for mirroring Android devices). If you've ever struggled with tiny phone screens while debugging or hated switching between your mouse and a physical phone


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


Unleashing Local AI: Integrating k2-fsa/sherpa-onnx Across 12 Programming Languages

Simply put, it's an open-source, real-time speech and audio processing toolkit built on top of the next-generation Kaldi framework and leveraging ONNX Runtime for high-performance


From EPUB to M4B: Automating Content Creation with Advanced Text-to-Speech

This tool is a powerful utility for creating audiobooks from various e-book formats, leveraging advanced Text-to-Speech (TTS) models and voice cloning technology