From 5ee90be8c2ed4c3d5c57ad07116048d7795a1abc Mon Sep 17 00:00:00 2001 From: Sunghwan Bang Date: Mon, 11 Feb 2019 18:23:08 +0900 Subject: [PATCH 1/5] Move to new windows repository --- Dockerfile-caveman-windowsservercore.template | 2 +- Dockerfile-windowsservercore.template | 2 +- update.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile-caveman-windowsservercore.template b/Dockerfile-caveman-windowsservercore.template index e42461bab..f0fe4e606 100644 --- a/Dockerfile-caveman-windowsservercore.template +++ b/Dockerfile-caveman-windowsservercore.template @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore:%%PLACEHOLDER%% +FROM mcr.microsoft.com/windows/servercore:%%PLACEHOLDER%% SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template index 6570ff653..57b59c266 100644 --- a/Dockerfile-windowsservercore.template +++ b/Dockerfile-windowsservercore.template @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore:%%PLACEHOLDER%% +FROM mcr.microsoft.com/windows/servercore:%%PLACEHOLDER%% SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/update.sh b/update.sh index dc26529a7..82e43fa6b 100755 --- a/update.sh +++ b/update.sh @@ -145,7 +145,7 @@ for version in "${versions[@]}"; do -e 's/^(ENV PYTHON_RELEASE) .*/\1 '"${fullVersion%%[a-z]*}"'/' \ -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ -e 's/^(FROM python):.*/\1:'"$version-$tag"'/' \ - -e 's!^(FROM (debian|buildpack-deps|alpine|microsoft/[^:]+)):.*!\1:'"$tag"'!' \ + -e 's!^(FROM (debian|buildpack-deps|alpine|[^/]+/windows/[^:]+)):.*!\1:'"$tag"'!' \ "$dir/Dockerfile" case "$variant" in From 28511e31de4c395af981084a1033e9aff79190de Mon Sep 17 00:00:00 2001 From: Sunghwan Bang Date: Mon, 11 Feb 2019 19:35:53 +0900 Subject: [PATCH 2/5] Add support for Windows Server 1803, 1809 --- .appveyor.yml | 9 +++ 2.7/windows/windowsservercore-1709/Dockerfile | 2 +- 2.7/windows/windowsservercore-1803/Dockerfile | 64 +++++++++++++++++++ 2.7/windows/windowsservercore-1809/Dockerfile | 64 +++++++++++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 2 +- 3.6/windows/windowsservercore-1709/Dockerfile | 2 +- 3.6/windows/windowsservercore-1803/Dockerfile | 62 ++++++++++++++++++ 3.6/windows/windowsservercore-1809/Dockerfile | 62 ++++++++++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 2 +- 3.7/windows/windowsservercore-1709/Dockerfile | 2 +- 3.7/windows/windowsservercore-1803/Dockerfile | 62 ++++++++++++++++++ 3.7/windows/windowsservercore-1809/Dockerfile | 62 ++++++++++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 2 +- update.sh | 7 +- 14 files changed, 396 insertions(+), 8 deletions(-) create mode 100644 2.7/windows/windowsservercore-1803/Dockerfile create mode 100644 2.7/windows/windowsservercore-1809/Dockerfile create mode 100644 3.6/windows/windowsservercore-1803/Dockerfile create mode 100644 3.6/windows/windowsservercore-1809/Dockerfile create mode 100644 3.7/windows/windowsservercore-1803/Dockerfile create mode 100644 3.7/windows/windowsservercore-1809/Dockerfile diff --git a/.appveyor.yml b/.appveyor.yml index ec4130ac2..c981408c4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,10 +5,19 @@ environment: matrix: - version: 3.7 variant: windowsservercore-ltsc2016 + - os: windows + dist: 1803-containers + env: VERSION=3.7 VARIANT=windowsservercore-1803 - version: 3.6 variant: windowsservercore-ltsc2016 + - os: windows + dist: 1803-containers + env: VERSION=3.6 VARIANT=windowsservercore-1803 - version: 2.7 variant: windowsservercore-ltsc2016 + - os: windows + dist: 1803-containers + env: VERSION=2.7 VARIANT=windowsservercore-1803 install: - ps: | diff --git a/2.7/windows/windowsservercore-1709/Dockerfile b/2.7/windows/windowsservercore-1709/Dockerfile index 68595c0b7..25d1b5cfd 100644 --- a/2.7/windows/windowsservercore-1709/Dockerfile +++ b/2.7/windows/windowsservercore-1709/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:1709 +FROM mcr.microsoft.com/windows/servercore:1709 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/2.7/windows/windowsservercore-1803/Dockerfile b/2.7/windows/windowsservercore-1803/Dockerfile new file mode 100644 index 000000000..5c46939ed --- /dev/null +++ b/2.7/windows/windowsservercore-1803/Dockerfile @@ -0,0 +1,64 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1803 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 2.7.15 +ENV PYTHON_RELEASE 2.7.15 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.msi'; \ + \ + Write-Host 'Installing ...'; \ +# https://www.python.org/download/releases/2.4/msi/ + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'python.msi', \ + '/quiet', \ + '/qn', \ + 'TARGETDIR=C:\Python', \ + 'ALLUSERS=1', \ + 'ADDLOCAL=DefaultFeature,Extensions,TclTk,Tools,PrependPath' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.msi -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +# install "virtualenv", since the vast majority of users of this image will want it +RUN pip install --no-cache-dir virtualenv + +CMD ["python"] diff --git a/2.7/windows/windowsservercore-1809/Dockerfile b/2.7/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 000000000..79a9c2f6c --- /dev/null +++ b/2.7/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,64 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 2.7.15 +ENV PYTHON_RELEASE 2.7.15 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.msi'; \ + \ + Write-Host 'Installing ...'; \ +# https://www.python.org/download/releases/2.4/msi/ + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'python.msi', \ + '/quiet', \ + '/qn', \ + 'TARGETDIR=C:\Python', \ + 'ALLUSERS=1', \ + 'ADDLOCAL=DefaultFeature,Extensions,TclTk,Tools,PrependPath' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.msi -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +# install "virtualenv", since the vast majority of users of this image will want it +RUN pip install --no-cache-dir virtualenv + +CMD ["python"] diff --git a/2.7/windows/windowsservercore-ltsc2016/Dockerfile b/2.7/windows/windowsservercore-ltsc2016/Dockerfile index fde56cee1..2fcd7835c 100644 --- a/2.7/windows/windowsservercore-ltsc2016/Dockerfile +++ b/2.7/windows/windowsservercore-ltsc2016/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:ltsc2016 +FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/3.6/windows/windowsservercore-1709/Dockerfile b/3.6/windows/windowsservercore-1709/Dockerfile index 244ddaea0..3d8249fbc 100644 --- a/3.6/windows/windowsservercore-1709/Dockerfile +++ b/3.6/windows/windowsservercore-1709/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:1709 +FROM mcr.microsoft.com/windows/servercore:1709 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/3.6/windows/windowsservercore-1803/Dockerfile b/3.6/windows/windowsservercore-1803/Dockerfile new file mode 100644 index 000000000..fb0e7b318 --- /dev/null +++ b/3.6/windows/windowsservercore-1803/Dockerfile @@ -0,0 +1,62 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1803 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.6.8 +ENV PYTHON_RELEASE 3.6.8 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/3.6/windows/windowsservercore-1809/Dockerfile b/3.6/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 000000000..17b371155 --- /dev/null +++ b/3.6/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,62 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.6.8 +ENV PYTHON_RELEASE 3.6.8 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/3.6/windows/windowsservercore-ltsc2016/Dockerfile b/3.6/windows/windowsservercore-ltsc2016/Dockerfile index ea216cf1b..f50dd7b5b 100644 --- a/3.6/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.6/windows/windowsservercore-ltsc2016/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:ltsc2016 +FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/3.7/windows/windowsservercore-1709/Dockerfile b/3.7/windows/windowsservercore-1709/Dockerfile index 58955c042..93041a22e 100644 --- a/3.7/windows/windowsservercore-1709/Dockerfile +++ b/3.7/windows/windowsservercore-1709/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:1709 +FROM mcr.microsoft.com/windows/servercore:1709 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/3.7/windows/windowsservercore-1803/Dockerfile b/3.7/windows/windowsservercore-1803/Dockerfile new file mode 100644 index 000000000..4527d0bd7 --- /dev/null +++ b/3.7/windows/windowsservercore-1803/Dockerfile @@ -0,0 +1,62 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1803 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.7.2 +ENV PYTHON_RELEASE 3.7.2 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/3.7/windows/windowsservercore-1809/Dockerfile b/3.7/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 000000000..83064407a --- /dev/null +++ b/3.7/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,62 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHON_VERSION 3.7.2 +ENV PYTHON_RELEASE 3.7.2 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'python.exe'; \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_pip=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + Write-Host 'Complete.'; + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 19.0.2 + +RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \ + python get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/3.7/windows/windowsservercore-ltsc2016/Dockerfile b/3.7/windows/windowsservercore-ltsc2016/Dockerfile index bcf40c0d1..ec82e485c 100644 --- a/3.7/windows/windowsservercore-ltsc2016/Dockerfile +++ b/3.7/windows/windowsservercore-ltsc2016/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM microsoft/windowsservercore:ltsc2016 +FROM mcr.microsoft.com/windows/servercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/update.sh b/update.sh index 82e43fa6b..2b0bc1116 100755 --- a/update.sh +++ b/update.sh @@ -115,7 +115,7 @@ for version in "${versions[@]}"; do alpine{3.8,3.9} \ {wheezy,jessie,stretch}{/slim,} \ windows/nanoserver-{1709,sac2016} \ - windows/windowsservercore-{1709,ltsc2016} \ + windows/windowsservercore-{1809,1803,1709,ltsc2016} \ ; do dir="$version/$v" variant="$(basename "$v")" @@ -198,7 +198,10 @@ for version in "${versions[@]}"; do esac case "$v" in - windows/*-1709) ;; # no AppVeyor support for 1709 yet: https://github.com/appveyor/ci/issues/1885 + windows/*-1803) + appveyorEnv='\n - os: windows\n dist: 1803-containers\n env: VERSION='"$version VARIANT=$variant$appveyorEnv" + ;; + windows/*-1709|windows/*-1809) ;; # no AppVeyor support for 1709 or 1809 yet: https://github.com/appveyor/ci/issues/1885 and https://github.com/appveyor/ci/issues/2676 windows/*) appveyorEnv='\n - version: '"$version"'\n variant: '"$variant$appveyorEnv" ;; From 72f2e4412c3d52a7160ade4cbfcecf0aaea94e49 Mon Sep 17 00:00:00 2001 From: Sunghwan Bang Date: Mon, 11 Feb 2019 20:01:59 +0900 Subject: [PATCH 3/5] Remove Windows Server 1803 from AppVeyor --- .appveyor.yml | 9 --------- update.sh | 4 +--- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c981408c4..ec4130ac2 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,19 +5,10 @@ environment: matrix: - version: 3.7 variant: windowsservercore-ltsc2016 - - os: windows - dist: 1803-containers - env: VERSION=3.7 VARIANT=windowsservercore-1803 - version: 3.6 variant: windowsservercore-ltsc2016 - - os: windows - dist: 1803-containers - env: VERSION=3.6 VARIANT=windowsservercore-1803 - version: 2.7 variant: windowsservercore-ltsc2016 - - os: windows - dist: 1803-containers - env: VERSION=2.7 VARIANT=windowsservercore-1803 install: - ps: | diff --git a/update.sh b/update.sh index 2b0bc1116..c092f3882 100755 --- a/update.sh +++ b/update.sh @@ -198,9 +198,7 @@ for version in "${versions[@]}"; do esac case "$v" in - windows/*-1803) - appveyorEnv='\n - os: windows\n dist: 1803-containers\n env: VERSION='"$version VARIANT=$variant$appveyorEnv" - ;; + windows/*-1803) ;; # TODO windows/*-1709|windows/*-1809) ;; # no AppVeyor support for 1709 or 1809 yet: https://github.com/appveyor/ci/issues/1885 and https://github.com/appveyor/ci/issues/2676 windows/*) appveyorEnv='\n - version: '"$version"'\n variant: '"$variant$appveyorEnv" From 9fd50c0bc8466f976087cca423382f573fb9e7a2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 14 Feb 2019 16:10:56 -0800 Subject: [PATCH 4/5] Apply more bits from https://github.com/docker-library/golang/pull/257 --- .travis.yml | 102 +++++++++++++++++++++++----------- generate-stackbrew-library.sh | 3 +- update.sh | 16 ++++-- 3 files changed, 82 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index a730c572b..e7fc2dae0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,77 @@ language: bash services: docker -env: - - VERSION=3.7 VARIANT=stretch - - VERSION=3.7 VARIANT=stretch/slim - - VERSION=3.7 VARIANT=alpine3.9 - - VERSION=3.7 VARIANT=alpine3.8 - - VERSION=3.6 VARIANT=stretch - - VERSION=3.6 VARIANT=stretch/slim - - VERSION=3.6 VARIANT=jessie - - VERSION=3.6 VARIANT=jessie/slim - - VERSION=3.6 VARIANT=alpine3.9 - - VERSION=3.6 VARIANT=alpine3.8 - - VERSION=3.5 VARIANT=stretch - - VERSION=3.5 VARIANT=stretch/slim - - VERSION=3.5 VARIANT=jessie - - VERSION=3.5 VARIANT=jessie/slim - - VERSION=3.5 VARIANT=alpine3.9 - - VERSION=3.5 VARIANT=alpine3.8 - - VERSION=3.4 VARIANT=stretch - - VERSION=3.4 VARIANT=stretch/slim - - VERSION=3.4 VARIANT=jessie - - VERSION=3.4 VARIANT=jessie/slim - - VERSION=3.4 VARIANT=wheezy - - VERSION=3.4 VARIANT=alpine3.9 - - VERSION=3.4 VARIANT=alpine3.8 - - VERSION=2.7 VARIANT=stretch - - VERSION=2.7 VARIANT=stretch/slim - - VERSION=2.7 VARIANT=jessie - - VERSION=2.7 VARIANT=jessie/slim - - VERSION=2.7 VARIANT=wheezy - - VERSION=2.7 VARIANT=alpine3.9 - - VERSION=2.7 VARIANT=alpine3.8 +matrix: + include: + - os: windows + dist: 1803-containers + env: VERSION=3.7 VARIANT=windows/windowsservercore-1803 + - os: linux + env: VERSION=3.7 VARIANT=stretch + - os: linux + env: VERSION=3.7 VARIANT=stretch/slim + - os: linux + env: VERSION=3.7 VARIANT=alpine3.9 + - os: linux + env: VERSION=3.7 VARIANT=alpine3.8 + - os: windows + dist: 1803-containers + env: VERSION=3.6 VARIANT=windows/windowsservercore-1803 + - os: linux + env: VERSION=3.6 VARIANT=stretch + - os: linux + env: VERSION=3.6 VARIANT=stretch/slim + - os: linux + env: VERSION=3.6 VARIANT=jessie + - os: linux + env: VERSION=3.6 VARIANT=jessie/slim + - os: linux + env: VERSION=3.6 VARIANT=alpine3.9 + - os: linux + env: VERSION=3.6 VARIANT=alpine3.8 + - os: linux + env: VERSION=3.5 VARIANT=stretch + - os: linux + env: VERSION=3.5 VARIANT=stretch/slim + - os: linux + env: VERSION=3.5 VARIANT=jessie + - os: linux + env: VERSION=3.5 VARIANT=jessie/slim + - os: linux + env: VERSION=3.5 VARIANT=alpine3.9 + - os: linux + env: VERSION=3.5 VARIANT=alpine3.8 + - os: linux + env: VERSION=3.4 VARIANT=stretch + - os: linux + env: VERSION=3.4 VARIANT=stretch/slim + - os: linux + env: VERSION=3.4 VARIANT=jessie + - os: linux + env: VERSION=3.4 VARIANT=jessie/slim + - os: linux + env: VERSION=3.4 VARIANT=wheezy + - os: linux + env: VERSION=3.4 VARIANT=alpine3.9 + - os: linux + env: VERSION=3.4 VARIANT=alpine3.8 + - os: windows + dist: 1803-containers + env: VERSION=2.7 VARIANT=windows/windowsservercore-1803 + - os: linux + env: VERSION=2.7 VARIANT=stretch + - os: linux + env: VERSION=2.7 VARIANT=stretch/slim + - os: linux + env: VERSION=2.7 VARIANT=jessie + - os: linux + env: VERSION=2.7 VARIANT=jessie/slim + - os: linux + env: VERSION=2.7 VARIANT=wheezy + - os: linux + env: VERSION=2.7 VARIANT=alpine3.9 + - os: linux + env: VERSION=2.7 VARIANT=alpine3.8 install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 0b2a9164b..c8b4ecdaa 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -78,8 +78,7 @@ for version in "${versions[@]}"; do for v in \ {stretch,jessie,wheezy}{,/slim} \ alpine{3.9,3.8} \ - windows/windowsservercore-{ltsc2016,1709} \ - windows/nanoserver-{sac2016,1709} \ + windows/windowsservercore-{ltsc2016,1709,1803,1809} \ ; do dir="$version/$v" variant="$(basename "$v")" diff --git a/update.sh b/update.sh index c092f3882..c1497035c 100755 --- a/update.sh +++ b/update.sh @@ -114,7 +114,6 @@ for version in "${versions[@]}"; do for v in \ alpine{3.8,3.9} \ {wheezy,jessie,stretch}{/slim,} \ - windows/nanoserver-{1709,sac2016} \ windows/windowsservercore-{1809,1803,1709,ltsc2016} \ ; do dir="$version/$v" @@ -145,7 +144,7 @@ for version in "${versions[@]}"; do -e 's/^(ENV PYTHON_RELEASE) .*/\1 '"${fullVersion%%[a-z]*}"'/' \ -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ -e 's/^(FROM python):.*/\1:'"$version-$tag"'/' \ - -e 's!^(FROM (debian|buildpack-deps|alpine|[^/]+/windows/[^:]+)):.*!\1:'"$tag"'!' \ + -e 's!^(FROM (debian|buildpack-deps|alpine|mcr[.]microsoft[.]com/[^:]+)):.*!\1:'"$tag"'!' \ "$dir/Dockerfile" case "$variant" in @@ -198,19 +197,24 @@ for version in "${versions[@]}"; do esac case "$v" in - windows/*-1803) ;; # TODO - windows/*-1709|windows/*-1809) ;; # no AppVeyor support for 1709 or 1809 yet: https://github.com/appveyor/ci/issues/1885 and https://github.com/appveyor/ci/issues/2676 + windows/*-1803) + travisEnv='\n - os: windows\n dist: 1803-containers\n env: VERSION='"$version VARIANT=$v$travisEnv" + ;; + + windows/*-1709 | windows/*-1809) ;; # no AppVeyor support for 1709 or 1809 yet: https://github.com/appveyor/ci/issues/1885 and https://github.com/appveyor/ci/issues/2676 + windows/*) appveyorEnv='\n - version: '"$version"'\n variant: '"$variant$appveyorEnv" ;; + *) - travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv" + travisEnv='\n - os: linux\n env: VERSION='"$version VARIANT=$v$travisEnv" ;; esac done done -travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)" +travis="$(awk -v 'RS=\n\n' '$1 == "matrix:" { $0 = "matrix:\n include:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)" echo "$travis" > .travis.yml appveyor="$(awk -v 'RS=\n\n' '$1 == "environment:" { $0 = "environment:\n matrix:'"$appveyorEnv"'" } { printf "%s%s", $0, RS }' .appveyor.yml)" From d341bb3bd5c9fb1f48f87986b65c37ca05ff41f3 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 14 Feb 2019 16:51:32 -0800 Subject: [PATCH 5/5] Adjust "hack-my-builds" to be linux-only --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e7fc2dae0..66d56bc7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,10 +75,10 @@ matrix: install: - git clone https://github.com/docker-library/official-images.git ~/official-images + - if [ "$TRAVIS_OS_NAME" = 'linux' ]; then wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash; fi before_script: - env | sort - - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash - cd "$VERSION/$VARIANT" - slash='/'; image="python:${VERSION}-${VARIANT//$slash/-}"