this post was submitted on 08 Oct 2023
22 points (95.8% liked)
Self Hosted - Self-hosting your services.
11406 readers
2 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
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!
If you see a rule-breaker please DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes that's correct. And containers are not really portable in the way you described. They do have a mini OS in them but the state is not saved when they are "offline". So you can think of it as more of a template, called an image. You can save the image to a file, and move that to a new pc and load that back into Docker, but that's usually unnecessary. As long as you have Internet, you just need to know the name of the image and Docker will just download it if it doesn't already have it. For most popular programs, you'll find an image for it already created so just follow the instructions on what settings to use for things like volume mounts and environment variables. This configuration of variables can be saved into a Docker Compose file for easy reuse instead of typing really long command line to run your container. This Compose file is all you really need to move to the other PC and it'll just download your image and run everything as before.
Oh, that's even easier than I thought then :)
I've got a great internet connection, so as long as I save the Compose files, I can rebuild the image forever, barring changes to the program in the container then. Much easier :D