Image details
- Base: Alpine Linux 3.20 (with
ca-certificates+tzdata) — ~12 MB - Runs as: non-root user
buttons(UID 1000),WORKDIR /home/buttons - Entrypoint: the
buttonsbinary, sodocker run … <verb>runs that command; baredocker run …defaults to--help - Shell available:
/bin/sh— shell buttons work out of the box - Bash / Python / Node: not included — add via
apk addin your derived image - Architectures:
linux/amd64,linux/arm64
Pattern 1: Multi-stage copy (recommended)
The most common pattern for agent deployments. Copy just the binary into your own image — no Alpine overhead:buttons binary is statically linked with no external dependencies, so it runs in any Linux image.
Pattern 2: Direct docker run
For one-off commands or quick tests:Pattern 3: Volume-mounted state
Persist button state and run history to the host by mounting the data dir. The image runs as the non-root userbuttons (UID 1000), so its ~/.buttons resolves to /home/buttons/.buttons — mount there, not /root:
chown the directory to 1000 or add --user "$(id -u)" to the docker run invocation (combine with -e BUTTONS_HOME=/home/buttons/.buttons so the data dir is found regardless of that user’s home).
Adding Bash, Python, or Node to a derived image
Shell buttons work in the base image. For Bash, Python, or Node buttons, extend the image:Environment variables in containers
SetBUTTONS_HOME to control where state is stored inside the container:
Related
- Installation — all install options including curl and Go
- Install script — how the install.sh script works
- Button folder structure — what lives in
BUTTONS_HOME