Skip to content

Merge in new, shorter Docker installation steps#14

Closed
PatrickLang wants to merge 17 commits intoStefanScherer:myfrom
PatrickLang:shorterinstall
Closed

Merge in new, shorter Docker installation steps#14
PatrickLang wants to merge 17 commits intoStefanScherer:myfrom
PatrickLang:shorterinstall

Conversation

@PatrickLang
Copy link
Copy Markdown

This matches the current documentation at http://aka.ms/windowscontainers and also makes a few tweaks to speed up the build on Hyper-V.

  • Download latest Docker v1.13, it has Windows fixes that aren't in v1.12.1
  • Use dockerd --register-service instead of sc create
  • Skip defrag on Hyper-V, it doesn't have any benefit and takes a lot of time
  • Enable secure boot & virtualization extensions
  • Update default memory/cpu settings in Vagrant template file for Hyper-V

@StefanScherer
Copy link
Copy Markdown
Owner

@PatrickLang Thank you! There are two conflicting files, seems that I also changed something in the meantime. Can you rebase/resolve it?

@PatrickLang
Copy link
Copy Markdown
Author

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.
Reply to this email directly, view it on GitHubhttps://github.com//pull/14#issuecomment-247629517, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AK0eF7Es3W8259HDXNIY7VQ-CA3HZ0H0ks5qqrSFgaJpZM4J_CP_.

Copy link
Copy Markdown
Owner

@StefanScherer StefanScherer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements (and GitHub for the new review UI :-) )

Comment thread scripts/compact.bat
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" (
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :-)

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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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... :-)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhowardmsft - do you recommend v1.12.1 on TP5 instead? I thought the fixes in v1.13 also apply to TP5/14300

@lowenna
Copy link
Copy Markdown

lowenna commented Sep 19, 2016

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.

@PatrickLang
Copy link
Copy Markdown
Author

Thanks for the feedback. I'll issue a new PR with the rebase and some feedback addressed

@StefanScherer
Copy link
Copy Markdown
Owner

@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 logrus.Error(err) somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants