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

42 points by dellarb 11 hours ago on hackernews | 26 comments

aaronbrethorst | 10 hours ago

You might say that you're keeping it <puts on sunglasses, pretends to be Ted Danson in The Good Place> Registreezy.

In all seriousness, though, this is cool. I've wanted something exactly like this for a while and I'm going to go poke at it.

Shadowmist | 8 hours ago

Oh, we’re in the bad place.

Helmut10001 | 9 hours ago

I use Gitlab CE locally, which also comes with a Container Registry. However, even tuned down via parameters, a minimal Gitlab consumes at least 2-3 GB of memory these days, so having something more lightweight is really good. I transitioned all my CI&CD jobs to my internal network, behind VPN, and it makes maintaining and deploying websites really effortless and efficient, without the security implications of running Gitlab in the open.

duskwuff | 8 hours ago

Forgejo and Gitea can also host OCI registries, and are much lighter to run than Gitlab.

roygbiv2 | 6 hours ago

I'm very surprised at the amount of resources gitlab uses, I'll admit I haven't done any tuning on it though.

philipp-gayret | 6 hours ago

Having hosted Gitlab for a large org, I can reveal Gitlab is mostly open source projects glued together with a Gitlab sticker on it. At the time I hosted it, the container registry was Harbor, from https://goharbor.io . I wouldn't call it lightweight personally, as it consists of 10+ of these applications.

import | 8 hours ago

Very curious what makes this one different than zot and oci registry.

modinfo | 8 hours ago

I like your project, simple docker image and we have working Docker registry, Thank you for you hard work! I also build my own registry for npm packages and cargo crates: https://github.com/skorotkiewicz/registry

linsomniac | 8 hours ago

This looks nice.

Another option is Zot: https://zotregistry.dev/v2.1.23/

We've been running it for ~4 months and it's worked great; it's a single executable and they give you a systemd unit file to kick it off.

vmt-man | 6 hours ago

Thanks, it's a more interesting project than the one OP posted. Golang is faster and more memory-efficient.

chaz6 | 5 hours ago

The provide installation instructions for bare-metal (using a binary) and kubernetes/helm. It would be nice to also see instructions for docker/podman compose.

[OP] dellarb | 8 minutes ago

Zot is great, but for me it was a bit more complex than I wanted, with JSON configuration, user management and access policies.

For a simple homelab where I just want to push and pull Docker images, I wanted something quicker to set up and easier to manage. One container, two accounts configured through environment variables, and a simple web interface.

That's really the use case Registreasy is designed for.

Having to run it via Docker Compose is a no-go for me: I use Podman

xx_ns | 6 hours ago

I don't see any indication that it requires compose. The (fairly simple) compose file seems to be provided for ease of use but nothing is seemingly stopping you from running it with podman.

justsomehnguy | 6 hours ago

Compose there is only to build the image from the Dockerfile. Guess GP is too opinionated.

justsomehnguy | 6 hours ago

seedie | 6 hours ago

Is there a reason why `podman compose` doesn't work? Are there functional differences?

yuzzuwo | 6 hours ago

does it clean up old tags

[OP] dellarb | 10 minutes ago

Not automatically but if you visit the web interface you can log in as the push user and delete any tag/repo you like. Just make sure to schedule garbage collection in settings.

jamesmstone | 5 hours ago

I have always thought it should be possible to put an OCI image on a static webhost, but never looked in to it. ie if you put the right files on gihub pages, s3 or similar you could in theory `docker pull` from it. So I am a fan of simple OCI image registry options

vasiliyasp | 3 hours ago

Am I right that this is a normal Docker registry from the client’s point of view, right? So after docker login registry:5000 -u push I can push/pull exactly like with Docker Hub, and the only special part is the two-account setup on the server side?

[OP] dellarb | 11 minutes ago

Yes 100%. It is just the https://hub.docker.com/_/registry combined with nginx and config/UI so 100% compatible with regular docker push pull like hub once you've done the local login.

Only note is docker likes https so if not putting behind a https reverse proxy you will need to set up per insecure-registries in your client.

meander_water | 2 hours ago

Why not just use the official docker registry image? -https://hub.docker.com/_/registry

  $ docker run -d -p 5000:5000 --restart always --name registry registry:3

gonzalohm | 2 hours ago

I think op is bothered because that just has CLI support. Nowadays everyone is trying to build their own vibe coding it. Which is cool, but shouldn't be shared publicly as a product

spwa4 | an hour ago

If you mean inside a company ...

1) tough to configure and make user accounts on, never mind using centralized auth for a large team

2) doesn't support security policies or fine grained access control (no-one outside core IT has access to models of type blah ...)

3) you want 3 things: docker images, VM images (including proprietary software images) and linux package mirrors (that ideally auto-update), python/ruby/even perl package mirrors. Hell now even mirrors of github projects. This gets you one of those.

4) no web-UI (kind of, there is registry-ui, but it sucks)

5) you want it multi-tenant. So the marketing department can have one set of images, and the telecom department can have another, and IT ... you see where this is going

6) you want this as part of a cluster so everything is very fast, always, everywhere

Now, there is no software that actually has these features, but Nexus and Artifactory have built up a following. They suck, frankly, and don't have these features you want.

[OP] dellarb | 13 minutes ago

Mostly because setting up users and cleaning up images required extensive command line - the https://hub.docker.com/_/registry is the exact server in here just packaged with nginx and some config to allow easier password setup and a basic UI for container management.