bp99 lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ComradeMiao@lemmy.world to Selfhosted@lemmy.worldEnglish · 6 months ago

How to maintain a local repository of docker images in case they go offline?

message-square
message-square
12
link
fedilink
0
message-square

How to maintain a local repository of docker images in case they go offline?

ComradeMiao@lemmy.world to Selfhosted@lemmy.worldEnglish · 6 months ago
message-square
12
link
fedilink
alert-triangle
You must log in or register to comment.
  • Deckweiss@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    6 months ago

    Sorry for the link dump - I just glanced over the content and it seems like this might help you:

    https://www.warpbuild.com/blog/docker-mirror-setup

    https://medium.com/@shaikrish27/deploying-a-docker-registry-mirror-as-a-container-59565ff92c48

    https://blog.alexellis.io/how-to-configure-multiple-docker-registry-mirrors/

    https://stackoverflow.com/a/41593925

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

    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
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      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 Hangdaan@lemmy.fosterhangdaan.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 months 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_Sage@lemmings.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      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.

      • GBU_28@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 months ago

        Then backup whatever you set your docker local storage to?

      • just_another_person@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 months 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.

  • Lem453@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months 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

  • Cousin Mose@lemmy.hogru.ch
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

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

  • Scrubbles@poptalk.scrubbles.tech
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

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

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

  • timbuck2themoon@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

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

    • precarious_primes@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months 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.

Selfhosted@lemmy.world

selfhosted@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !selfhosted@lemmy.world

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:

  • selfh.st Newsletter and index of selfhosted software and apps
  • awesome-selfhosted software
  • awesome-sysadmin resources
  • Self-Hosted Podcast from Jupiter Broadcasting

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

Questions? DM the mods!

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 157 users / day
  • 433 users / week
  • 1.52K users / month
  • 3.21K users / 6 months
  • 0 local subscribers
  • 46.7K subscribers
  • 1.42K Posts
  • 17.6K Comments
  • Modlog
  • mods:
  • Ruud@lemmy.world
  • Loki@lemmy.world
  • CannaVet@lemmy.world
  • devve@lemmy.world
  • HybridSarcasm@lemmy.world
  • HybridSarcasm@lemmy.hybridsarcasm.xyz
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org