diff --git a/.github/docker/rez-win-base/Dockerfile b/.github/docker/rez-win-base/Dockerfile index 862f185cd..9dbe021f1 100644 --- a/.github/docker/rez-win-base/Dockerfile +++ b/.github/docker/rez-win-base/Dockerfile @@ -27,6 +27,9 @@ RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/insta choco feature disable --name showDownloadProgress; ` choco install git.install --yes --version=${ENV:GIT_VERSION}; ` choco install cmake --yes --version=${ENV:CMAKE_VERSION} --installargs 'ADD_CMAKE_TO_PATH=System'; ` - choco install pwsh --yes --version=${PWSH_VERSION}; + choco install pwsh --yes --version=${PWSH_VERSION}; ` + choco install --yes choco-cleaner; ` + C:\ProgramData\chocolatey\bin\choco-cleaner.ps1; ` + choco uninstall --yes choco-cleaner ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "ByPass"] diff --git a/.github/docker/rez-win-py/Dockerfile b/.github/docker/rez-win-py/Dockerfile index a3b3c2559..db63cc99c 100644 --- a/.github/docker/rez-win-py/Dockerfile +++ b/.github/docker/rez-win-py/Dockerfile @@ -41,7 +41,10 @@ RUN $python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" " if (-not $?) {exit 1}; ` $python_relative_ver = (& python --version 2>&1).ToString().Trim().Split(" ")[1]; ` $python_explicit_ver = (& C:\python\python.exe --version 2>&1).ToString().Trim().Split(" ")[1]; ` - if (-not ($python_explicit_ver -eq $python_relative_ver -and $python_explicit_ver -eq ${ENV:PYTHON_VERSION})) {exit 1}; + if (-not ($python_explicit_ver -eq $python_relative_ver -and $python_explicit_ver -eq ${ENV:PYTHON_VERSION})) {exit 1}; ` + choco install --yes choco-cleaner; ` + C:\ProgramData\chocolatey\bin\choco-cleaner.ps1; ` + choco uninstall --yes choco-cleaner COPY entrypoint.ps1 /entrypoint.ps1