this post was submitted on 30 Jan 2026
67 points (97.2% liked)

Selfhosted

61416 readers
607 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] Onomatopoeia@lemmy.cafe 4 points 6 months ago (3 children)

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.

[–] surewhynotlem@lemmy.world 10 points 6 months 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 4 points 6 months 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.

[–] teawrecks@sopuli.xyz 4 points 6 months 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.