Not containers and data, but the images. The point would be reproducability in case a remote registry does not contain a certain image anymore. Do you do that and how?

    • Bakkoda@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      17 hours ago

      This is how i do it. I can delete everything, repull and redeploy like nothing ever happened.

      I have one exception and thats my calibre-web container. I have all my books backed up separately and I’ll be nuking that whole set up eventually.

    • Onomatopoeia@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      4
      ·
      23 hours ago

      Curious, have you tested rebuilding using this approach?

      It makes sense to me, if the compose files are up-to-date, it should just work.

      I’d only be concerned about ensuring I capture changes made to the container that happened after initial build.

      • teawrecks@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        I feel like if that’s something you’re doing, you’re using containers wrong. At least docker ones. I expect a container to have no state from run to run except what is written to mounted volumes. I should always be able to blow away my containers and images, and rebuild them from scratch. Afaik docker compose always implicitly runs with --rm for this reason.

      • surewhynotlem@lemmy.world
        link
        fedilink
        English
        arrow-up
        9
        ·
        18 hours ago

        That’s the secret. I never change the container.

        If you absolutely must do some config on the container, then have a container creation script that creates a new container with the right settings and use that.

        #pipelines

      • enchantedgoldapple@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        4
        ·
        23 hours ago

        I can attest to it. Lately my server needed to be repaired and got its entire disk wiped. Fortunately I managed to back up my compose files and bind mounts. After reinstalling the OS and transferring the backed up contents, I ran ‘docker compose up’ and eventually everything came back up exactly how they were when being backed up. Even the Postgres backup of Joplin was recovered purely from its bind mount.