Created
June 15, 2018 14:28
-
-
Save logankimmel/9c17bd24b21ac193ad40e5ee432474a7 to your computer and use it in GitHub Desktop.
Automation Script to install Docker for Windows on Windows 10
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
#Docker for Windows: | |
Invoke-Webrequest -UseBasicparsing -Outfile "$env:TEMP\DockerForWindows.exe" "https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe" | |
Start-Process -FilePath "$env:TEMP\DockerForWindows.exe" -ArgumentList "install","--quiet" -Wait | |
New-NetFirewallRule -DisplayName "vpnkit" -Direction Inbound -Program "C:\Program Files\docker\docker\resources\vpnkit.exe" -Profile Public -Action Block -Protocol UDP | |
New-NetFirewallRule -DisplayName "vpnkit" -Direction Inbound -Program "C:\Program Files\docker\docker\resources\vpnkit.exe" -Profile Public -Action Block -Protocol TCP | |
New-NetFirewallRule -DisplayName "vpnkit" -Direction Inbound -Program "C:\Program Files\docker\docker\resources\vpnkit.exe" -Profile Private -Action Allow -Protocol UDP | |
New-NetFirewallRule -DisplayName "vpnkit" -Direction Inbound -Program "C:\Program Files\docker\docker\resources\vpnkit.exe" -Profile Private -Action Allow -Protocol TCP | |
$null = Enable-WindowsOptionalFeature -Online -FeatureName containers -All -NoRestart | |
$null = Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart | |
#Optionally, add a local user to the docker-users group | |
Add-LocalGroupMember -Group "docker-users" -Member "test" | |
# Optionally, add a domain group to the docker-users group | |
# $Domain = "{domain}" | |
# $LocalGroup = "docker-users" | |
# $ServerAdminGroup = "{domain-group}" | |
# ([adsi]"WinNT://./$LocalGroup,group").ADD("WinNT://$domain/$ServerAdminGroup") | |
Restart-Computer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment