-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for making windows and linux docker images
- Loading branch information
Showing
3 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM mcr.microsoft.com/windows/servercore:ltsc2022 | ||
|
||
SHELL ["powershell", "-Command"] | ||
|
||
WORKDIR C:\\app\\ | ||
|
||
ENV PYTHON_VERSION=3.11.6 | ||
|
||
RUN Invoke-WebRequest -Uri "https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe" -OutFile "C:\\python-installer.exe" -UseBasicParsing; \ | ||
$gitRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/git-for-windows/git/releases/latest" -Headers @{ 'User-Agent' = 'Docker Build' }; \ | ||
$gitInstallerUrl = $gitRelease.assets | Where-Object { $_.name -like '*64-bit.exe' } | Select-Object -ExpandProperty browser_download_url; \ | ||
Invoke-WebRequest -Uri $gitInstallerUrl -OutFile "C:\\git-installer.exe" -UseBasicParsing; | ||
|
||
RUN Start-Process -FilePath "C:\\python-installer.exe" -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1 TargetDir=C:\\Python' -Wait; \ | ||
Start-Process -FilePath "C:\\git-installer.exe" -ArgumentList '/VERYSILENT /NORESTART /SP-' -Wait; \ | ||
Remove-Item -Force "C:\\python-installer.exe", "C:\\git-installer.exe"; \ | ||
if (!(Test-Path 'C:\\Python')) { throw 'Python installation failed!' }; \ | ||
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine) | ||
|
||
RUN $latestRelease = (Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/lisa/releases/latest").tag_name; \ | ||
git clone --depth 1 --branch $latestRelease https://github.com/microsoft/lisa.git C:\\app\\lisa | ||
|
||
WORKDIR C:\\app\\lisa | ||
|
||
RUN python -m pip install --no-cache-dir --upgrade pip; \ | ||
python -m pip install --no-cache-dir --editable .[ado,azure,libvirt,baremetal] --config-settings editable_mode=compat |