Skip to content

cleanup: remove curl in image build#2895

Closed
andyzhangx wants to merge 1 commit intomasterfrom
clean-curl
Closed

cleanup: remove curl in image build#2895
andyzhangx wants to merge 1 commit intomasterfrom
clean-curl

Conversation

@andyzhangx
Copy link
Copy Markdown
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
cleanup: remove curl in image build since curl is not needed

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 13, 2025
@andyzhangx andyzhangx requested a review from Copilot December 13, 2025 02:53
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from cvvz and gnufied December 13, 2025 02:53
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 13, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to remove curl from the Azure File CSI driver Docker image to reduce the attack surface and minimize the image size. The change adds a command to explicitly remove curl from the final container image, as it is not needed for runtime operations.

Key Changes:

  • Adds apt remove curl -y command to explicitly remove curl from the final Docker image

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +40
RUN apt remove curl -y

Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This curl removal appears unnecessary since curl is not explicitly installed in the final image stage. Looking at line 37, curl is not included in the clean-install package list. Curl was only installed in the builder stage (line 24), which is discarded during the multi-stage build. Unless curl is being pulled in as a transitive dependency of packages on line 37, this command serves no purpose. Please verify whether curl is actually present in the final image. If it is not present, remove this line. If curl is indeed present as a dependency and needs to be removed, consider combining this with line 37 using && to reduce image layers, following Docker best practices.

Suggested change
RUN apt remove curl -y

Copilot uses AI. Check for mistakes.
@andyzhangx andyzhangx closed this Dec 13, 2025
@andyzhangx andyzhangx deleted the clean-curl branch December 13, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants