Skip to content

A slim Docker image, built and checked by a workflow - #45

Merged
robdevops merged 1 commit into
mainfrom
claude/envirobot-next
Oct 18, 2026
Merged

robdevops merged 1 commit into
mainfrom
claude/envirobot-next

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Docker image

  • New Dockerfile (python:3.13-slim, two stages): the venv is made without pip, pip's cache or test suites; the three Inter weights the charts use come from Debian's fonts-inter; the image gets those, the bot, and the bytecode of only the modules it imports at start (16 MB, where all of it would be 48 MB; none adds ~2 s to every start).
  • 278 MB unpacked, 98 MB compressed.
  • Runs as uid 10001 with its state in /data (DATA_DIR). A COMMIT build argument is the commit the start-up log names (also the image's org.opencontainers.image.revision label).
  • .dockerignore lets in only ecobot.py, lib/ and requirements.txt, so no state, caches, *.env, tests or venv can reach the image.
  • README.md: how to build and run it. A host folder for /data must be writable by uid 10001, and Docker keeps the quotes in an --env-file value where systemd drops them.

Checks

  • New workflow docker.yml (job image): on pushes that change Dockerfile, .dockerignore or requirements.txt (any branch) it builds the image, checks the bot starts in it and names the commit, draws the sample charts in it (they must be in Inter and match tests/charts), and puts the image's size in the run's summary. It passed on this branch's commit.
  • DEVELOPMENT.md: the image job is in the table, and the Telegram line names the jobs that notify (newest, live-evals, and test on main).
  • python -m pytest -q (794 passed) and python scripts/eval_prompts.py (87 of 87). No Python files change, so there is nothing to migrate for the systemd install.

Generated by Claude Code

…only

Two stages: the build stage makes the venv (no pip, no pip cache, no test suites) and takes the three Inter weights the charts
use out of Debian's fonts-inter; the image gets those, the bot, and the bytecode of only the modules it imports at start
(16 MB, where all of it would be 48 MB; none adds ~2 s to every start). It runs as uid 10001 with its state in /data, and a
COMMIT build argument is the commit its start-up log names. 278 MB unpacked, 98 MB compressed, of which the base is 110 and
45. A workflow (docker.yml) builds it whenever the Dockerfile or requirements.txt change, starts the bot in it and checks the
charts it draws there against the reference images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
@robdevops
robdevops merged commit 3cee2a4 into main Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants