Thanks for all the great replies!

all 19 comments

sorted by: hot top controversial new old
[–] 28 points 2 years 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.

  • source
  • hideshow 4 child comments
  • [–] 16 points 2 years ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 2 years 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.

  • source
  • parent
  • [–] 6 points 2 years 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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 11 points 2 years 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

  • source
  • [–] 4 points 2 years ago (1 child)

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

  • source
  • hideshow 2 child comments
  • [–] 4 points 2 years ago*
    [–] 3 points 2 years ago

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

  • source
  • [–] 3 points 2 years ago* (last edited 2 years 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

  • source
  • hideshow 4 child comments
  • [–] 2 points 2 years ago

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

  • source
  • [–] 2 points 2 years ago (1 child)

    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.

  • source
  • hideshow 2 child comments
  • [–] 0 points 2 years ago

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

  • source