-
Notifications
You must be signed in to change notification settings - Fork 115
Remove helix script install (partial set of Dockerfiles) #1336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
65a76f2
Remove helix script install
mthalman 075da16
Add back virtual environments
mthalman 297153d
update python version in Windows dockerfiles
mthalman ee84975
update Windows Dockerfiles to install latest Python version
mthalman 9e2980f
Update python comment for AlmaLinux
mthalman f48f7ff
Updates to fix issues with Windows Dockerfiles
mthalman 78d5b6a
Create virtual env as helixbot user
mthalman b8b75aa
updates to Windows dockerfiles
mthalman 01fd064
Fix setting of env vars
mthalman 52f4b8e
Remove virtualenv installation
mthalman a36b6ec
Forgot to remove this
mthalman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
# escape=` | ||
FROM mcr.microsoft.com/windows/servercore:ltsc2019 | ||
|
||
SHELL ["cmd", "/S", "/C"] | ||
USER ContainerAdministrator | ||
# Install latest stable version of Python | ||
RUN powershell -Command "` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no big deal but this is easier to grok than the nanoserver approach using |
||
$ErrorActionPreference = 'Stop'; ` | ||
$ProgressPreference = 'SilentlyContinue'; ` | ||
$apiUrl = 'https://api.nuget.org/v3-flatcontainer/python/index.json'; ` | ||
$response = Invoke-RestMethod -Uri $apiUrl; ` | ||
$versions = $response.versions | Where-Object { $_ -notmatch '-' } | Sort-Object { [version]$_ } -Descending; ` | ||
$latestVersion = $versions[0]; ` | ||
echo \"Downloading Python $latestVersion\"; ` | ||
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/python/$latestVersion -OutFile $env:TEMP\python.zip; ` | ||
md C:\Python; ` | ||
md C:\PythonTemp; ` | ||
tar -zxf $env:TEMP\python.zip -C C:\PythonTemp; ` | ||
xcopy /s c:\PythonTemp\tools C:\Python; ` | ||
Remove-Item -Recurse -Force C:\PythonTemp; ` | ||
Remove-Item -Force $env:TEMP\python.zip;" | ||
|
||
RUN curl -SL --output %TEMP%\python.zip https://www.nuget.org/api/v2/package/python/3.7.3 ` | ||
&& md C:\Python C:\PythonTemp ` | ||
&& tar -zxf %TEMP%\python.zip -C C:\PythonTemp ` | ||
&& xcopy /s c:\PythonTemp\tools C:\Python ` | ||
&& rd /s /q c:\PythonTemp ` | ||
&& del /q %TEMP%\python.zip ` | ||
&& setx /M PYTHONPATH "C:\Python\Lib;C:\Python\DLLs;" | ||
RUN setx /M PATH "%PATH%;C:\Python;C:\python\scripts" && ` | ||
setx /M PYTHONPATH "C:\Python\Lib;C:\Python\DLLs;" && ` | ||
setx /M VIRTUAL_ENV "C:\Python-env" | ||
|
||
RUN md c:\\helixtmp && pushd c:\\helixtmp &&` | ||
C:\Python\python.exe -m pip install --upgrade pip==20.2 --no-warn-script-location && ` | ||
C:\Python\python.exe -m pip install virtualenv==16.6.0 --no-warn-script-location && ` | ||
C:\Python\python.exe -m pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && ` | ||
for %f in (.\helix_scripts-*-py3-none-any.whl) do (C:\Python\python.exe -m pip install %f --no-warn-script-location) && ` | ||
popd && rd /s /q c:\\helixtmp && ` | ||
RUN python -m pip install --upgrade pip && ` | ||
python -m venv %VIRTUAL_ENV% && ` | ||
powershell -Command ` | ||
New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\' -Name 'dotnet.exe' -Force -ErrorAction SilentlyContinue ; ` | ||
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\dotnet.exe' -Value 2 -Name DumpType -Force ; ` | ||
|
@@ -26,8 +32,6 @@ RUN md c:\\helixtmp && pushd c:\\helixtmp &&` | |
New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\' -Name 'corerun.exe' -Force -ErrorAction SilentlyContinue ; ` | ||
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\corerun.exe' -Value 2 -Name DumpType -Force ; ` | ||
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\corerun.exe' -Value 'C:\cores' -Name DumpFolder -Force ; ` | ||
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\corerun.exe' -Value 2 -Name DumpCount -Force && ` | ||
setx /M PATH "%PATH%;C:\Python;C:\python\scripts" | ||
|
||
WORKDIR C:\\Work | ||
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\corerun.exe' -Value 2 -Name DumpCount -Force | ||
|
||
WORKDIR C:\Work |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.