Commit ec04dc85 authored by Stefan Scherer's avatar Stefan Scherer

Install Docker EE via ZIP, DockerMsftProvider seems broken

parent 4096a91f
$docker_provider = "ce"
$docker_version = "17.10.0"
$docker_provider = "ee"
$docker_version = "18-03-1-ee-2"
if (Test-Path env:docker_provider) {
$docker_provider = $env:docker_provider
}
......@@ -7,24 +7,36 @@ if (Test-Path env:docker_version) {
$docker_version = $env:docker_version
}
$ProgressPreference = 'SilentlyContinue'
if ($docker_provider -eq "ce") {
Set-ExecutionPolicy Bypass -scope Process
New-Item -Type Directory -Path "$($env:ProgramFiles)\docker"
Write-Host "Downloading docker $docker_version ..."
Write-Output "Downloading docker $docker_version ..."
wget -outfile $env:TEMP\docker.zip $("https://download.docker.com/win/static/edge/x86_64/docker-{0}-ce.zip" -f $docker_version)
Expand-Archive -Path $env:TEMP\docker.zip -DestinationPath $env:TEMP -Force
copy $env:TEMP\docker\*.exe $env:ProgramFiles\docker
Remove-Item $env:TEMP\docker.zip
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$($env:ProgramFiles)\docker", [EnvironmentVariableTarget]::Machine)
$env:Path = $env:Path + ";$($env:ProgramFiles)\docker"
Write-Host "Registering docker service ..."
Write-Output "Registering docker service ..."
. dockerd --register-service
} elseif ($docker_provider -eq "ee") {
Set-ExecutionPolicy Bypass -scope Process
New-Item -Type Directory -Path "$($env:ProgramFiles)\docker"
Write-Output "Downloading docker $docker_version ..."
wget -outfile $env:TEMP\docker.zip $("https://dockermsft.blob.core.windows.net/dockercontainer/docker-{0}.zip" -f $docker_version)
Expand-Archive -Path $env:TEMP\docker.zip -DestinationPath $env:TEMP -Force
copy $env:TEMP\docker\*.exe $env:ProgramFiles\docker
Remove-Item $env:TEMP\docker.zip
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$($env:ProgramFiles)\docker", [EnvironmentVariableTarget]::Machine)
$env:Path = $env:Path + ";$($env:ProgramFiles)\docker"
Write-Output "Registering docker service ..."
. dockerd --register-service
} else {
Write-Host "Install-PackageProvider ..."
Write-Output "Install-Module $docker_provider ..."
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Write-Host "Install-Module $docker_provider ..."
Install-Module -Name $docker_provider -Force
Write-Host "Install-Package version $docker_version ..."
Install-Module -Name $docker_provider -Repository PSGallery -Force
Write-Output "Install-Package docker version $docker_version ..."
Set-PSRepository -InstallationPolicy Trusted -Name PSGallery
$ErrorActionStop = 'SilentlyContinue'
Install-Package -Name docker -ProviderName $docker_provider -RequiredVersion $docker_version -Force
......@@ -32,5 +44,5 @@ if ($docker_provider -eq "ce") {
}
$ErrorActionPreference = 'Stop'
Write-Host "Starting docker ..."
Write-Output "Starting docker ..."
Start-Service docker
......@@ -171,8 +171,8 @@
"disk_size": "61440",
"disk_type_id": "1",
"docker_images": "microsoft/windowsservercore microsoft/nanoserver",
"docker_provider": "DockerProvider",
"docker_version": "stable",
"docker_provider": "ee",
"docker_version": "18-03-1-ee-2",
"headless": "false",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
"iso_checksum_type": "md5",
......
......@@ -174,8 +174,8 @@
"disk_size": "61440",
"disk_type_id": "1",
"docker_images": "microsoft/windowsservercore:1709 microsoft/nanoserver:1709",
"docker_provider": "DockerProvider",
"docker_version": "17.10.0-ee-preview-3",
"docker_provider": "ee",
"docker_version": "18-03-1-ee-2",
"headless": "false",
"iso_checksum": "03b97d09b0c19ac6c424c5b41a9b4781cb7334d7ef1158199a9693f7dcecce9f",
"iso_checksum_type": "sha256",
......
......@@ -174,8 +174,8 @@
"disk_size": "61440",
"disk_type_id": "1",
"docker_images": "microsoft/windowsservercore:1803 microsoft/nanoserver:1803",
"docker_provider": "DockerProvider",
"docker_version": "17.10.0-ee-preview-3",
"docker_provider": "ee",
"docker_version": "18-03-1-ee-2",
"headless": "false",
"iso_checksum": "1f396b448ae0a68e5a2f694b0afabb61498e20a5df38c874aacb4e940a661b61",
"iso_checksum_type": "sha256",
......
......@@ -150,8 +150,8 @@
"disk_size": "61440",
"disk_type_id": "1",
"docker_images": "microsoft/nanoserver-insider microsoft/windowsservercore-insider",
"docker_provider": "DockerProvider",
"docker_version": "17.10.0-ee-preview-3",
"docker_provider": "ee",
"docker_version": "18-03-1-ee-2",
"headless": "false",
"iso_checksum": "a4a8349a356d2d04219f417973d2a7576b35ab754cd30ad647d5e89d20890122",
"iso_checksum_type": "sha256",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment