Skip to content

Conversation

@chngjp
Copy link

@chngjp chngjp commented Feb 2, 2026

Fixes #25300

Why I did it

The PMON (docker-platform-monitor) image installs grpcio / grpcio-tools for platform dependencies. These packages include native Python extension .so files that retain unneeded symbols, increasing image size. This PR strips unneeded symbols to reduce image size without changing runtime behavior.

Work item tracking
  • Microsoft ADO: N/A

How I did it

  • Temporarily install binutils during the image build
  • Strip unneeded symbols from grpc native Python extension modules
  • Purge binutils during cleanup to keep the final image lean

How to verify it

  • Build docker-platform-monitor successfully
  • Start the container and confirm platform-monitor services run as expected

Which release branch to backport (provide reason below if selected)

  • No backport requested (enhancement / optimization)

Tested branch (Please provide the tested image version)

  • N/A (local build)

Description for the changelog

Reduce docker-platform-monitor image size by stripping unneeded symbols from grpc Python extensions.

@chngjp chngjp requested a review from lguohan as a code owner February 2, 2026 05:59
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 2, 2026

CLA Not Signed

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chngjp chngjp force-pushed the platform-monitor-docker-fix branch from c88c338 to a77d3c7 Compare February 2, 2026 07:53
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…extensions

Strip unneeded symbols from grpc native Python modules and remove binutils
after use to keep the PMON container lean.
@chngjp chngjp force-pushed the platform-monitor-docker-fix branch from a77d3c7 to 0d4d301 Compare February 2, 2026 10:08
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement:Reduce PMON docker image size by stripping grpc native extensions

3 participants