Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more selective what gets copied from cross builder stage? #1331

Open
mthalman opened this issue Jan 24, 2025 · 1 comment
Open

Be more selective what gets copied from cross builder stage? #1331

mthalman opened this issue Jan 24, 2025 · 1 comment

Comments

@mthalman
Copy link
Member

There's an issue with an outdated Python package, Pygments, that is included in the cross container image and causing vulnerabilities: https://github.com/dotnet/dotnet-buildtools-prereqs-docker-internal/issues/164

Example image:

mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-armv6@sha256:9060cc2e7080451bc18aca2c9591d6c3bd8d9a222f83ef46cbce6cb15b7d0d60

has path: /crossrootfs/armv6/usr/lib/python3/dist-packages/Pygments-2.14.0.egg-info

Are these packages even needed in the final images? This one ends up getting installed as a result of this line:

RUN /scripts/eng/common/cross/build-rootfs.sh armv6 bookworm lldb13

If Python packages are not needed in the final image, can we clean things up before they get copied to the final image here:

COPY --from=builder "$ROOTFS_DIR" "$ROOTFS_DIR"

cc @sbomer

@mthalman
Copy link
Member Author

[Triage]

@sbomer - Can you take a look at this and provide some feedback on if all of these Python packages are needed in the final image? It would be nice if we could exclude them if they're unnecessary.

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

No branches or pull requests

1 participant