Skip to content

Commit a752d68

Browse files
author
Joseph
committed
made further changes to base image
Signed-off-by: Joseph <[email protected]>
1 parent 2d16704 commit a752d68

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

windows-arc-runner/Dockerfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG RUNNER_CONTAINER_HOOKS_VERSION=0.6.1
99
WORKDIR C:/home/runner
1010

1111
################################################################################
12-
# Use PowerShell for most installations
12+
# Use PowerShell for initial installs
1313
################################################################################
1414
SHELL ["powershell", "-Command", "$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';"]
1515

@@ -21,30 +21,30 @@ RUN Invoke-WebRequest -Uri "https://github.com/actions/runner/releases/download/
2121
[System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner.zip', $PWD); `
2222
Remove-Item -Force actions-runner.zip
2323

24-
# Install Chocolatey and tools (without refreshenv)
24+
################################################################################
25+
# Install Chocolatey + tools (Git, Python, CMake, etc.)
26+
################################################################################
2527
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
2628
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072; `
2729
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')); `
2830
choco feature enable -n allowGlobalConfirmation; `
2931
choco install -y git.install gh powershell-core azure-cli docker-cli docker-compose cmake python --installargs '"ADD_CMAKE_TO_PATH=System"'
3032

31-
# Manually append Git and Python to PATH if needed
32-
RUN setx /M PATH "$($Env:PATH);C:\Program Files\Git\bin;C:\Python313"
33-
# Add Git Bash to PATH
34-
RUN setx /M PATH "$($Env:PATH);C:\Program Files\Git\bin"
33+
# Add Git & Python to PATH (paths with spaces are quoted)
34+
RUN setx /M PATH "$Env:PATH;\"C:\Program Files\Git\bin\";C:\Python313"
3535

36-
# Enable long paths
36+
# Enable long paths in Windows
3737
RUN New-ItemProperty -Path "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
3838

3939
################################################################################
40-
# Switch to cmd for VS installer
40+
# Switch to CMD for VS Build Tools
4141
################################################################################
4242
SHELL ["cmd", "/S", "/C"]
4343

4444
# Download VS Build Tools installer
4545
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
4646

47-
# Install VS Build Tools inside a single RUN
47+
# Install VS Build Tools inside a single RUN instruction (no invalid Docker instructions)
4848
RUN (start /w C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
4949
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
5050
--add Microsoft.VisualStudio.Workload.VCTools `
@@ -55,15 +55,15 @@ RUN (start /w C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
5555
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
5656
&& del /q C:\TEMP\vs_buildtools.exe
5757

58-
# Add VS Build Tools to PATH
58+
# Add VS Build Tools paths
5959
RUN setx /M PATH "%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\Common7\Tools;%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"
6060

6161
################################################################################
62-
# Switch back to PowerShell for Python, certs, vcpkg
62+
# Switch back to PowerShell for Python certs and vcpkg
6363
################################################################################
6464
SHELL ["powershell", "-Command"]
6565

66-
# Upgrade Python packages & configure certs
66+
# Configure Python certificates
6767
RUN python -m pip install --upgrade certifi setuptools; `
6868
setx SSL_CERT_FILE "C:\Users\ContainerAdministrator\AppData\Local\Programs\Python\Python310\Lib\site-packages\certifi\cacert.pem"; `
6969
certutil -generateSSTFromWU certs.sst; `
@@ -73,7 +73,7 @@ RUN python -m pip install --upgrade certifi setuptools; `
7373
# Install vcpkg
7474
RUN git clone https://github.com/microsoft/vcpkg.git C:\vcpkg; `
7575
C:\vcpkg\bootstrap-vcpkg.bat; `
76-
setx /M PATH "$($Env:PATH);C:\vcpkg"; `
76+
setx /M PATH "$Env:PATH;C:\vcpkg"; `
7777
C:\vcpkg\vcpkg.exe install zlib:x64-windows --clean-after-build; `
7878
C:\vcpkg\vcpkg.exe remove zlib:x64-windows
7979

0 commit comments

Comments
 (0)