Merge in new, shorter Docker installation steps#14
Merge in new, shorter Docker installation steps#14PatrickLang wants to merge 17 commits intoStefanScherer:myfrom
Conversation
This reverts commit 0b5479b.
|
@PatrickLang Thank you! There are two conflicting files, seems that I also changed something in the meantime. Can you rebase/resolve it? |
|
Sure, can rebase it. Any code feedback? Sent from a tiny keyboard On Sep 16, 2016, at 8:23 AM, Stefan Scherer <[email protected]mailto:[email protected]> wrote: @PatrickLanghttps://github.com/PatrickLang Thank you! There are two conflicting files, seems that I also changed something in the meantime. Can you rebase/resolve it? You are receiving this because you were mentioned. |
StefanScherer
left a comment
There was a problem hiding this comment.
Thanks for the improvements (and GitHub for the new review UI :-) )
| net start wuauserv | ||
|
|
||
| cmd /c C:\Windows\Temp\ultradefrag-portable-6.1.0.amd64\udefrag.exe --optimize --repeat C: | ||
| if "%PACKER_BUILDER_TYPE%" neq "hyperv-iso" ( |
There was a problem hiding this comment.
This is fine and keeps the same behaviour for the other builders.
| Write-Host "Install Hyper-V" | ||
| Install-WindowsFeature -Name Hyper-V | ||
| Install-WindowsFeature Hyper-V-Tools | ||
| Install-WindowsFeature -Name Hyper-V -IncludeManagementTools |
| Invoke-WebRequest https://aka.ms/tp5/b/dockerd -OutFile $env:ProgramFiles\docker\dockerd.exe | ||
| Invoke-WebRequest https://aka.ms/tp5/b/docker -OutFile $env:ProgramFiles\docker\docker.exe | ||
| [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Docker", [EnvironmentVariableTarget]::Machine) | ||
| Invoke-WebRequest "https://master.dockerproject.org/windows/amd64/docker-1.13.0-dev.zip" -OutFile "$env:TEMP\docker-1.13.0-dev.zip" -UseBasicParsing |
There was a problem hiding this comment.
In the meantime I updated the script to 1.12.0 and docker pull, but I believe you that the nightly zip contains more valuable improvements. So this is fine!
|
|
||
| Write-Host "Installing WindowsServerCore container image..." | ||
| Run-Interactive -commandline "Install-ContainerImage -Name WindowsServerCore" | ||
| & "C:\Program Files\docker\docker.exe" pull microsoft/windowsservercore:latest |
There was a problem hiding this comment.
Pulling only latest is fine for this setup.
I thought about pinning the versions of the base images, just like someone should use ubuntu:16.04 instead of ubuntu:latest as a good practice.
WDYT?
There was a problem hiding this comment.
Do you have a link to a recommendation there? I could see either way working. I was planning to rebuild this on a regular basis to pick up the latest version of everything for dev purposes, so I chose latest. We will be telling users to update monthly since new microsoft/windowsservercore and microsoft\nanoserver versions will be published monthly.
As long as something is pulled, it will make the image much faster to use. The first pull is a much bigger layer than the later updates will be.
There was a problem hiding this comment.
Even Linux base images on Docker Hub are moving targets, as eg. ubuntu:16.04 and ubuntu:14.04 both are only 24 days old at the moment. So they get updated on a regular basis.
So I think latest can also be used. That is fine for me.
| Invoke-WebRequest https://aka.ms/tp5/b/docker -OutFile $env:ProgramFiles\docker\docker.exe | ||
| [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Docker", [EnvironmentVariableTarget]::Machine) | ||
| Invoke-WebRequest "https://master.dockerproject.org/windows/amd64/docker-1.13.0-dev.zip" -OutFile "$env:TEMP\docker-1.13.0-dev.zip" -UseBasicParsing | ||
| Expand-Archive -Path "$env:TEMP\docker-1.13.0-dev.zip" -DestinationPath $env:ProgramFiles |
There was a problem hiding this comment.
Problem with latest 1.13.0-dev.zip:
Error starting daemon: The docker daemon requires build 14393 or later of Windows Server 2016 or Windows 10
That's why I prefer pinning to a specific version. I know it should be only a few days... :-)
There was a problem hiding this comment.
@jhowardmsft - do you recommend v1.12.1 on TP5 instead? I thought the fixes in v1.13 also apply to TP5/14300
|
As of last week, dockerd from master will no longer run on TP5. A block has been put in. Also I'm slowly ripping out TP5 hacks. |
|
Thanks for the feedback. I'll issue a new PR with the rebase and some feedback addressed |
|
@jhowardmsft ok, sure. Only thing is that I found out this error message by manually starting dockerd.exe as no error was found in Event log. Seems that https://github.com/docker/docker/blob/4a0419f536ce3a7b1eade67440cfc84d6e486caf/daemon/daemon_windows.go#L169 should be send to |
This matches the current documentation at http://aka.ms/windowscontainers and also makes a few tweaks to speed up the build on Hyper-V.