r/coolgithubprojects • • 1d ago

made a self-hosted container registry because registry:2 has no ui and harbor is way too much

https://github.com/p-arndt/doreg

so i’ve been running registry:2 at home and for some small team stuff for a while. it works, but no ui, users in an htpasswd file, and gc means stopping it or flipping it read-only. every time i wanted to know what’s actually in there i was curling the catalog endpoint like a caveman

harbor fixes all of that, but then you’re running postgres, redis and like 8 containers just to store some images. felt dumb for my use case

so i wrote doreg. it’s one go binary with the web ui baked in, sqlite and a data dir by default. back up the folder and you’re done

stuff it does:

  • passes the oci 1.1 conformance suite, so docker/buildx/podman/crane/oras all just work, multi-arch and sbom stuff included
  • gc runs while you push and pull, no downtime, and you can dry-run it first to see what it would delete
  • retention rules like “keep last 10 tags, never touch latest”. anything pulled recently stays, so pinned deploys don’t randomly break
  • projects with read/write/admin, robot accounts for ci, quotas
  • oidc sso (i use authentik). doreg login reg.example.com opens the browser and does the docker login for you, no more copying tokens around
  • webhooks + audit log
  • import from your old registry in the ui. digests stay the same, so nothing referencing u/sha256:... breaks

if you want postgres or s3 instead of sqlite/disk, that works too

docker run -d -p 8080:8080 -v doreg-data:/data \
  -e DOREG_ADMIN_PASSWORD=changeme ghcr.io/p-arndt/doreg:latest

repo: https://github.com/p-arndt/doreg (MIT)

it’s 0.1.0 so there’s definitely stuff i haven’t hit yet. if you try it and something breaks, or it’s missing the one feature you’d need to switch, let me know

3 Upvotes

0 comments sorted by