Last active
April 5, 2018 08:14
-
-
Save riezebosch/b683ef501f35050abf5fdd6a86926bb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Stop" | |
if ((Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Online).State -ne 'Enabled') { | |
Enable-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Online -All -NoRestart | |
} | |
if ((Get-WindowsOptionalFeature -FeatureName Containers -Online).State -ne 'Enabled') { | |
Enable-WindowsOptionalFeature -FeatureName Containers -Online -All -NoRestart | |
} | |
if (!(Test-Path dockerd.exe)) { | |
Start-BitsTransfer -Destination dockerd.exe -Source https://master.dockerproject.org/windows/x86_64/dockerd.exe | |
} | |
if (!(Test-Path docker.exe)) { | |
Start-BitsTransfer -Destination docker.exe -Source https://master.dockerproject.org/windows/x86_64/docker.exe | |
} | |
if (!(Test-Path release.zip)) { | |
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | |
$wc = New-Object System.Net.WebClient | |
$wc.DownloadFile('https://github.com/linuxkit/lcow/releases/download/4.14.29-0aea33bc/release.zip', "$PSScriptRoot\release.zip") | |
} | |
Remove-Item "$env:ProgramFiles\Linux Containers" -Force -Recurse | |
Expand-Archive release.zip -DestinationPath "$Env:ProgramFiles\Linux Containers\." | |
#rm release.zip | |
.\dockerd.exe -D --experimental | |
docker run --platform linux --rm -ti busybox sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment