[Bug]: arm64 image ships ~2.4GB of build-time waste (core dumps + duplicate Chromium cache), root-caused to QEMU CI emulation
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- docker, github-actions, playwright, python
- 领域
- ci-cd, devops, infrastructure
调研方向
Start with the arm64 build configuration in .github/workflows/docker-release.yml and locate the steps that install and copy Playwright browsers during the image build. Reproduce the reported sizes with docker history and du, then verify that the arm64 image has no /app/*.core files or unused /root/.cache/ms-playwright copy while the appuser browser cache remains usable.
由索引模型根据 Issue 内容生成。
描述
crawl4ai version
0.9.2
Expected Behavior
The published arm64 Docker image should only contain files needed at runtime. Build/test artifacts (crash dumps from the crawl4ai-doctor sanity check) and intermediate install artifacts (the root-owned Playwright browser cache, superseded by the copy made for appuser) should be cleaned up before the image layers are committed.
Current Behavior
unclecode/crawl4ai:latest (arm64) reports as 9.06GB via docker images. Inspecting a freshly-pulled container shows two separate sources of dead weight, totaling ~2.4GB of its ~5.5GB live filesystem:
- Core dumps in /app (~926MB)
-r--r--r-- root root 510M /app/qemu_headless_shell_20260715-085214_28.core
-r--r--r-- root root 208M /app/qemu_headless_shell_20260715-085211_34.core
-r--r--r-- root root 208M /app/qemu_headless_shell_20260715-085211_32.core
- These are dated at image build time, not container runtime, and are root-owned/read-only, so end users can't remove them from a running container.
- Duplicate Chromium install (~1.5GB)
1.5G /root/.cache/ms-playwright (dead - root never runs; container runs as appuser)
958M /home/appuser/.cache/ms-playwright (actually used at runtime)
playwright install --with-depsinstalls the browser to/root/.cache(running as root during build), then a laterRUN step cp -r's it to/home/appuser/.cachefor the actual runtime user, but never deletes the original. Both copies ship in the final image.
Is this reproducible?
Yes
Inputs Causing the Bug
N/A — not input-dependent. Present in every pull of the arm64 image, not triggered by user config.
Steps to Reproduce
Steps to Reproduce:
1. docker pull unclecode/crawl4ai:latest
2. docker run --rm -it unclecode/crawl4ai:latest bash
3. ls -lh /app/*.core
4. du -sh /root/.cache/ms-playwright /home/appuser/.cache/ms-playwright
Code snippets
docker history — confirms duplicate layer cost:
$ docker history --no-trunc unclecode/crawl4ai:latest | grep -E "chown -R root|cp -r.*ms-playwright"
972MB RUN chown -R root:root ${APP_HOME} && chmod -R a-w ${APP_HOME}
1GB RUN mkdir -p /home/appuser/.cache/ms-playwright \
&& cp -r /root/.cache/ms-playwright/chromium-* \
/root/.cache/ms-playwright/chromium_headless_shell-* \
/home/appuser/.cache/ms-playwright/ \
&& chown -R appuser:appuser /home/appuser/.cache/ms-playwright
docker-release.yml — confirms cross-arch QEMU build:
$ grep -A3 "platforms:" .github/workflows/docker-release.yml
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
OS
Linux (Raspberry Pi OS, arm64
Python version
3.12
Browser
Chromium (bundled headless_shell, via Playwright build 1228)
Browser version
149.0.7827.0
Error logs & Screenshots (if applicable)
docker history shows the chown -R root:root $APP_HOME && chmod -R a-w $APP_HOME layer at 972MB, matching the ~926MB of .core files in /app. du -sh on a running container shows /root/.cache/ms-playwright (1.5G) and /home/appuser/.cache/ms-playwright (958M) as separate, duplicate browser installs
- 主要语言
- Python
- 星标
- 84.5k
- 派生
- 8.7k
- 平均合并
- 3 天 9 小时
- 30 天内合并 PR
- 17
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
unclecode/crawl4ai 的其他 Issue
-
[Bug]: Reusing BFSDeepCrawlStrategy leaks the previous crawl's max_pages budget into a fresh run未关闭
难度 2/5 1-3 小时 新手友好度 78/100
unclecode/crawl4ai#2309 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
unclecode/crawl4ai#2147 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
unclecode/crawl4ai#2123 · 1 条评论 ·
维护者通常 1 天内回复
-
🐞 Bug 🩺 Needs Triage
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
查看 unclecode/crawl4ai 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
letsencrypt/cp-cps#353 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
DOI-USGS/pywatershed#421 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
python-pillow/Pillow#10087 · 1 条评论 ·
维护者通常 1 天内回复