Skip to content

Commit

Permalink
Reduce Image size by deleting temporary chocolatey files.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfloch committed Nov 4, 2019
1 parent 0666152 commit 49f89bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/docker/rez-win-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
5 changes: 4 additions & 1 deletion .github/docker/rez-win-py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 49f89bb

Please sign in to comment.