Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add windows dockerfile #75

Merged
merged 3 commits into from
Oct 12, 2017

Conversation

friism
Copy link
Contributor

@friism friism commented Sep 9, 2017

  1. The next Windows version has support for bind-mounting the Windows Docker engine named pipe
  2. This means it's meaningful to have an image with just docker.exe in it
  3. In this new version, nanoserver doesn't have PowerShell anymore, so you're fully reliant on a builder image to get set up: https://docs.microsoft.com/en-us/windows-server/get-started/nano-in-semi-annual-channel

This PR can be tested with:

  1. requires late-model windows insider (I tested on 16278)
  2. Get-Content .\17.09-rc\windows\Dockerfile | docker build -t docker -
docker run  -v \\.\pipe\docker_engine:\\.\pipe\docker_engine docker version
Client:
 Version:      17.09.0-ce-rc1
 API version:  1.31
 Go version:   go1.8.3
 Git commit:   ae21824
 Built:        Wed Sep  6 22:25:14 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.09.0-ce-rc1
 API version:  1.32 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   ae21824
 Built:        Wed Sep  6 22:35:40 2017
 OS/Arch:      windows/amd64
 Experimental: true

@tianon
Copy link
Member

tianon commented Sep 20, 2017

This move to "powerless" Nano Server is going to be a very, very irritating compatibility break across the board. 😞 (PowerShell makes Nano Server actually useful IMO -- without PowerShell, it might as well just be "FROM scratch for Windows" instead of "Alpine for Windows", which is essentially what it is today -- both have a place, but I'd argue that Alpine is way more useful and usable for almost all use cases.)

On that note, being able to support multi-stage builds is something we'd like official images to be able to do, but there is a lot of work we have to do before we can really get there (see docker-library/official-images#3383 for more details on that, especially docker-library/official-images#3383 (comment) which is a non-exhaustive list of things that need to happen besides "just" updating all our nodes to Docker 17.05+).

I'd be 100% +1 on windowsservercore-based image variants in the meantime, though!

@friism
Copy link
Contributor Author

friism commented Sep 20, 2017

updated

@tianon tianon force-pushed the add-windows-docker-image branch from 690aa8b to 2f6926c Compare October 12, 2017 23:48
@tianon
Copy link
Member

tianon commented Oct 12, 2017

Sorry for the hyper-long delay. 😞

I've rebased this, and updated it to include both the necessary changes to generate-stackbrew-library.sh and update.sh, use a template file, and added it for all currently-supported versions. 👍 ❤️

(I'll probably add AppVeyor to verify the builds in a separate PR later. 👍)

@tianon
Copy link
Member

tianon commented Oct 12, 2017

A few useful outputs:

$ ./update.sh
17.06: 17.06.2-ce (stable)
17.07: 17.07.0-ce (edge)
17.09: 17.09.0-ce (stable)
17.10-rc: 17.10.0-ce-rc2 (test)
$ diff -u <(bashbrew cat docker) <(bashbrew cat <(./generate-stackbrew-library.sh))
--- /dev/fd/63	2017-10-12 16:52:37.998420528 -0700
+++ /dev/fd/62	2017-10-12 16:52:37.998420528 -0700
@@ -13,6 +13,12 @@
 GitCommit: 8ada62f762b30d09fd54664710c0ef3b64038f07
 Directory: 17.10-rc/git
 
+Tags: 17.10.0-ce-rc2-windowsservercore, 17.10-rc-windowsservercore, rc-windowsservercore
+Architectures: windows-amd64
+GitCommit: 2f6926c4fb37274b90fae3ba6c3320619a8d0289
+Directory: 17.10-rc/windows/windowsservercore
+Constraints: windowsservercore
+
 Tags: 17.09.0-ce, 17.09.0, 17.09, 17, stable, test, edge, latest
 GitCommit: 454a0ff9e99d4fde7112b25d64d25f940ab28a99
 Directory: 17.09
@@ -25,6 +31,12 @@
 GitCommit: a6b52c73daa8283cd861f41f55e53426008708ac
 Directory: 17.09/git
 
+Tags: 17.09.0-ce-windowsservercore, 17.09.0-windowsservercore, 17.09-windowsservercore, 17-windowsservercore, stable-windowsservercore, test-windowsservercore, edge-windowsservercore, windowsservercore
+Architectures: windows-amd64
+GitCommit: 2f6926c4fb37274b90fae3ba6c3320619a8d0289
+Directory: 17.09/windows/windowsservercore
+Constraints: windowsservercore
+
 Tags: 17.07.0-ce, 17.07.0, 17.07
 GitCommit: 454a0ff9e99d4fde7112b25d64d25f940ab28a99
 Directory: 17.07
@@ -37,6 +49,12 @@
 GitCommit: a8f8fa1b57349cc22c80e7d6cbbdb512ffee2bd2
 Directory: 17.07/git
 
+Tags: 17.07.0-ce-windowsservercore, 17.07.0-windowsservercore, 17.07-windowsservercore
+Architectures: windows-amd64
+GitCommit: 2f6926c4fb37274b90fae3ba6c3320619a8d0289
+Directory: 17.07/windows/windowsservercore
+Constraints: windowsservercore
+
 Tags: 17.06.2-ce, 17.06.2, 17.06
 GitCommit: 454a0ff9e99d4fde7112b25d64d25f940ab28a99
 Directory: 17.06
@@ -48,3 +66,9 @@
 Tags: 17.06.2-ce-git, 17.06.2-git, 17.06-git
 GitCommit: 168a6d227d021c6d38c3986b7c668702ec172fa7
 Directory: 17.06/git
+
+Tags: 17.06.2-ce-windowsservercore, 17.06.2-windowsservercore, 17.06-windowsservercore
+Architectures: windows-amd64
+GitCommit: 2f6926c4fb37274b90fae3ba6c3320619a8d0289
+Directory: 17.06/windows/windowsservercore
+Constraints: windowsservercore

@tianon
Copy link
Member

tianon commented Oct 12, 2017

I have also personally built and verified all four versions, and they all build successfully and have the appropriate output during the Verifying stage of the Dockerfile. 👍

@yosifkit yosifkit merged commit 6fc3163 into docker-library:master Oct 12, 2017
@tianon tianon mentioned this pull request Oct 13, 2017
@tianon
Copy link
Member

tianon commented Oct 13, 2017

... and now AppVeyor is enabled and Green for this repo: #85 👍 🤘

tianon added a commit to infosiftr/stackbrew that referenced this pull request Oct 13, 2017
- `docker`: add client-only Windows variants (docker-library/docker#75)
- `ghost`: 0.11.12
- `rabbitmq`: escape special characters in config (docker-library/rabbitmq#201)
- `redmine`: passenger 5.1.10
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