11# Dockerfile for Azure/blobxfer (Windows)
2- # Adapted from: https://github.com/StefanScherer/dockerfiles-windows/blob/master/python/Dockerfile
32
4- FROM python:3.9.4 -windowsservercore-ltsc2016
3+ FROM python:3.9.7 -windowsservercore-1809
54MAINTAINER Fred Park <https://github.com/Azure/blobxfer>
65
76ENV chocolateyUseWindowsCompression false
@@ -21,26 +20,12 @@ RUN git clone -b $Env:GIT_BRANCH --single-branch --depth 5 https://github.com/Az
2120RUN python -m compileall C:\P ython\L ib\s ite-packages ; \
2221 exit 0
2322
24- FROM mcr.microsoft.com/windows/nanoserver:sac2016
23+ FROM mcr.microsoft.com/windows/nanoserver:1809
2524
2625COPY --from=0 /Python /Python
2726COPY --from=0 /blobxfer/THIRD_PARTY_NOTICES.txt /BLOBXFER_THIRD_PARTY_NOTICES.txt
2827COPY --from=0 /blobxfer/LICENSE /BLOBXFER_LICENSE.txt
2928
3029SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
3130
32- ENV PYTHON_VERSION 3.9.4
33- ENV PYTHON_PIP_VERSION 21.0.1
34-
35- RUN $env:PATH = 'C:\P ython;C:\P ython\S cripts;{0}' -f $env:PATH ; \
36- Set-ItemProperty -Path 'HKLM:\S YSTEM\C urrentControlSet\C ontrol\S ession Manager\E nvironment\' -Name Path -Value $env:PATH ; \
37- mkdir $env:APPDATA\P ython\P ython37\s ite-packages ; \
38- Invoke-WebRequest ' https://bootstrap.pypa.io/get-pip.py' -OutFile ' get-pip.py' -UseBasicParsing ; \
39- $replace = (' import tempfile{0}import site{0}site.getusersitepackages()' -f [char][int]10) ; \
40- Get-Content get-pip.py | Foreach-Object { $_ -replace ' import tempfile', $replace } | Out-File -Encoding Ascii getpip.py ; \
41- $pipInstall = (' pip=={0}' -f $env:PYTHON_PIP_VERSION) ; \
42- python getpip.py $pipInstall ; \
43- Remove-Item get-pip.py ; \
44- Remove-Item getpip.py
45-
4631ENTRYPOINT ["blobxfer" ]
0 commit comments