Skip to content

Commit ce64883

Browse files
committed
Add explicit support for Windows Server 1709
1 parent 444ab74 commit ce64883

12 files changed

Lines changed: 270 additions & 15 deletions

File tree

.appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ image: Visual Studio 2017
44
environment:
55
matrix:
66
- version: 3.7-rc
7-
variant: windowsservercore
7+
variant: windowsservercore-ltsc2016
88
- version: 3.6
9-
variant: windowsservercore
9+
variant: windowsservercore-ltsc2016
1010
- version: 3.5
11-
variant: windowsservercore
11+
variant: windowsservercore-ltsc2016
1212
- version: 2.7
13-
variant: windowsservercore
13+
variant: windowsservercore-ltsc2016
1414

1515
install:
1616
- ps: |

2.7/windows/windowsservercore/Dockerfile renamed to 2.7/windows/windowsservercore-1709/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore:1709
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore:ltsc2016
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV PYTHON_VERSION 2.7.14
6+
ENV PYTHON_RELEASE 2.7.14
7+
8+
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
9+
Write-Host ('Downloading {0} ...' -f $url); \
10+
Invoke-WebRequest -Uri $url -OutFile 'python.msi'; \
11+
\
12+
Write-Host 'Installing ...'; \
13+
# https://www.python.org/download/releases/2.4/msi/
14+
Start-Process msiexec -Wait \
15+
-ArgumentList @( \
16+
'/i', \
17+
'python.msi', \
18+
'/quiet', \
19+
'/qn', \
20+
'TARGETDIR=C:\Python', \
21+
'ALLUSERS=1', \
22+
'ADDLOCAL=DefaultFeature,Extensions,TclTk,Tools,PrependPath' \
23+
); \
24+
\
25+
# the installer updated PATH, so we should refresh our local value
26+
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \
27+
\
28+
Write-Host 'Verifying install ...'; \
29+
Write-Host ' python --version'; python --version; \
30+
\
31+
Write-Host 'Removing ...'; \
32+
Remove-Item python.msi -Force; \
33+
\
34+
Write-Host 'Complete.';
35+
36+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
37+
ENV PYTHON_PIP_VERSION 9.0.1
38+
39+
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
40+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
41+
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
42+
python get-pip.py \
43+
--disable-pip-version-check \
44+
--no-cache-dir \
45+
('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
46+
; \
47+
Remove-Item get-pip.py -Force; \
48+
\
49+
Write-Host 'Verifying pip install ...'; \
50+
pip --version; \
51+
\
52+
Write-Host 'Complete.';
53+
54+
# install "virtualenv", since the vast majority of users of this image will want it
55+
RUN pip install --no-cache-dir virtualenv
56+
57+
CMD ["python"]

3.5/windows/windowsservercore/Dockerfile renamed to 3.5/windows/windowsservercore-1709/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM microsoft/windowsservercore
7+
FROM microsoft/windowsservercore:1709
88

99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1010

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM microsoft/windowsservercore:ltsc2016
8+
9+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10+
11+
ENV PYTHON_VERSION 3.5.4
12+
ENV PYTHON_RELEASE 3.5.4
13+
14+
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
15+
Write-Host ('Downloading {0} ...' -f $url); \
16+
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
17+
\
18+
Write-Host 'Installing ...'; \
19+
# https://docs.python.org/3.5/using/windows.html#installing-without-ui
20+
Start-Process python.exe -Wait \
21+
-ArgumentList @( \
22+
'/quiet', \
23+
'InstallAllUsers=1', \
24+
'TargetDir=C:\Python', \
25+
'PrependPath=1', \
26+
'Shortcuts=0', \
27+
'Include_doc=0', \
28+
'Include_pip=0', \
29+
'Include_test=0' \
30+
); \
31+
\
32+
# the installer updated PATH, so we should refresh our local value
33+
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \
34+
\
35+
Write-Host 'Verifying install ...'; \
36+
Write-Host ' python --version'; python --version; \
37+
\
38+
Write-Host 'Removing ...'; \
39+
Remove-Item python.exe -Force; \
40+
\
41+
Write-Host 'Complete.';
42+
43+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44+
ENV PYTHON_PIP_VERSION 9.0.1
45+
46+
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
47+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48+
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
49+
python get-pip.py \
50+
--disable-pip-version-check \
51+
--no-cache-dir \
52+
('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
53+
; \
54+
Remove-Item get-pip.py -Force; \
55+
\
56+
Write-Host 'Verifying pip install ...'; \
57+
pip --version; \
58+
\
59+
Write-Host 'Complete.';
60+
61+
CMD ["python"]

3.6/windows/windowsservercore/Dockerfile renamed to 3.6/windows/windowsservercore-1709/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM microsoft/windowsservercore
7+
FROM microsoft/windowsservercore:1709
88

99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1010

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM microsoft/windowsservercore:ltsc2016
8+
9+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10+
11+
ENV PYTHON_VERSION 3.6.3
12+
ENV PYTHON_RELEASE 3.6.3
13+
14+
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
15+
Write-Host ('Downloading {0} ...' -f $url); \
16+
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
17+
\
18+
Write-Host 'Installing ...'; \
19+
# https://docs.python.org/3.5/using/windows.html#installing-without-ui
20+
Start-Process python.exe -Wait \
21+
-ArgumentList @( \
22+
'/quiet', \
23+
'InstallAllUsers=1', \
24+
'TargetDir=C:\Python', \
25+
'PrependPath=1', \
26+
'Shortcuts=0', \
27+
'Include_doc=0', \
28+
'Include_pip=0', \
29+
'Include_test=0' \
30+
); \
31+
\
32+
# the installer updated PATH, so we should refresh our local value
33+
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \
34+
\
35+
Write-Host 'Verifying install ...'; \
36+
Write-Host ' python --version'; python --version; \
37+
\
38+
Write-Host 'Removing ...'; \
39+
Remove-Item python.exe -Force; \
40+
\
41+
Write-Host 'Complete.';
42+
43+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44+
ENV PYTHON_PIP_VERSION 9.0.1
45+
46+
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
47+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48+
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
49+
python get-pip.py \
50+
--disable-pip-version-check \
51+
--no-cache-dir \
52+
('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
53+
; \
54+
Remove-Item get-pip.py -Force; \
55+
\
56+
Write-Host 'Verifying pip install ...'; \
57+
pip --version; \
58+
\
59+
Write-Host 'Complete.';
60+
61+
CMD ["python"]

3.7-rc/windows/windowsservercore/Dockerfile renamed to 3.7-rc/windows/windowsservercore-1709/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# PLEASE DO NOT EDIT IT DIRECTLY.
55
#
66

7-
FROM microsoft/windowsservercore
7+
FROM microsoft/windowsservercore:1709
88

99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1010

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
3+
#
4+
# PLEASE DO NOT EDIT IT DIRECTLY.
5+
#
6+
7+
FROM microsoft/windowsservercore:ltsc2016
8+
9+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10+
11+
ENV PYTHON_VERSION 3.7.0a2
12+
ENV PYTHON_RELEASE 3.7.0
13+
14+
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
15+
Write-Host ('Downloading {0} ...' -f $url); \
16+
Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \
17+
\
18+
Write-Host 'Installing ...'; \
19+
# https://docs.python.org/3.5/using/windows.html#installing-without-ui
20+
Start-Process python.exe -Wait \
21+
-ArgumentList @( \
22+
'/quiet', \
23+
'InstallAllUsers=1', \
24+
'TargetDir=C:\Python', \
25+
'PrependPath=1', \
26+
'Shortcuts=0', \
27+
'Include_doc=0', \
28+
'Include_pip=0', \
29+
'Include_test=0' \
30+
); \
31+
\
32+
# the installer updated PATH, so we should refresh our local value
33+
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \
34+
\
35+
Write-Host 'Verifying install ...'; \
36+
Write-Host ' python --version'; python --version; \
37+
\
38+
Write-Host 'Removing ...'; \
39+
Remove-Item python.exe -Force; \
40+
\
41+
Write-Host 'Complete.';
42+
43+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44+
ENV PYTHON_PIP_VERSION 9.0.1
45+
46+
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
47+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48+
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
49+
python get-pip.py \
50+
--disable-pip-version-check \
51+
--no-cache-dir \
52+
('pip=={0}' -f $env:PYTHON_PIP_VERSION) \
53+
; \
54+
Remove-Item get-pip.py -Force; \
55+
\
56+
Write-Host 'Verifying pip install ...'; \
57+
pip --version; \
58+
\
59+
Write-Host 'Complete.';
60+
61+
CMD ["python"]

Dockerfile-windowsservercore.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/windowsservercore
1+
FROM microsoft/windowsservercore:%%PLACEHOLDER%%
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

0 commit comments

Comments
 (0)