Skip to content

Add "windowsservercore" variants - #142

Merged
yosifkit merged 1 commit into
docker-library:masterfrom
infosiftr:windowsservercore
Aug 18, 2016
Merged

Add "windowsservercore" variants#142
yosifkit merged 1 commit into
docker-library:masterfrom
infosiftr:windowsservercore

Conversation

@tianon

Copy link
Copy Markdown
Member

Still a bit of TODO here, specifically around pip version:

Collecting requests
Downloading requests-2.11.1-py2.py3-none-any.whl (514kB)
100% || 522kB 652kB/s
Installing collected packages: requests
Successfully installed requests-2.11.1
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

@tianon

Copy link
Copy Markdown
MemberAuthor

Ok, this is fun. Python 3.3 and 3.4 use an MSI for Windows, but 3.5 and 3.6 no longer provide the MSI and instead provide EXE-based installers (which are more well-documented than the MSIs).

I'm thinking I'm just going to remove 3.3 and 3.4 for now, but still pondering.

@tianon

Copy link
Copy Markdown
MemberAuthor

On the other hand, Python 2.7 uses an MSI as well, so we'd get three versions by implementing an MSI template for older releases.

@tianon
tianonforce-pushed the windowsservercore branch 2 times, most recently from 59a3044 to 287e4ddCompareAugust 18, 2016 20:42
@tianon

Copy link
Copy Markdown
MemberAuthor

Python 3.4.5 no longer supports Windows (https://www.python.org/ftp/python/3.4.5/).

@tianon

Copy link
Copy Markdown
MemberAuthor

Same story with Python 3.3.6 (https://www.python.org/ftp/python/3.3.6/).

@tianon

Copy link
Copy Markdown
MemberAuthor

Whoo, still supported for Python 2.7.12 (https://www.python.org/ftp/python/2.7.12/)!

@tianon

Copy link
Copy Markdown
MemberAuthor
$ docker run --rm ee48833ea1e3 python -c 'import sys; print sys.version'2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)]

@tianon
tianonforce-pushed the windowsservercore branch 6 times, most recently from 7222c4f to 93991daCompareAugust 18, 2016 21:45
@tianon

Copy link
Copy Markdown
MemberAuthor

Ok, I think this is ready. This includes Python 2.7, 3.5, and 3.6, and each has pip installed (latest version), and I've build-tested all three successfully. 👍

The only hitch I've seen is the following on 3.5 and 3.6 (although pip --version shows the correct version, so I think we're safe to ignore it for now):

Installing pip==8.1.2 ...
Collecting pip==8.1.2
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Exception:
Traceback (most recent call last):
File "c:\python\lib\shutil.py", line 381, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-0na5cikf-uninstall\\python\\scripts\\pip.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python\lib\site-packages\pip\basecommand.py", line 209, in main
logger.critical(
File "c:\python\lib\site-packages\pip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "c:\python\lib\site-packages\pip\req\req_set.py", line 743, in install
)
File "c:\python\lib\site-packages\pip\req\req_install.py", line 759, in commit_uninstall
)
File "c:\python\lib\site-packages\pip\req\req_uninstall.py", line 142, in commit
rmtree(self.save_dir)
File "c:\python\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\python\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\python\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\python\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
raise value
File "c:\python\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\python\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "c:\python\lib\shutil.py", line 488, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\python\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\python\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\python\lib\shutil.py", line 383, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "c:\python\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\pip-0na5cikf-uninstall\\python\\scripts\\pip.exe'
Verifying pip install ...
pip 8.1.2 from c:\python\lib\site-packages (python 3.5)
Complete.

@tianon

Copy link
Copy Markdown
MemberAuthor

Image sizes, for comparison/interest:

$ docker images test/pythonREPOSITORY TAG IMAGE ID CREATED SIZEtest/python 3.6 a0b502a14f0c About a minute ago 7.95 GBtest/python 3.5 302730681342 About a minute ago 7.915 GBtest/python 2.7 38afc05150a7 8 minutes ago 7.962 GB
$ docker images microsoft/windowsservercoreREPOSITORY TAG IMAGE ID CREATED SIZEmicrosoft/windowsservercore latest 02cb7f65d61b 9 weeks ago 7.764 GB

@tianon

Copy link
Copy Markdown
MemberAuthor

For completeness:

$ ./update.sh+ sed -ri -e 's/^(ENV GPG_KEY) .*/\1 C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF/' -e 's/^(ENV PYTHON_VERSION) .*/\1 2.7.12/' -e 's/^(ENV PYTHON_RELEASE) .*/\1 2.7.12/' -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 8.1.2/' -e 's/^(FROM python):.*/\1:2.7/' 2.7/Dockerfile 2.7/alpine/Dockerfile 2.7/onbuild/Dockerfile 2.7/slim/Dockerfile 2.7/wheezy/Dockerfile 2.7/windows/windowsservercore/Dockerfile+ sed -ri -e 's/^(ENV GPG_KEY) .*/\1 26DEA9D4613391EF3E25C9FF0A5B101836580288/' -e 's/^(ENV PYTHON_VERSION) .*/\1 3.3.6/' -e 's/^(ENV PYTHON_RELEASE) .*/\1 3.3.6/' -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 8.1.2/' -e 's/^(FROM python):.*/\1:3.3/' 3.3/Dockerfile 3.3/alpine/Dockerfile 3.3/onbuild/Dockerfile 3.3/slim/Dockerfile 3.3/wheezy/Dockerfile+ sed -ri -e 's/^(ENV GPG_KEY) .*/\1 97FC712E4C024BBEA48A61ED3A5CA953F73C700D/' -e 's/^(ENV PYTHON_VERSION) .*/\1 3.4.5/' -e 's/^(ENV PYTHON_RELEASE) .*/\1 3.4.5/' -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 8.1.2/' -e 's/^(FROM python):.*/\1:3.4/' 3.4/Dockerfile 3.4/alpine/Dockerfile 3.4/onbuild/Dockerfile 3.4/slim/Dockerfile 3.4/wheezy/Dockerfile+ sed -ri -e 's/^(ENV GPG_KEY) .*/\1 97FC712E4C024BBEA48A61ED3A5CA953F73C700D/' -e 's/^(ENV PYTHON_VERSION) .*/\1 3.5.2/' -e 's/^(ENV PYTHON_RELEASE) .*/\1 3.5.2/' -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 8.1.2/' -e 's/^(FROM python):.*/\1:3.5/' 3.5/Dockerfile 3.5/alpine/Dockerfile 3.5/onbuild/Dockerfile 3.5/slim/Dockerfile 3.5/windows/windowsservercore/Dockerfile warning: cannot find 3.6 (alpha/beta/rc?)
$ ./generate-stackbrew-library.sh
# this file is generated via https://github.com/docker-library/python/blob/1ad743decae71db424840812eb8dd49557aed9d0/generate-stackbrew-library.shMaintainers: Tianon Gravi <admwiggin@gmail.com> (@tianon), Joseph Ferguson <yosifkit@gmail.com> (@yosifkit)GitRepo: https://github.com/docker-library/python.gitTags: 2.7.12, 2.7, 2GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496Directory: 2.7Tags: 2.7.12-slim, 2.7-slim, 2-slimGitCommit: 2664a9b68104d35c99aa79c56eea24423e6f9807Directory: 2.7/slimTags: 2.7.12-alpine, 2.7-alpine, 2-alpineGitCommit: 2664a9b68104d35c99aa79c56eea24423e6f9807Directory: 2.7/alpineTags: 2.7.12-wheezy, 2.7-wheezy, 2-wheezyGitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496Directory: 2.7/wheezyTags: 2.7.12-onbuild, 2.7-onbuild, 2-onbuildGitCommit: 7663560df7547e69d13b1b548675502f4e0917d1Directory: 2.7/onbuildTags: 2.7.12-windowsservercore, 2.7-windowsservercore, 2-windowsservercoreGitCommit: 1ad743decae71db424840812eb8dd49557aed9d0Directory: 2.7/windows/windowsservercoreConstraints: windowsservercoreTags: 3.3.6, 3.3GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.3Tags: 3.3.6-slim, 3.3-slimGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.3/slimTags: 3.3.6-alpine, 3.3-alpineGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.3/alpineTags: 3.3.6-wheezy, 3.3-wheezyGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.3/wheezyTags: 3.3.6-onbuild, 3.3-onbuildGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.3/onbuildTags: 3.4.5, 3.4GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.4Tags: 3.4.5-slim, 3.4-slimGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.4/slimTags: 3.4.5-alpine, 3.4-alpineGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.4/alpineTags: 3.4.5-wheezy, 3.4-wheezyGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.4/wheezyTags: 3.4.5-onbuild, 3.4-onbuildGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.4/onbuildTags: 3.5.2, 3.5, 3, latestGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.5Tags: 3.5.2-slim, 3.5-slim, 3-slim, slimGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.5/slimTags: 3.5.2-alpine, 3.5-alpine, 3-alpine, alpineGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.5/alpineTags: 3.5.2-onbuild, 3.5-onbuild, 3-onbuild, onbuildGitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90Directory: 3.5/onbuildTags: 3.5.2-windowsservercore, 3.5-windowsservercore, 3-windowsservercore, windowsservercoreGitCommit: 1ad743decae71db424840812eb8dd49557aed9d0Directory: 3.5/windows/windowsservercoreConstraints: windowsservercoreTags: 3.6.0a3, 3.6GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496Directory: 3.6Tags: 3.6.0a3-slim, 3.6-slimGitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496Directory: 3.6/slimTags: 3.6.0a3-alpine, 3.6-alpineGitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496Directory: 3.6/alpineTags: 3.6.0a3-onbuild, 3.6-onbuildGitCommit: 635ea5d58b53d165f7bedae90f8933c720a58150Directory: 3.6/onbuildTags: 3.6.0a3-windowsservercore, 3.6-windowsservercoreGitCommit: 1ad743decae71db424840812eb8dd49557aed9d0Directory: 3.6/windows/windowsservercoreConstraints: windowsservercore
$ diff -u <(bashbrew cat python) <(bashbrew cat <(./generate-stackbrew-library.sh))
--- /dev/fd/63 2016-08-18 15:38:27.692596880 -0700+++ /dev/fd/62 2016-08-18 15:38:27.693596851 -0700@@ -21,6 +21,11 @@
GitCommit: 7663560df7547e69d13b1b548675502f4e0917d1
Directory: 2.7/onbuild
+Tags: 2.7.12-windowsservercore, 2.7-windowsservercore, 2-windowsservercore+GitCommit: 1ad743decae71db424840812eb8dd49557aed9d0+Directory: 2.7/windows/windowsservercore+Constraints: windowsservercore+
Tags: 3.3.6, 3.3
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.3
@@ -77,6 +82,11 @@
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.5/onbuild
+Tags: 3.5.2-windowsservercore, 3.5-windowsservercore, 3-windowsservercore, windowsservercore+GitCommit: 1ad743decae71db424840812eb8dd49557aed9d0+Directory: 3.5/windows/windowsservercore+Constraints: windowsservercore+
Tags: 3.6.0a3, 3.6
GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496
Directory: 3.6
@@ -92,3 +102,8 @@
Tags: 3.6.0a3-onbuild, 3.6-onbuild
GitCommit: 635ea5d58b53d165f7bedae90f8933c720a58150
Directory: 3.6/onbuild
++Tags: 3.6.0a3-windowsservercore, 3.6-windowsservercore+GitCommit: 1ad743decae71db424840812eb8dd49557aed9d0+Directory: 3.6/windows/windowsservercore+Constraints: windowsservercore

@yosifkit

Copy link
Copy Markdown
Member

LGTM

@yosifkit
yosifkit merged commit 9286f02 into docker-library:masterAug 18, 2016
@yosifkit
yosifkit deleted the windowsservercore branch August 18, 2016 23:49
tianon added a commit to infosiftr/stackbrew that referenced this pull request Aug 22, 2016
- `docker`: 1.12.1
- `drupal`: 8.2.0-beta2
- `memcached`: 1.4.31
- `mysql`: handle empty `initdb` directory (docker-library/mysql#200)
- `percona`: 5.6.32, 5.5.51
- `php`: 5.6.25
- `python`: 3.6.0a4 (docker-library/python#144), `windowsservercore` (docker-library/python#142)
- `rabbitmq`: fix SSL/`ERL_ARGS` (docker-library/rabbitmq#103)
- `rocket.chat`: 0.37.1
Sign up for freeto 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.

2 participants

@tianon@yosifkit