5 ms·
Running our Docker registry on-prem with Harbor
- AtomicOrbital 1y agoharbor is great ... simple to install ... it's the only container registry I ever use
- fuomag9 1y agoAnd in my experience is the only one that has RBAC and can be deployed on premise and that actually works, I’ve tried everything at this point
- cyberpunk 1y ago? GitLab?
- fuomag9 1y agoIt doesn't make any sense to deploy a full gitlab just to get a docker registry. RBAC is also associated with repositories and users in a way that is unconventional to manage
- kirici 1y agoI am currently looking into zot, what were your blockers/hiccups with it?
- tetha 1y agoWhen we looked at modernizing our image hosting, it came down to Zot vs Harbor, and we preferred Zot as it looked easier to deploy. Just a go binary with a few environment variables connecting to our minio, what could be easier? However, when getting the config prod-ready, we started to trip over one thing after the other. First, my colleague was struggling to get the scale-out clustering to work in our container management. Right, use the other deployment way for HA. Then we found that apparently, if you enable OIDC, all other authentication methods get deactivated, so suddenly container hosts would have to login with tokens... somehow? And better hope your OIDC provider never goes down. And then we found a bug on top that Zot possibly doesn't remove blobs from minio during GC. At that point we reconsidered and went with Harbor.
- silverwind 1y agofor simple use cases, the official registry is good enough too
- hn_throw2025 1y agoIf you use paid S3 as the storage layer, then you want to control size. With the self hosted official registry, the stop-GC-restart process is a PITA.
- qmarchi 1y agoWould be interested to see a cost breakdown for the ECR vs S3 and compute cost.
- dwedge 1y agoUnless I totally misread it, it's their own S3 cluster
- nickjj 1y agoECR is kind of hard to beat if you're ok with being in the cloud. The last time I used it earlier this year for a company already on AWS, it was ~$3 / month per region to store 8 private repos and it was really painless to have a flexible and automated life cycle policy that deleted old image tags. It supports cross region replication too. All of that comes without maintenance or compute costs and if you're already familiar with Terraform, etc. you can automate all of that in a few hours of dev time.
- benterix 1y agoIt depends where the the compute resources using these images are located.
- fastest963 1y agoWhy does the Harbor VM need 32 cores and 64GB of RAM? Especially if it's only serving 32,000 pulls over 2 months.
- 01HNNWZ0MV43FF 1y agoI want something like "This could have been an email" but "This could have been a Caddy instance and static files" Hell Git doesn't even need the Git protocol if you do `update-server-info`
- arccy 1y agoIt's certainly possible with s3, so probably for any other static host https://news.ycombinator.com/item?id=40942732 https://news.ycombinator.com/item?id=40942732
- mcpherrinm 1y agoIt does seem mostly possible to host a Docker registry with static files and a bit of config: https://github.com/jpetazzo/registrish https://github.com/jpetazzo/registrish I haven’t tried running this yet, but it seems worth keeping in mind. It’s relatively simple software so the idea could probably be pretty easily adapted to other situations.
- adolph 1y agoI recall mentioned here ttl.sh, which as I looked it up [0], uses through Docker a CNCF project called Distribution Registry [1] which implements the core container registry functions (and appears to have additional utility, like being a pull-through cache). 0. https://github.com/replicatedhq/ttl.sh/blob/main/registry/entrypoint.sh https://github.com/replicatedhq/ttl.sh/blob/main/registry/en... 1. https://distribution.github.io/distribution/ https://distribution.github.io/distribution/
- nodesocket 1y agoAgree that seems insanely inefficient. That's less than a pull a minute.
- 1y ago
- reilly3000 1y agoI would have expected that they also started saving on bandwidth, although they still have to pay for intra-regional transfer.
- easton 1y agoDo they? If all this is in their DC then it’s going over their wires, unless their colo provider somehow had visibility into their traffic (which I’d guess they don’t).
- E39M5S62 1y agoIt's in Deft's ORD and IAD data centers, using their network for ingress/egress. Still has to go over transit between those two locations.
- reactordev 1y agoBut that might be baked into their enterprise pricing. Since it’s still “within” Deft. Site to site is common.
- E39M5S62 1y agoIt's not within Deft because they rely on transit between ORD and IAD. That was the case a few years ago when I worked there, it's probably still the same.
- CBLT 1y agoI also run Harbor. I use the official Helm chart; it's a little jank, doesn't support a couple of things we want. It only works with one of ArgoCD/ExternalSecretsOperator, and it doesn't support Redis TLS. Contrary to the author of this post, we just run one (the "source of truth") and use caching proxies in other regions. Works fine for us.
- BlackjackCF 1y agoWhat’s jank about it?
- CBLT 1y agoI mentioned two things that were broken: 1. Doesn't work with ExternalSecretsOperator and ArgoCD, which I happen to use. This is because the author of the Harbor chart decided not to use k8s concepts like secretRef in a podTemplate. Instead, at Helm template time, it looks up the secret data and writes it into another secret, which is then included as a envFrom. This interacts poorly with ExternalSecretsOperator in general, because it breaks the lifecycle control that ESO has. It's completely broken with ArgoCD because ArgoCD disables secret lookups by charts for pretty valid security concerns. No other chart I've come across does secret lookups during helm template time. Even the helm docs tell you it's not correct. 2. Harbor requires redis, but the Helm chart doesn't correctly pipe in the connection configuration. Redis can't be behind TLS, or the chart won't work.
- dwroberts 1y agoYou could always put the helm chart in a Kustomize and change the things you don’t like. —-enable-helm isn't supported everywhere but Argo definitely allows it
- lijok 1y agoWe just went through this whole Kustomize shenanigan in our company. Seems completely asinine. Why not just fork the chart, fix it yourself?
- muhehe 1y agoThis looks nice. What would be good on-prem S3 companion for this? I know if minio but I think there was some recent drama about it (I don't know specifics, just a feeling)
- stephenlf 1y agoThe article mentions Pure Flashblade. Looks like dedicated hardware. https://www.purestorage.com/products/unstructured-data-storage/flashblade-s.html https://www.purestorage.com/products/unstructured-data-stora...
- redblueflame 1y agoIf you want to have replication built in, you can give https://garagehq.deuxfleurs.fr/ https://garagehq.deuxfleurs.fr/ a try
- denysvitali 1y agoI'm confused on why they decided to populate the cache by replicating the entirety of Docker Hub instead of using a sort of cache that gets populated on the first pull
- Loic 1y agoBecause they have money to burn?
- justincormack 1y agoThat was just confusing but it seems like it was 80 repos, all their stuff on Docker Hub not all of Docker Hub.
- lijok 1y agoWe self-host Harbor as well, it’s fairly painless. Has SSO out of the box, a Terraform provider that covers everything, and for the most part just works. The issues we’ve had so far: - No programmatic way to retrieve your token that’s required for ‘docker login’. So we had to create a robot account per user and pop their creds into our secrets store. - Migrating between sites by cloning the underlying S3 bucket and spinning up the new Harbor instance on top of it, does not work. Weird issues with dropping pulls. - RBAC goes down to project, not repository level, complicating some of our SDLC controls. - CSRF errors every time you try to do anything in the UI - Lenient API and lack of docs means things like setting up tag immutability rules via Terraform was a bit of a PITA to figure out the right syntax So some small issues, but definitely a great piece of software.
- delusional 1y agoWhat the upgrade story like? Their official website makes it sound like a pain (stopping the software, backing up the database, changing the settings syntax, running some installer). I would expect something built for kubernetes to just do the right thing on startup (such that upgrading is simply switching out the image).
- yorwba 1y agoI upgraded Harbor before, it was a pain. I think you're encouraged to use their official Helm chart and then it's supposed to be fairly seamless https://goharbor.io/docs/2.13.0/administration/upgrade/helm-upgrade/ https://goharbor.io/docs/2.13.0/administration/upgrade/helm-... but if your predecessor decided against that option, separately adjusting the configuration for all the moving pieces is fairly annoying. Also, I misconfigured something and ended having to read Harbor source code because the error messages weren't very helpful. Fortunately, I had the presence of mind to first practice on a secondary installation created from a backup. It's definitely not something where you can stop production, install the update, and expect it to come back up in working order.
- tedivm 1y agoThe lack of OIDC support for Harbor has been the biggest annoyance for me. I'd love to be able to push from Github Actions to Harbor without needing robot users.
- nickjj 1y ago> pulling and pushing our images over the internet dozens of times a day caused us to hit the contracted bandwidth limit with our datacenter provider Deft repeatedly I wonder what they were doing that resulted in blowing out their Docker layer cache on every pull and push. Normally only a layer diff would be sent over the wire, such as a code change that didn't change your dependencies.
- prmoustache 1y agoI'd rather have the agents prune their docker cache (or destroying and recreating agent) every night but it is not uncommon to see pipelines use the --no-cache option at every run to make sure they get the latest security updates.
- KronisLV 1y agoSo what are the thoughts of folks who have used Nexus and moved to Harbor? In my experience Nexus is a bit weird to administer and sometimes the Docker cleanup policies straight up don't work (junk left over in the blob stores even if you try to clean everything), but it also supports all sorts of other formats, such as repositories for Maven and NuGet. Kind of hungry in regards to resources, though.
- firesteelrain 1y agoWe run both Nexus and Harbor. I am about to dump Harbor because teams don’t use it and frankly Nexus provides the same functionality.
- mystifyingpoi 1y agoNexus can be flaky, but it's pretty universal as you say. Harbor is a hard sell for me, since generally in any organization you'll need non-OCI artifact storage at some point, and maintaining 2 tools is always a pain.
- phillebaba 1y agoI am not to familiar with Kamal but it seems possible to integrate it with my project Spegel to remove some of the load from upstream. Especially if they are running clusters of servers physically located close to each other they could avoid some of the replication complexity with multiple Harbor instances.
- o_m 1y agoNaive question: why not put the effort into building the RoR apps into a binary and run the all services with systemd? No need to deal with Docker and the entire ecosystem around it
- inglor_cz 1y agoWe run our own Docker registry on-prem with Harbor as well. One issue to solve is auto-deletion of old images, so that the storage does not swell. Any tips?
- mdaniel 1y agohttps://goharbor.io/docs/2.13.0/working-with-projects/working-with-images/create-tag-retention-rules/#how-tag-retention-rules-work https://goharbor.io/docs/2.13.0/working-with-projects/workin... seems like what you want, especially in combination with https://goharbor.io/docs/2.13.0/administration/garbage-collection/#schedule-garbage-collection https://goharbor.io/docs/2.13.0/administration/garbage-colle...
- tempest_ 1y agoWe run a docker registry on prem as a pull through cache (none of our containers are stored in there) to keep the rate limit reasonable. It is pretty easy to just run the basic registry for this purpose. We have a similar setup for NPM and Pypi on the same machine. It doesnt really need a lot of attention. Some upgrades every once and a while.
- branon 1y ago> our new on-premise registry This is incorrect, the word you are looking for here is "on-premises" - a "premise" is something entirely different.