FROM mcr.microsoft.com/windows/servercore:ltsc2022 SHELL ["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"] # Base image for Windows Gitea runners with Git for Windows tools and gitea runner. ARG ACT_RUNNER_VERSION=2.0.0 RUN Set-StrictMode -Version Latest; \ $ErrorActionPreference = 'Stop'; \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')); \ choco config set commandExecutionTimeoutSeconds 14400; \ choco feature disable -n showDownloadProgress; \ choco feature enable -n allowGlobalConfirmation; \ choco install git --yes --no-progress --limit-output; \ New-Item -ItemType Directory -Path C:\gitea-runner -Force | Out-Null; \ $runnerUrl = 'https://gitea.com/gitea/runner/releases/download/v{0}/gitea-runner-{0}-windows-amd64.exe' -f $env:ACT_RUNNER_VERSION; \ Invoke-WebRequest -UseBasicParsing -Uri $runnerUrl -OutFile C:\gitea-runner\act_runner.exe COPY ["start-runner.ps1", "C:/gitea-runner/start-runner.ps1"] ENV PATH="C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps" ENTRYPOINT ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "C:\\gitea-runner\\start-runner.ps1"]