Overview
Native Docker Engine installation provides lightweight Windows container environments without Docker Desktop overhead, licensing complexity, or WSL2 dependencies. This approach is ideal for development, CI/CD runners, and production-like environments.
Who Should Use This Guide:
- Developers needing Windows containers without Docker Desktop licensing
- DevOps engineers setting up CI/CD build servers
- System administrators deploying container hosts
- Organizations with >250 employees avoiding Docker Desktop licensing
Why Native Docker Engine:
| Benefit | Description |
|---|---|
| Cost Savings | Avoid Docker Desktop commercial licensing requirements |
| Resource Efficiency | Lower RAM and CPU usage than Docker Desktop |
| Production Parity | Matches Windows Server container deployments |
| Simplicity | No WSL2 or Hyper-V GUI components required |
Requirements
System Requirements:
| Component | Requirement |
|---|---|
| Operating System | Windows 10/11 Pro/Enterprise or Windows Server 2019/2022 |
| RAM | 4GB minimum, 8GB+ recommended |
| Disk Space | 20GB+ free for images |
| Processor | Hyper-V capable with virtualization enabled |
Windows Features Required:
| Feature | Purpose |
|---|---|
| Microsoft-Hyper-V | Container isolation |
| Containers | Windows container support |
Process
Step 1: Enable Windows Features
Enable required Windows features for container support.
PowerShell (Run as Administrator):
# Enable Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -All -NoRestart
# Enable Containers feature
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -NoRestart
# Restart to apply changes
Restart-ComputerVerification:
Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match "Hyper-V|Containers"}Expected Result: Features show as "Enabled".
Step 2: Download Docker Engine
Download the latest Docker Engine binaries directly from Docker.
Download Latest Version:
# Create installation directory
$installPath = "C:\Program Files\Docker"
New-Item -Path $installPath -ItemType Directory -Force
# Download Docker (check docker.com for latest version)
$dockerUrl = "https://download.docker.com/win/static/stable/x86_64/docker-<version>.zip"
$tempZip = "$env:TEMP\docker.zip"
Invoke-WebRequest -Uri $dockerUrl -OutFile $tempZip
# Extract to temp location
$tempExtract = "$env:TEMP\docker-extract"
Expand-Archive -Path $tempZip -DestinationPath $tempExtract -Force
# Copy binaries to install location
Copy-Item -Path "$tempExtract\docker\*" -Destination $installPath -Recurse -ForceVerification:
Test-Path "C:\Program Files\Docker\dockerd.exe"Expected Result: Returns True.
Step 3: Register Docker Service
Register Docker daemon as a Windows service.
Register Service:
# Register dockerd as a service
& "C:\Program Files\Docker\dockerd.exe" --register-service
# Add Docker to system PATH
$currentPath = [Environment]::GetEnvironmentVariable("PATH", "Machine")
if ($currentPath -notlike "*Docker*") {
[Environment]::SetEnvironmentVariable(
"PATH",
"$currentPath;C:\Program Files\Docker",
"Machine"
)
}
# Refresh PATH in current session
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine")Verification:
Get-Service dockerExpected Output:
Status Name DisplayName
------ ---- -----------
Stopped docker Docker Engine
Step 4: Start Docker Service
Start the Docker service and verify it's running.
Start Service:
Start-Service docker
# Wait for Docker to be ready
$maxAttempts = 12
$attempt = 0
do {
Start-Sleep -Seconds 5
$attempt++
try {
docker version | Out-Null
Write-Host "Docker is ready!" -ForegroundColor Green
break
} catch {
Write-Host "Waiting for Docker... ($attempt/$maxAttempts)"
}
} while ($attempt -lt $maxAttempts)Verification:
docker versionExpected Output:
Client: Docker Engine - Community
Version: 27.x.x
API version: 1.47
...
Server: Docker Engine - Community
Engine:
Version: 27.x.x
...
Step 5: Test Installation
Run a test container to verify everything works.
Run Test Container:
# Pull and run hello-world
docker run hello-worldExpected Output: "Hello from Docker!" message confirming successful installation.
Test Windows Container:
# Pull Windows Server Core image
docker pull mcr.microsoft.com/windows/servercore:ltsc2022
# Run interactive PowerShell
docker run -it mcr.microsoft.com/windows/servercore:ltsc2022 powershellStep 6: Configure Docker Daemon
Customize Docker daemon settings for your environment.
Create daemon.json (C:\ProgramData\Docker\config\daemon.json):
{
"storage-driver": "windowsfilter",
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
},
"dns": ["8.8.8.8", "8.8.4.4"]
}Apply Configuration:
Restart-Service dockerUpdate Docker Engine
Update to the latest version while preserving containers and images.
Update Process:
# Check current version
docker version --format '{{.Server.Version}}'
# Stop Docker service
Stop-Service docker
# Backup current installation
Copy-Item "C:\Program Files\Docker" "C:\Program Files\Docker.backup" -Recurse
# Download and extract new version (same as Step 2)
# Copy new binaries to C:\Program Files\Docker
# Re-register service
& "C:\Program Files\Docker\dockerd.exe" --register-service
# Start Docker
Start-Service docker
# Verify new version
docker versionWhat's Preserved:
- All containers (running and stopped)
- All images
- All volumes
- All networks
Remove Docker Engine
Complete removal for clean reinstallation or system cleanup.
Removal Process:
# Stop Docker service
Stop-Service docker -Force
# Remove service registration
& sc.exe delete docker
# Remove Docker directories
Remove-Item "C:\Program Files\Docker" -Recurse -Force
Remove-Item "C:\ProgramData\Docker" -Recurse -Force
# Remove from PATH
$path = [Environment]::GetEnvironmentVariable("PATH", "Machine")
$newPath = ($path.Split(';') | Where-Object { $_ -notlike "*Docker*" }) -join ';'
[Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
# Remove Docker virtual switches
Get-VMSwitch | Where-Object { $_.Name -like "*Docker*" } | Remove-VMSwitch -ForceNote: Reboot before reinstalling Docker.
Common Docker Commands
Container Management:
# List all containers
docker ps -a
# Start/stop container
docker start <container-id>
docker stop <container-id>
# Remove container
docker rm <container-id>
# Remove all stopped containers
docker container prune -fImage Management:
# List images
docker images
# Pull image
docker pull mcr.microsoft.com/windows/servercore:ltsc2022
# Remove image
docker rmi <image-id>
# Remove unused images
docker image prune -fService Management:
# Check Docker service status
Get-Service docker
# Start/stop/restart Docker
Start-Service docker
Stop-Service docker
Restart-Service docker
# View Docker service logs
Get-EventLog -LogName Application -Source Docker -Newest 20Troubleshooting
Common Issues:
| Symptom | Possible Cause | Solution |
|---|---|---|
| Cannot connect to daemon | Service not running | Run Start-Service docker |
| Hyper-V not enabled | Feature missing | Enable Hyper-V feature and reboot |
| Permission denied | Not running as admin | Run PowerShell as Administrator |
| Container mode unavailable | Containers feature missing | Enable Containers feature |
| Network connectivity issues | Docker NAT misconfigured | Restart Docker service |
Diagnostic Commands:
# Check Docker info
docker info
# Check Docker service status
Get-Service docker
# Check Windows features
Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -match "Hyper-V|Containers"}
# Check Docker network
docker network ls
# Check Docker logs
Get-EventLog -LogName Application -Source Docker -Newest 50Verification Checklist
Installation:
- Hyper-V feature enabled
- Containers feature enabled
- Docker binaries installed
- Docker service registered
Operation:
- Docker service running
-
docker versionshows client and server -
docker run hello-worldsucceeds - Windows container images pull successfully
Configuration:
- PATH includes Docker directory
- daemon.json configured (if needed)
- Service set to automatic start
References
Last Updated: February 2026