Reputation: 51
I'm attempting to create/find a script that downloads and installs docker on windows. Does this already exist or is it not possible?
Upvotes: 1
Views: 3792
Reputation: 633
Here the steps I am using to install Docker CE on my Windows 10. An example with Powershell commands.
# First Download the installer (wget is slow...)
# wget https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe -OutFile docker-installer.exe
(New-Object System.Net.WebClient).DownloadFile('https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe', 'docker-installer.exe')
# Install
start-process -wait docker-installer.exe " install --quiet"
# Clean-up
rm docker-installer.exe
# Run
start-process "$env:ProgramFiles\docker\Docker\Docker for Windows.exe"
write-host "Done."
Upvotes: 2
Reputation: 19279
Installing Docker Engine on Windows Server 2016 is two commands and simple to script:
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
Upvotes: 1