-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Docker image too big #23366
Copy link
Copy link
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamInstallationcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamInstallationcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request
To make it short the docker image is far too big (> 1 GB) and there are several reasons for that:
the
rm -rfcommand is increasing the size by marking all sourcefiles as deleted. you might want to use a multi stage build here for building and then creating the final image.image was analyzed with dive which shows you all the added files: https://github.com/wagoodman/dive
also related to #23286