Skip to content

Add "windowsservercore" variant #106

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

Merged
merged 4 commits into from
Aug 12, 2016
Merged

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 3, 2016

Closes #92 (commits included here)

Here's a snippet of the updated generate-stackbrew-library.sh output:

...

Tags: 1.6.3-alpine, 1.6-alpine, 1-alpine, alpine
GitCommit: 9f666dc2f4f51df564613f787d28b3a2353243e0
Directory: 1.6/alpine

Tags: 1.6.3-windowsservercore, 1.6-windowsservercore, 1-windowsservercore, windowsservercore
GitCommit: a30dac9f2492855f5040cb67de95d7181eebc9b8
Directory: 1.6/windows/windowsservercore
Constraints: windowsservercore

Tags: 1.7rc4, 1.7
GitCommit: cdf73bb71f9a0c0f9aa22beb3d9d34274aaf1b03
Directory: 1.7

...

@tianon
Copy link
Member Author

tianon commented Aug 4, 2016

I've used the following Dockerfile to test this (installing choco to install git to go get github.com/constabulary/gb) successfully:

FROM golang:windowsservercore

RUN Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression

RUN choco install -y -params /GitAndUnixToolsOnPath git.install

RUN go get -v github.com/constabulary/gb/...; \
    gb help;

A few size notes:

  • microsoft/windowsservercore: ~7.764 GB
  • golang:windowsservercore: ~8.211 GB (so Go itself is ~0.447 GB)
  • choco: ~8.279 GB (so choco is ~0.068 GB)
  • git.install: ~8.808 GB (so Git itself is ~0.529 GB -- yes, bigger than Go)
  • go get .../gb/...: ~8.864 GB

So I'm very strongly -1 on including Git by default, even though it hampers go get usage slightly (especially given that it really isn't all that hard to write those two lines to install choco and then git).

@yosifkit
Copy link
Member

I am going to argue for including git:

  • it is included in all* golang images
    • we even include bzr, mercurial, and subversion
  • we include build tools like gcc/g++, and make too

So, are we going to treat the 7.7GB base windows image like the alpine tags and force users to sideload the tools they actually need? Maybe we could skip used tools like git in the nanoserver images?

Possibly useful links to install git without resorting to choco:

* except alpine based images

@tianon
Copy link
Member Author

tianon commented Aug 11, 2016

Fair point -- so windowsservercore is the "full-featured" version, and nanoserver is the slim variant. Seems sane to me, and matches how nanoserver is generally described. 👍

(Probably worth noting that we're still working on a way to build official nanoserver-based images, which is why they are not included here.)

@tianon
Copy link
Member Author

tianon commented Aug 11, 2016

Ok, updated to install Git (without installing choco, which makes our Dockerfile a fair bit more verbose, but IMO is worth it to leave the unrelated choco as a choice for our users instead).

@yosifkit
Copy link
Member

LGTM

@yosifkit yosifkit merged commit f79bcf9 into docker-library:master Aug 12, 2016
@yosifkit yosifkit deleted the windows branch August 12, 2016 17:26
@tianon
Copy link
Member Author

tianon commented Aug 12, 2016

Step 1, ✅
Step 2, docker-library/official-images#2051

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