diff --git a/docker/tests/Templates/debian.9/Dockerfile b/docker/tests/Templates/debian.9/Dockerfile index a1775442b66..f2de0f8d61f 100644 --- a/docker/tests/Templates/debian.9/Dockerfile +++ b/docker/tests/Templates/debian.9/Dockerfile @@ -14,7 +14,8 @@ RUN apt-get update \ curl \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 @@ -23,6 +24,6 @@ RUN locale-gen $LANG && update-locale RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME RUN dpkg -i $PACKAGENAME || : -RUN apt-get install -y -f +RUN apt-get install -y -f --no-install-recommends RUN $TESTDOWNLOADCOMMAND RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" diff --git a/docker/tests/Templates/fxdependent-debian.9/Dockerfile b/docker/tests/Templates/fxdependent-debian.9/Dockerfile index 3c4b6815d55..2d7beff913b 100644 --- a/docker/tests/Templates/fxdependent-debian.9/Dockerfile +++ b/docker/tests/Templates/fxdependent-debian.9/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update \ ca-certificates \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 diff --git a/docker/tests/Templates/fxdependent-dotnetsdk-latest/Dockerfile b/docker/tests/Templates/fxdependent-dotnetsdk-latest/Dockerfile index a9f245c30f0..bd61efbf6cb 100644 --- a/docker/tests/Templates/fxdependent-dotnetsdk-latest/Dockerfile +++ b/docker/tests/Templates/fxdependent-dotnetsdk-latest/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update \ ca-certificates \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 diff --git a/docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile b/docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile index ef2538d1aa3..4964c9613d6 100644 --- a/docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile +++ b/docker/tests/Templates/fxdependent-ubuntu16.04/Dockerfile @@ -13,14 +13,16 @@ RUN apt-get update \ ca-certificates \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Install dotnet-runtime ADD https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb . RUN dpkg -i packages-microsoft-prod.deb RUN apt-get update \ && apt-get install -y --no-install-recommends \ - dotnet-runtime-2.1 + dotnet-runtime-2.1 \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 diff --git a/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile b/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile index a8d8ccca43f..acec24a0f6e 100644 --- a/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile +++ b/docker/tests/Templates/fxdependent-ubuntu18.04/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update \ ca-certificates \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 diff --git a/docker/tests/Templates/ubuntu16.04/Dockerfile b/docker/tests/Templates/ubuntu16.04/Dockerfile index f84a8fe1eec..7439eda5a7d 100644 --- a/docker/tests/Templates/ubuntu16.04/Dockerfile +++ b/docker/tests/Templates/ubuntu16.04/Dockerfile @@ -14,7 +14,8 @@ RUN apt-get update \ curl \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 @@ -23,6 +24,6 @@ RUN locale-gen $LANG && update-locale RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME RUN dpkg -i $PACKAGENAME || : -RUN apt-get install -y -f +RUN apt-get install -y -f --no-install-recommends RUN $TESTDOWNLOADCOMMAND RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" diff --git a/docker/tests/Templates/ubuntu18.04/Dockerfile b/docker/tests/Templates/ubuntu18.04/Dockerfile index da7a0b0a3c6..6c7a960130d 100644 --- a/docker/tests/Templates/ubuntu18.04/Dockerfile +++ b/docker/tests/Templates/ubuntu18.04/Dockerfile @@ -14,7 +14,8 @@ RUN apt-get update \ curl \ apt-transport-https \ locales \ - git + git \ + && apt-get clean # Setup the locale ENV LANG en_US.UTF-8 @@ -23,6 +24,6 @@ RUN locale-gen $LANG && update-locale RUN curl -L -o $PACKAGENAME $PACKAGELOCATION/$PACKAGENAME RUN dpkg -i $PACKAGENAME || : -RUN apt-get install -y -f +RUN apt-get install -y -f --no-install-recommends RUN $TESTDOWNLOADCOMMAND RUN pwsh$PREVIEWSUFFIX -c "Import-Module /PowerShell/build.psm1;\$dir='/usr/local/share/powershell/Modules';\$null=New-Item -Type Directory -Path \$dir -ErrorAction SilentlyContinue;Restore-PSPester -Destination \$dir;exit (Invoke-Pester $TESTLIST -PassThru).FailedCount" diff --git a/tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04/Dockerfile b/tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04/Dockerfile index 251ff4153ca..401af92128a 100644 --- a/tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04/Dockerfile +++ b/tools/releaseBuild/Images/microsoft_powershell_ubuntu16.04/Dockerfile @@ -26,6 +26,7 @@ RUN apt-get update \ apt-transport-https \ locales \ wget \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* COPY PowerShellPackage.ps1 / diff --git a/tools/releaseBuild/Images/microsoft_powershell_ubuntu18.04/Dockerfile b/tools/releaseBuild/Images/microsoft_powershell_ubuntu18.04/Dockerfile index 11dd7480d40..f8049e9de1c 100644 --- a/tools/releaseBuild/Images/microsoft_powershell_ubuntu18.04/Dockerfile +++ b/tools/releaseBuild/Images/microsoft_powershell_ubuntu18.04/Dockerfile @@ -26,6 +26,7 @@ RUN apt-get update \ apt-transport-https \ locales \ wget \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* COPY PowerShellPackage.ps1 /