Post by @scrottie@bsd.network
So I got today a pretty aggressive sell for moving all my online services to Docker [or podman, whatever, IDK]. Which is something I was already considering for security reasons, but it was argued to me some of the advantages of nix/guix I was interested in (clear separation of content, configuration, and software on my server, easy redeployment) I could get with just Docker.
Okay. Actually this all made sense. But now I have a question.
Why the fuck do I need Linux if I have docker? (1/3)
Put a different way, I've got a couple VPSes. I've got services/sites running on each one. Each is hard nailed to the VPS it's running on. In the docker/podman world I guess I'd have a container for each of my sites (hopefully I don't need an nginx for each site), and a container for mysql or something, and a container for the two non-apache app servers I run. That's… everything I do on the VPS, except log in and fuck around with vim. Could vim, and man, and gcc, be a container? (2/3)
@mcc Any Linuxy thing could be a container but it would probably make sense to just have vim etc be part of the build (Dockerfile) for all of your other containers. Developing inside of a container is kinda odd... you might mount a directory back to the host to contain the repo/code:
docker run -t -i --name=foo -v /home/mcc/project:/opt/app imagename /bin/bash
Otherwise the contents of containers is only kind of persistent. After you create the container, it'll have persistent storage until you rm it, so it's really easy to (intentionally or accidentally) delete a container's storage is more apt. So mapping a partition back to the host is a good idea for dev work.
@mcc Developing inside a container is fine. I just suggest mapping a directory back to the host so work doesn't accidentally get lost. There is persistent storage until you 'docker rm' the container, but it's easy to rm the wrong container if you're making lots. General use idiom is that creating and rm'ing containers is normal and common, so that makes storage data in containers dangerous. The running container creates another unionfs layer on top of the other layers the container is built from...