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:
Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
No spam posting.
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.
Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
It’s not NAS specific, it’s platform independent - that’s the whole point. You have an application you want to run, and you package it all up into a docker image which contains not only the application but it’s dependencies and their dependencies all the way down to the OS. That way you don’t need to worry about installing things (because the container already has the application installed), all you have to do is allocate some resources to the container and it’s guaranteed* to work
*nothing is ever as simple as it first appears
One area where this is really helpful is in horizontally scaling workloads like web servers. If you get a bunch more traffic, you just spin up a bunch more containers from your server image on whatever hardware you have laying around, and route some of the traffic to the new servers. All the servers are guaranteed to be the same so it doesn’t matter which one serves the request. This is the thing kubernetes is very good at.
Edit: see caveats below
Docker is not platform independent. The OS is not included in the image, and the executables in the image rely on the host system having a compatible kernel and system architecture. Only userspace components like software libraries and, unfortunately, CA certificates are included in the image.
It primarily supports x86_64 Linux systems. If you want to run on ARM, you need special images or you need a CPU emulator. If you want to run on Mac OS or Windows, you usually need a VM. There are Windows Docker containers, but Docker as a technology isn’t really applicable to Windows because of the dirty separation between userspace and the kernel (if you’ve ever tried to run Docker on Windows Server without Hyper-V support, this is why it’s so difficult to get it to work and it stops working after Windows updates).
This is true. However many big maintained public images are multi-arch so down for ARM, and the fact that Docker runs in a VM on Windows and OSX when you install it doesn’t matter to most people. On Linux indeed it reuses the host’s kernel (which is why containers can be a lot lighter than VMs)
Let me introduce you to
Docker buildx
, you don’t know her, she’s from Canada. But seriously, multi-platform images are a thing, and I need to figure out how to do themYou can create multi-platform images (actually manifests of single-platform images) without buildx, and buildx isn’t enough to create multiplatform images. In its default configuration, buildx can usually build images for different processor architectures but requires CPU emulation to do it. If the Dockerfile compiles code, it runs a compiler under emulation instead of cross compiling. To do it without CPU emulation involves configuring builders running on the other platforms and connecting to them over the network.
I don’t know if it supports building images for multiple operating systems, but it probably doesn’t matter. I’ve only ever seen container images for Linux and Windows, and it’s virtually impossible to write a single Dockerfile that works for both of those and produces a useful image. The multiplatform images that support Linux and Windows are probably always created using the manifest manipulation commands instead of buildx.