Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ image: Visual Studio 2017
environment:
matrix:
- version: 3.7-rc
variant: windowsservercore
variant: windowsservercore-ltsc2016
- version: 3.6
variant: windowsservercore
variant: windowsservercore-ltsc2016
- version: 3.5
variant: windowsservercore
variant: windowsservercore-ltsc2016
- version: 2.7
variant: windowsservercore
variant: windowsservercore-ltsc2016

install:
- ps: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/windowsservercore
FROM microsoft/windowsservercore:1709

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

Expand Down
57 changes: 57 additions & 0 deletions 2.7/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM microsoft/windowsservercore:ltsc2016

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

ENV PYTHON_VERSION 2.7.14
ENV PYTHON_RELEASE 2.7.14

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); \
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 '<VERSION>'"
ENV PYTHON_PIP_VERSION 9.0.1

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"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore
FROM microsoft/windowsservercore:1709

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

Expand Down
61 changes: 61 additions & 0 deletions 3.5/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore:ltsc2016

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

ENV PYTHON_VERSION 3.5.4
ENV PYTHON_RELEASE 3.5.4

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); \
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 '<VERSION>'"
ENV PYTHON_PIP_VERSION 9.0.1

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"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore
FROM microsoft/windowsservercore:1709

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

Expand Down
61 changes: 61 additions & 0 deletions 3.6/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore:ltsc2016

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

ENV PYTHON_VERSION 3.6.3
ENV PYTHON_RELEASE 3.6.3

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); \
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 '<VERSION>'"
ENV PYTHON_PIP_VERSION 9.0.1

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"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore
FROM microsoft/windowsservercore:1709

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

Expand Down
61 changes: 61 additions & 0 deletions 3.7-rc/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM microsoft/windowsservercore:ltsc2016

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

ENV PYTHON_VERSION 3.7.0a2
ENV PYTHON_RELEASE 3.7.0

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); \
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 '<VERSION>'"
ENV PYTHON_PIP_VERSION 9.0.1

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"]
2 changes: 1 addition & 1 deletion Dockerfile-windowsservercore.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/windowsservercore
FROM microsoft/windowsservercore:%%PLACEHOLDER%%

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

Expand Down
18 changes: 15 additions & 3 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ for version in "${versions[@]}"; do
for v in \
{stretch,jessie,wheezy}{,/slim,/onbuild} \
alpine{3.6,3.4} \
windows/windowsservercore windows/nanoserver \
windows/windowsservercore-{ltsc2016,1709} \
windows/nanoserver-{sac2016,1709} \
; do
dir="$version/$v"
variant="$(basename "$v")"
Expand Down Expand Up @@ -144,10 +145,21 @@ for version in "${versions[@]}"; do
;;
esac

sharedTags=()
for windowsShared in windowsservercore nanoserver; do
if [[ "$variant" == "$windowsShared"* ]]; then
sharedTags+=( "$windowsShared" )
break
fi
done
if [ "$variant" = "$debianSuite" ] || [[ "$variant" == 'windowsservercore'* ]]; then
sharedTags+=( "${versionAliases[@]}" )
fi

echo
echo "Tags: $(join ', ' "${variantAliases[@]}")"
if [ "$variant" = "$debianSuite" ] || [ "$variant" = 'windowsservercore' ]; then
echo "SharedTags: $(join ', ' "${versionAliases[@]}")"
if [ "${#sharedTags[@]}" -gt 0 ]; then
echo "SharedTags: $(join ', ' "${sharedTags[@]}")"
fi
cat <<-EOE
Architectures: $(join ', ' $variantArches)
Expand Down
9 changes: 6 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,17 @@ for version in "${versions[@]}"; do
for v in \
alpine{3.4,3.6} \
{wheezy,jessie,stretch}{/slim,/onbuild,} \
windows/{windowsservercore,nanoserver} \
windows/nanoserver-{1709,sac2016} \
windows/windowsservercore-{1709,ltsc2016} \
; do
dir="$version/$v"
variant="$(basename "$v")"

[ -d "$dir" ] || continue

case "$variant" in
slim|onbuild|windowsservercore) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
slim|onbuild) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
windowsservercore-*) template='windowsservercore'; tag="${variant#*-}" ;;
alpine*) template='alpine'; tag="${variant#alpine}" ;;
*) template='debian'; tag="$variant" ;;
esac
Expand All @@ -129,7 +131,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)):.*/\1:'"$tag"'/' \
-e 's!^(FROM (debian|buildpack-deps|alpine|microsoft/[^:]+)):.*!\1:'"$tag"'!' \
"$dir/Dockerfile"

case "$variant" in
Expand All @@ -148,6 +150,7 @@ for version in "${versions[@]}"; do

case "$v" in
*/onbuild) ;;
windows/*-1709) ;; # no AppVeyor support for 1709 yet: https://github.com/appveyor/ci/issues/1885
windows/*)
appveyorEnv='\n - version: '"$version"'\n variant: '"$variant$appveyorEnv"
;;
Expand Down