this post was submitted on 10 Nov 2024
40 points (91.7% liked)

Selfhosted

40670 readers
586 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Thanks for all the great replies!

top 19 comments
sorted by: hot top controversial new old
[–] just_another_person@lemmy.world 28 points 1 month ago (2 children)

Retag and push to a local registry. Lots of options out there for setting one up.

Honestly, you already have the image locally if you've pulled it. You don't really need to run a registry unless you're dead set on it. You can also flatten and export containers for backup if you really want.

[–] thirdBreakfast@lemmy.world 16 points 1 month ago (1 children)

Two good points here OP. Type docker image ls to see all the images you currently have locally - you'll possibly be surprised how many. All the ones tagged <none> are old versions.

If you're already using github, it includes an package repository you could push retagged images to, or for more self-hosty, a local instance of Forgejo would be a good option.

[–] foster@lemmy.fosterhangdaan.com 9 points 1 month ago

I'd also like to add that you can save an image to a local file using docker image save and load them back using docker image load. So, along with the options mentioned above, you have plenty of options to backup images for offline use.

[–] rikudou@lemmings.world 6 points 1 month ago (2 children)

Honestly, you already have the image locally if you've pulled it.

I guess not everyone treats their PC as an ephemeral storage, huh? I don't trust anything that's available only locally to survive.

[–] just_another_person@lemmy.world 6 points 1 month ago

Well the question is about a container disappearing from a public registry, in which case nothing would happen if it's already pulled locally. Figuring where to go from there is the other half of that problem.

[–] GBU_28@lemm.ee 1 points 1 month ago

Then backup whatever you set your docker local storage to?

[–] Lem453@lemmy.ca 11 points 1 month ago

The vast majority of selfhosters probably don't but if you want its called a private repository

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-20-04

[–] timbuck2themoon@sh.itjust.works 4 points 1 month ago (1 children)

Just use a sonatype nexus 3 image and proxy docker hub, etc. Then you pull images through it.

[–] precarious_primes@lemmy.ml 3 points 1 month ago

We run this at work so we have forever copies of image tags and to reduce dockerhub rate limit issues. Works well even for a large dev team.

[–] Deckweiss@lemmy.world 4 points 1 month ago* (last edited 1 month ago)
[–] DasFaultier@sh.itjust.works 3 points 1 month ago

At my job, we run goharbor.io and use its Replications feature to do just that.

[–] scrubbles@poptalk.scrubbles.tech 3 points 1 month ago* (last edited 1 month ago) (2 children)

For most of you suggesting hosting a repository - yes but,

Host forgejo. Just host the git mirror. It comes with a package repo out of the box. Then you have the source code and the docker images

[–] rearview@lemmy.zip 2 points 1 month ago (1 children)

An alternative method is to run an actions workflow that syncs from upstream images directly, like what Forgejo actually do.

https://code.forgejo.org/forgejo/oci-mirror

oh freaking awesome, this looks amazing! Thank you so much for this!

[–] DieserTypMatthias@lemmy.ml 1 points 1 month ago

Host forgejo.

Or Gitea if you want to run the upstream.

[–] ShortN0te@lemmy.ml 2 points 1 month ago

I mean you have the current image cached on the local server when you use it.

[–] hyperreal@lemmy.hyperreal.coffee 2 points 1 month ago (1 children)

I don't know if this will help you, but I wrote a tutorial on how to setup a local registry on the LAN on a Fedora Server or RHEL-compatible server. https://techne.hyperreal.coffee/tutorials/setup-a-lan-container-registry-with-podman-and-self-signed-certs/

But anyway, it's unlikely docker.io or quay.io or ghcr.io will go completely offline. If anything they might experience a DDoS, in which case I imagine they have competent devops employees who would ensure they become functional again within a matter of hours.

[–] ComradeMiao@lemmy.world 1 points 1 month ago

Very interesting thanks!

[–] undefined@lemmy.hogru.ch 0 points 1 month ago

Isn’t a Docker registry just HTTP? Would a caching proxy be too hard to use for this?