AIFeed

Show HN: Self-hosted Docker image registry. One container, two simple accounts

Original text(via Hacker News)
Registreasy — self-hosted Docker image registry with push and pull users
Registreasy — self-hosted Docker image registry with push and pull users

Why Registreasy?

  • One container, one port, one data folder. Back up ./data and keep your deployment configuration and credentials with it.
  • Simple users that match how you work. Two accounts, and exactly that much.
  • See what you have. A web page lists tagged images by repository and previews deletes before you confirm.
AccountCan do
🔑 pushRead images, publish images, delete tags in the web page
👀 pullRead images only. Leave PULL_PASSWORD unset to skip it and allow anonymous pulls

Built on the CNCF Distribution registry behind Nginx. Works with plain docker login, push, pull and Compose.

Quick start

docker-compose.yml:


        services:
  registreasy:
    image: ghcr.io/dellarb/registreasy:latest
    restart: unless-stopped
    ports:
      - "${BIND_ADDRESS:-127.0.0.1}:${PORT:-5000}:5000"
    environment:
      PUSH_PASSWORD: "replace-with-a-long-random-push-password"
      PULL_PASSWORD: "replace-with-a-long-random-pull-password"   # omit to allow pulls with no password
    volumes:
      - ./data:/data
      

Replace each example password with a different random secret.


        docker compose up -d
      

Push and pull

The quick start binds to 127.0.0.1, so only clients on the registry host can connect. For pulls and pushes from another machine on a trusted LAN or VPN, set BIND_ADDRESS in the Compose project's .env to the registry host's LAN or VPN IP (for example, 192.168.1.10) and run docker compose up -d. Set PORT in the same file if you want a host port other than 5000. Use that IP and port on the client. With plain HTTP, add the endpoint to the client's Docker insecure-registries setting and restart Docker. Only the push account can publish.


        docker pull alpine:3.22
docker tag alpine:3.22 localhost:5000/example/alpine:demo
docker login localhost:5000 -u push
docker push localhost:5000/example/alpine:demo
docker logout localhost:5000
docker image rm localhost:5000/example/alpine:demo

# Omit this login when PULL_PASSWORD is unset.
docker login localhost:5000 -u pull
docker pull localhost:5000/example/alpine:demo
      

Docker keeps one login per hostname, so a docker login -u push and a docker login -u pull overwrite each other. Pushing needs the push login; pulling needs whichever account your PULL_PASSWORD setting requires.

Replace localhost:5000 with your host and port. Images are stored under the repository name you choose, here example/alpine.

Web Administration

Open the web inventory http://[yourhost]:5000 and sign in. The pull account provides a read-only view when configured. The push account can preview and confirm tagged-image deletes.

Routine deletes leave the registry online. In Settings, the push user can run offline garbage collection on demand or enable a daily window. See maintenance and recovery for downtime, backups, and rollback. The registry-size card measures the on-disk total automatically when you open the inventory.

Telemetry is optional and off until a signed-in user opts in (banner or Settings → Privacy & Telemetry); there is also a Feedback button. It is pseudonymous installation telemetry: counts and error categories only, never image names, tags or users, and you can preview exactly what each option sends and turn it off at any time. See telemetry, privacy and feedback.

The Registreasy web inventory, showing repositories, tags, sizes and build dates
The Registreasy web inventory, showing repositories, tags, sizes and build dates

Advanced

HTTPS. By default, plain HTTP is accepted only from private addresses (loopback, 10/8, 172.16/12, 192.168/16, 169.254/16, 100.64/10 and IPv6 ULA/link-local). Keep plain HTTP on a trusted LAN or VPN. For anything public, put a TLS proxy in front, bind the registry port to loopback, set REQUIRE_HTTPS=1, and point TRUSTED_PROXY at the proxy's IP so the forwarded client address and scheme are trusted. /healthz remains available over plain HTTP for monitors, including when REQUIRE_HTTPS=1.

Pull without a password. Leave PULL_PASSWORD unset or empty. Anyone who reaches the port can pull every image. Writes and the web page still need a sign-in. Use it only on a LAN or VPN, or behind HTTPS with appropriate access controls.

Configuration.

VariableDefaultMeaning
PUSH_PASSWORDrequiredPush user password
PULL_PASSWORDunset (anonymous pulls)Pull user password; set it to require authenticated pulls
PUSH_USERNAME / PULL_USERNAMEpush / pullAccount names (must differ)
BIND_ADDRESS / PORT127.0.0.1 / 5000Compose host bind address and published port
REQUIRE_HTTPS0Require HTTPS except for health checks
TRUSTED_PROXYunsetIP address of the TLS proxy
TZUTCDefault IANA timezone for scheduled garbage collection; a timezone saved in Settings takes precedence
GC_DRAIN_SECONDS / GC_TIMEOUT_SECONDS30 / 900Seconds allowed for each drain wait and for collection, respectively
SESSION_IDLE_SECONDS / SESSION_MAX_SECONDS1800 / 43200Web sign-in limits

Build from source. git clone https://github.com/dellarb/registreasy.git, set PUSH_PASSWORD in .env and optionally PULL_PASSWORD to require authenticated pulls, then docker compose up -d --build.

Contributing and license

Pull requests welcome; see CONTRIBUTING.md. Report vulnerabilities via SECURITY.md. Licensed under the AGPL-3.0; running the unmodified image has no extra obligations.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Hacker News
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗