Question for #selfhosters, which one do you generally prefer and why?

A) Containerize the service with e.g. Docker

B) Run the service directly on the host machine

Reply to this note

Please Login to reply.

Discussion

All I'm saying is Direct-to-Video movies were always the best.

B.

Imho docker is a trap. It makes you think it simplifies things because the initial install is quick. But everything that comes next is unnecessarily complex.

I'm often suspicious of Docker. It seems we keep solving the "containerization" problem over and over with virtual machines, containers, etc., and this makes me think we're going about software in the wrong way.

I run everything in docker.

It simplifies dependencies, network security, and most importantly versioning.

imo docker and kubernetes are the only virtualization that still have a good reason to exist.

With docker + caddy (which itself is running in docker, with a docker plugin for automatic reverse proxy) I have six services running on one beefy server. Some of those services need a specific version of a database engine or node. It’s no issue with docker.

At some point one of those services will need to be moved to another server due to traffic demands. Thats easy with docker. (kubernetes would do this automatically, but i’m not there yet) I’ll move one folder with all the state and run docker compose on the new server and be done.

I wasn’t a believer until this year, but docker does indeed solve some problems, and it has been very helpful.

I wasn't really suggesting Docker shouldn't be used. More speculating that if the problem of containers were to be solved further up the stack Docker wouldn't even be necessary.

I didn’t think you were fren. I was just trying to add to the speculative thought from the other end. Playing devils advocate.

There are a number of things Id love to see different, but they’d be pretty big changes. Allowing multiple processes to bind to a port and listen for specific urls would be one. Reverse proxying is a whole layer of complexity that strictly speaking wouldn’t be necessary for some setups.

It depends on your context and project complexity...

If you can I would consider solution serverless compute and if that does not work for you then probably managed host that hosts container/microservice.

I prefer using containers and docker-compose to configure it all.

Dockerfiles and docker-compose.yml force me to document what I had to do to get something working.

I love docker-compose

Compose probably turned 3 hours of work setting up my relay to 20 minutes. dB, relay, proxy. Glue the stuff together and done!

I prefer containers and docker-compose too but switching now to K8s instead of the later

Going down the container route offers the ability to subsequently move the service around into different infrastructure .. especially attractive if you’re running virtualisation fabric like Proxmox

Containers for sure. I have limited server compute (read: one old laptop in a closet) at home and no time to think about how this or that might be affecting other stuff I run on the machine.

Containers 💯

Systemd init scripts and timers ftw. Because I know docker incurs overhead on networking and disk, so I like running lean and clean.

Yeah, this is kind of why I ask. People say there are overhead with the containers but how much of an overhead are there?