Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.22k stars 3.83k forks source link

[Feature]: Remove latest.tar.gz and Latest Folder From Docker Container Layer #26123

Open gone-for-coding opened 1 week ago

gone-for-coding commented 1 week ago

Description of the new feature

The alpine image build process does not remove temporary files resulting in wasted space of about 200MiB.

/ # du -h latest*
105.4M  latest
102.5M  latest.tar.gz

Proposed implementation details (optional)

Remove the latest directory and latest.tar.gz file from the layer here: https://github.com/Azure/azure-powershell/blob/main/docker/Dockerfile-alpine-3.17#L34-L39

gone-for-coding commented 1 week ago

FYI: Other images are affected as well.

isra-fel commented 1 week ago

@Nickcandy let's remove the temp files