fix(docker): remove build artifacts from image layers#2095
Open
nightcityblade wants to merge 1 commit into
Open
fix(docker): remove build artifacts from image layers#2095nightcityblade wants to merge 1 commit into
nightcityblade wants to merge 1 commit into
Conversation
Signed-off-by: nightcityblade <nightcityblade@gmail.com>
Contributor
Author
|
CI follow-up: both Security jobs pass. The only failure is the Discord notification job, whose log reports that DISCORD_WEBHOOK is not defined; this is a repository workflow-secret issue rather than a failure in the Dockerfile change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2092.
Keep Playwright installation, runtime-cache copying, and root-cache cleanup in one Docker layer so the superseded root-owned browser cache is not committed to the image. Remove QEMU core dumps immediately after
crawl4ai-doctor, before that layer is committed.List of files changed and why
Dockerfile- clean duplicate Playwright data and doctor core dumps in the same layers that create them.deploy/docker/tests/test_security_container_posture.py- enforce both same-layer cleanup guarantees.How Has This Been Tested?
docker buildx build --check --progress plain .— check complete, no warnings found..venv/bin/python -m pytest deploy/docker/tests/test_security_*.py -q— 317 passed, 1 xfailed..venv/bin/black --check --target-version py312 deploy/docker/tests/test_security_container_posture.py— passed..venv/bin/ruff check deploy/docker/tests/test_security_container_posture.py— passed.git diff --check— passed.A full multi-architecture image build was not run locally; the focused posture test verifies that each cleanup remains in the Docker layer that creates its artifact.
Checklist: