fix: clean up Docker image waste for arm64 - #2178
Conversation
2da4554 to
ff6b20a
Compare
Install Playwright and Patchright browsers directly into appuser's runtime cache in the same Docker layer instead of installing under root and copying them later. Restrict the explicit Playwright install to Chromium. Delete doctor-generated core dumps from APP_HOME and temporary/home paths in the same layer that runs the doctor, so the files are not retained in image history. Fixes unclecode#2092 Signed-off-by: Battleplus <3559424769@qq.com>
ff6b20a to
36393d7
Compare
|
Follow-up audit found two issues in the original cleanup: deleting The PR is now based on |
|
Closing in favor of the earlier #2095. That PR has already incorporated maintainer feedback about keeping setup, Chromium-only installation, doctor execution, runtime-cache copy, and both cleanups in one ordered Docker layer, and its security/posture checks pass. It is the more thoroughly reviewed and validated implementation. |
What
/root/.cacheafter copying to appusercrawl4ai-doctorWhy
Fixes #2092 - arm64 image ships ~2.4GB of build-time waste.
Changes
rm -rf /root/.cache/ms-playwrightafter copying to appuserfind / -name '*.core' -deleteafter crawl4ai-doctorTesting
Fixes #2092