Skip to content

Add "windowsservercore" variants #142

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 1 commit into from
Aug 18, 2016

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 18, 2016

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
Member Author

tianon commented Aug 18, 2016

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 tianon force-pushed the windowsservercore branch from 61f535a to faf2e59 Compare August 18, 2016 20:09
@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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 tianon force-pushed the windowsservercore branch 2 times, most recently from 59a3044 to 287e4dd Compare August 18, 2016 20:42
@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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

@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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

@tianon tianon force-pushed the windowsservercore branch from 287e4dd to 2026906 Compare August 18, 2016 20:46
@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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

@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

$ 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 tianon force-pushed the windowsservercore branch 6 times, most recently from 7222c4f to 93991da Compare August 18, 2016 21:45
@tianon tianon force-pushed the windowsservercore branch from 93991da to 1ad743d Compare August 18, 2016 21:47
@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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
Member Author

tianon commented Aug 18, 2016

Image sizes, for comparison/interest:

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

@tianon
Copy link
Member Author

tianon commented Aug 18, 2016

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.sh

Maintainers: Tianon Gravi <[email protected]> (@tianon),
             Joseph Ferguson <[email protected]> (@yosifkit)
GitRepo: https://github.com/docker-library/python.git

Tags: 2.7.12, 2.7, 2
GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496
Directory: 2.7

Tags: 2.7.12-slim, 2.7-slim, 2-slim
GitCommit: 2664a9b68104d35c99aa79c56eea24423e6f9807
Directory: 2.7/slim

Tags: 2.7.12-alpine, 2.7-alpine, 2-alpine
GitCommit: 2664a9b68104d35c99aa79c56eea24423e6f9807
Directory: 2.7/alpine

Tags: 2.7.12-wheezy, 2.7-wheezy, 2-wheezy
GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496
Directory: 2.7/wheezy

Tags: 2.7.12-onbuild, 2.7-onbuild, 2-onbuild
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

Tags: 3.3.6-slim, 3.3-slim
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.3/slim

Tags: 3.3.6-alpine, 3.3-alpine
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.3/alpine

Tags: 3.3.6-wheezy, 3.3-wheezy
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.3/wheezy

Tags: 3.3.6-onbuild, 3.3-onbuild
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.3/onbuild

Tags: 3.4.5, 3.4
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.4

Tags: 3.4.5-slim, 3.4-slim
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.4/slim

Tags: 3.4.5-alpine, 3.4-alpine
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.4/alpine

Tags: 3.4.5-wheezy, 3.4-wheezy
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.4/wheezy

Tags: 3.4.5-onbuild, 3.4-onbuild
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.4/onbuild

Tags: 3.5.2, 3.5, 3, latest
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.5

Tags: 3.5.2-slim, 3.5-slim, 3-slim, slim
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.5/slim

Tags: 3.5.2-alpine, 3.5-alpine, 3-alpine, alpine
GitCommit: 9a9021f2134d953165b31d98cacb95aa34076f90
Directory: 3.5/alpine

Tags: 3.5.2-onbuild, 3.5-onbuild, 3-onbuild, onbuild
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

Tags: 3.6.0a3-slim, 3.6-slim
GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496
Directory: 3.6/slim

Tags: 3.6.0a3-alpine, 3.6-alpine
GitCommit: f1bc9f790605ecf0dabce4c24ef9ee5ce205e496
Directory: 3.6/alpine

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
$ 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
Member

LGTM

@yosifkit yosifkit merged commit 9286f02 into docker-library:master Aug 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 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.

2 participants