Thanks for all the great replies!
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.
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.
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.
The vast majority of selfhosters probably don’t but if you want its called a private repository
At my job, we run goharbor.io and use its Replications feature to do just that.
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
An alternative method is to run an actions workflow that syncs from upstream images directly, like what Forgejo actually do.
Just use a sonatype nexus 3 image and proxy docker hub, etc. Then you pull images through it.