@@ -51,6 +51,43 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:GIT});
51
51
Remove-Item -Force git.exe; \
52
52
Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\*
53
53
54
+ # Install Python
55
+ ARG PY39=https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe
56
+ ARG PY39_SHA256=FB3D0466F3754752CA7FD839A09FFE53375FF2C981279FD4BC23A005458F7F5D
57
+ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:PY39}); \
58
+ Invoke-WebRequest -Uri ${env:PY39} -OutFile python-3.9.13-amd64.exe; \
59
+ Write-Host '✓' ; \
60
+ Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:PY39_SHA256});\
61
+ $Hash = Get-FileHash python-3.9.13-amd64.exe -Algorithm sha256; \
62
+ if ($Hash.Hash -eq ${env:PY39_SHA256}) { \
63
+ Write-Host '✓' ; \
64
+ } else { \
65
+ Write-Host ('✘ ({0})' -f $Hash.Hash); \
66
+ exit 1; \
67
+ } \
68
+ Write-Host -NoNewLine 'Installing Python ... ' ; \
69
+ $Process = \
70
+ Start-Process python-3.9.13-amd64.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \
71
+ 'AssociateFiles=0' , \
72
+ 'Include_doc=0' , \
73
+ 'Include_debug=0' , \
74
+ 'Include_lib=1' , \
75
+ 'Include_tcltk=0' , \
76
+ 'Include_test=0' , \
77
+ 'InstallAllUsers=1' , \
78
+ 'InstallLauncherAllUsers=0' , \
79
+ 'PrependPath=1' , \
80
+ '/quiet' \
81
+ ); \
82
+ if ($Process.ExitCode -eq 0) { \
83
+ Write-Host '✓' ; \
84
+ } else { \
85
+ Write-Host ('✘ ({0})' -f $Process.ExitCode); \
86
+ exit 1; \
87
+ } \
88
+ Remove-Item -Force python-3.9.13-amd64.exe; \
89
+ Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\*
90
+
54
91
# Install Visual Studio Build Tools
55
92
ARG VSB=https://aka.ms/vs/17/release/vs_buildtools.exe
56
93
ARG VSB_SHA256=D4E08524CB0E5BD061A24F507928D1CFB91DCE192C5E12ED964B8343FC4CDEDD
@@ -112,43 +149,6 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT});
112
149
Remove-Item -Force installer.exe; \
113
150
Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\*
114
151
115
- # Install Python
116
- ARG PY39=https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe
117
- ARG PY39_SHA256=FB3D0466F3754752CA7FD839A09FFE53375FF2C981279FD4BC23A005458F7F5D
118
- RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:PY39}); \
119
- Invoke-WebRequest -Uri ${env:PY39} -OutFile python-3.9.13-amd64.exe; \
120
- Write-Host '✓' ; \
121
- Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:PY39_SH256}); \
122
- $Hash = Get-FileHash python-3.9.13-amd64.exe -Algorithm sha256; \
123
- if ($Hash.Hash -eq ${env:PY39_SHA256}) { \
124
- Write-Host '✓' ; \
125
- } else { \
126
- Write-Host ('✘ ({0})' -f $Hash.Hash); \
127
- exit 1; \
128
- } \
129
- Write-Host -NoNewLine 'Installing Python ... ' ; \
130
- $Process = \
131
- Start-Process python-3.9.13-amd64.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \
132
- 'AssociateFiles=0' , \
133
- 'Include_doc=0' , \
134
- 'Include_debug=0' , \
135
- 'Include_lib=1' , \
136
- 'Include_tcltk=0' , \
137
- 'Include_test=0' , \
138
- 'InstallAllUsers=1' , \
139
- 'InstallLauncherAllUsers=0' , \
140
- 'PrependPath=1' , \
141
- '/quiet' \
142
- ); \
143
- if ($Process.ExitCode -eq 0) { \
144
- Write-Host '✓' ; \
145
- } else { \
146
- Write-Host ('✘ ({0})' -f $Process.ExitCode); \
147
- exit 1; \
148
- } \
149
- Remove-Item -Force python-3.9.13-amd64.exe; \
150
- Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\*
151
-
152
152
# Default to powershell
153
153
# FIXME: we need to grant ContainerUser the SeCreateSymbolicLinkPrivilege
154
154
# privilege so that it can create symbolic links.
0 commit comments