From 8466a4f19de76e2f3a55f7c7bf3a13ec02e926ff Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Wed, 26 Jun 2024 12:54:21 +0000 Subject: [PATCH] tools-image: Clear /tmp contents as last step /tmp in cloudshell has a whole bunch of leftover directories and files from the various installation steps that run during the build. Clear /tmp/ as the final step before finalizing the image. This doesn't make the image smaller because the files are still present in previous layers but makes the user experience better. Signed-off-by: Jeremi Piotrowski --- linux/tools.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index a7466c26..3ebe2ae7 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -69,6 +69,8 @@ COPY ./linux/powershell/Invoke-PreparePowerShell.ps1 linux/powershell/Invoke-Pre # Remove su so users don't have su access by default. RUN rm -f ./linux/Dockerfile && rm -f /bin/su +# cleanup tmp files left behind by installation +RUN find /tmp/ -mindepth 1 -delete #Add soft links RUN ln -s /usr/bin/python3 /usr/bin/python