Skip to content

Docker image doesn't remove apk virtual package .build-deps #23286

@tspearconquest

Description

@tspearconquest

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

N/A

Describe the bug

Line 38 of the main azure-cli Dockerfile:
https://github.com/Azure/azure-cli/blob/dev/Dockerfile#L38

This line installs a set of packages as a virtual package called .build-deps but nowhere later on in Dockerfile is this virtual package removed.

To Reproduce

Read the Dockerfile in the dev or main branch of this repo

Expected behavior

These tools installed are intended only for building the azure-cli docker image. Generally speaking these packages are not used during the container runtime and are extra data that doesn't need to be in the image. There should be a corresponding apk --no-cache del --no-network .build-deps near the end of the Dockerfile in order to remove these packages.

Removing these packages will reduce the image size.

Environment summary

N/A

Additional context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamInstallationcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions