diff --git a/configs/windows/MinimalAgent/nanoserver/NanoServer2022.Dockerfile b/configs/windows/MinimalAgent/nanoserver/NanoServer2022.Dockerfile index 98281f08..af60e298 100644 --- a/configs/windows/MinimalAgent/nanoserver/NanoServer2022.Dockerfile +++ b/configs/windows/MinimalAgent/nanoserver/NanoServer2022.Dockerfile @@ -28,6 +28,10 @@ USER ContainerAdministrator COPY scripts/*.cs /scripts/ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +# CaseSensitivity is essential for the agent => enforcing it. SHELL usage is mandatory (pwsh or other won't work) +RUN mkdir C:\\BuildAgent +SHELL ["pwsh", "-Command", "fsutil.exe", "file", "SetCaseSensitiveInfo", "C:\\BuildAgent", "enable"] + # Prepare build agent distribution COPY TeamCity/buildAgent C:/BuildAgent COPY run-agent.ps1 /BuildAgent/run-agent.ps1 diff --git a/context/generated/windows/MinimalAgent/nanoserver/2022/Dockerfile b/context/generated/windows/MinimalAgent/nanoserver/2022/Dockerfile index 32521417..7e624093 100644 --- a/context/generated/windows/MinimalAgent/nanoserver/2022/Dockerfile +++ b/context/generated/windows/MinimalAgent/nanoserver/2022/Dockerfile @@ -22,6 +22,10 @@ USER ContainerAdministrator COPY scripts/*.cs /scripts/ SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +# CaseSensitivity is essential for the agent => enforcing it. SHELL usage is mandatory (pwsh or other won't work) +RUN mkdir C:\\BuildAgent +SHELL ["pwsh", "-Command", "fsutil.exe", "file", "SetCaseSensitiveInfo", "C:\\BuildAgent", "enable"] + # Prepare build agent distribution COPY TeamCity/buildAgent C:/BuildAgent COPY run-agent.ps1 /BuildAgent/run-agent.ps1