Minimal redis image built on top of the crbr Debian base
(crbrdocker/debian:stable), multi-arch (amd64 + arm64), published by CI to
GHCR (ghcr.io/crbrdocker/redis) and Docker Hub (crbrdocker/redis).
Rebuilt weekly, but only when something changed. The previous manual
implementation is archived verbatim under OLD/.
docker run --rm -p 6379:6379 crbrdocker/redis
--privileged(or--sysctl vm.overcommit_memory=1) is recommended: the start script tries to setvm.overcommit_memory=1and raise the open-files limit, but degrades gracefully without it.- Persist data by mounting a volume at
/srv/data/redis(see below).
docker run --rm --privileged -p 6379:6379 -v redis-data:/srv/data/redis crbrdocker/redis
- Config file — baked at
/etc/redis/redis.conf(defaults:maxmemory 2gb,maxmemory-policy volatile-lru,appendonly yes,protected-mode no,daemonize no,logfile ""→ stdout,dir /srv/data/redis, …). Override the whole file by mounting your own on top of it:docker run -v ./redis.conf:/etc/redis/redis.conf:ro ... crbrdocker/redis - Data directory —
/srv/data/redis(thedirin the config — RDB dump + AOF). Declared as aVOLUME; mount a host path or named volume there to persist across container recreation (an anonymous volume is used if you mount nothing):docker run -v redis-data:/srv/data/redis ... crbrdocker/redis - Logs — container stdout (
logfile ""), sodocker logsshows them.
Everything is driven by .github/workflows/build.yml:
- prep — lowercases the registry owner (OCI rejects uppercase).
- gate —
need_rebuild.shdecides whether a rebuild is warranted. - build — matrix
arch × {amd64→ubuntu-24.04, arm64→ubuntu-24.04-arm}, native, no QEMU;docker buildx buildpushes an OCI:latest-<arch>image (with provenance + SBOM) to both registries. - manifest — merges the per-arch tags into
:latestviadocker buildx imagetools create. - cleanup — prunes untagged GHCR versions.
Triggers: any push to main, weekly cron 20 8 * * 2, or manual Run
workflow (with a force toggle, default on, to build even when the gate sees
no change).
need_rebuild.sh <image-ref> [vcs-ref] [base-image] prints REBUILD=true|false.
It rebuilds when the published image is missing, its
org.opencontainers.image.revision label ≠ HEAD, the base :stable digest it
was built on has changed, or a simulated dist-upgrade shows pending updates.
- GHCR uses the built-in
GITHUB_TOKEN(needspackages: write) — no secret. - Docker Hub is conditional on secrets
DOCKERHUB_USERNAME+DOCKERHUB_TOKEN; namespace is repo/org varDOCKERHUB_NAMESPACE(falls back to the username). Absent creds → GHCR-only.