|
1 | | -# Recorder image: rewindable-claude + asciinema + agg, so make-claude-gif.sh |
2 | | -# can record without re-installing the (slow) python/asciinema stack every run. |
3 | | -# docker build --platform=linux/arm64 -f scripts/Dockerfile.recorder \ |
4 | | -# --build-arg AGG_LOCAL=... -t rewindable-claude-rec scripts/ (see make-claude-gif.sh) |
| 1 | +# Recorder image: rewindable-claude + asciinema + agg + a monospace font, so |
| 2 | +# make-claude-gif.sh / record-claude-tui.sh can record without any apt/pip |
| 3 | +# install. asciinema (v3) and agg are single static binaries; the only other |
| 4 | +# need is one .ttf for agg's renderer. Populate the build context first: |
| 5 | +# bash scripts/fetch-recording-tools.sh # → scripts/.recorder-bin/ |
| 6 | +# docker build -f scripts/Dockerfile.recorder -t rewindable-claude-rec scripts/ |
5 | 7 | FROM rewindable-claude |
6 | 8 |
|
7 | | -RUN sed -ri 's#deb\.debian\.org#mirrors.aliyun.com#g' /etc/apt/sources.list.d/*.sources 2>/dev/null || true \ |
8 | | - && apt-get update -qq \ |
9 | | - && apt-get install -y -qq python3-pip fonts-dejavu-core >/dev/null 2>&1 \ |
10 | | - && (pip3 install --quiet --break-system-packages --index-url https://mirrors.aliyun.com/pypi/simple/ asciinema \ |
11 | | - || pip3 install --quiet --break-system-packages asciinema) |
| 9 | +# Static tools (no apt, no python). asciinema v3 records; agg renders cast→GIF. |
| 10 | +COPY .recorder-bin/asciinema /usr/local/bin/asciinema |
| 11 | +COPY .recorder-bin/agg /usr/local/bin/agg |
| 12 | +COPY .recorder-bin/JetBrainsMono-Regular.ttf /usr/local/share/fonts/JetBrainsMono-Regular.ttf |
| 13 | +RUN chmod 0755 /usr/local/bin/asciinema /usr/local/bin/agg |
12 | 14 |
|
13 | | -# agg (the cast→GIF renderer) is copied in from the build context. |
14 | | -COPY agg /usr/local/bin/agg |
15 | | -RUN chmod 0755 /usr/local/bin/agg |
| 15 | +# agg looks fonts up by directory; point demos at this one. |
| 16 | +ENV AGENTENV_GIF_FONT_DIR=/usr/local/share/fonts AGENTENV_GIF_FONT="JetBrains Mono" |
16 | 17 |
|
17 | | -# Restore the rewindable-claude entrypoint (FROM inherits it, but be explicit). |
18 | 18 | ENTRYPOINT ["/usr/local/bin/rewindable-claude-entrypoint"] |
0 commit comments