-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
17 lines (12 loc) · 855 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This dockerfile utilizes components licensed by their respective owners/authors.
# Prior to utilizing this file or resulting images please review the respective licenses at: https://docs.python.org/3/license.html
FROM mcr.microsoft.com/windows/servercore:ltsc2019
LABEL Description="Python" Vendor="Python Software Foundation" Version="3.7.3"
RUN powershell.exe -Command \
$ErrorActionPreference = 'Stop'; \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Invoke-WebRequest -Method Get -Uri https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe -OutFile c:\python-3.7.3.exe ; \
Start-Process c:\python-3.7.3.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait ; \
Remove-Item c:\python-3.7.3.exe -Force
RUN echo print("Hello World!") > c:\hello.py
CMD ["python", "c:\hello.py"]