Post by @mcc@mastodon.social

mcc
@mcc @mastodon.social

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)

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

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)

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

And then what is the Linux distribution itself providing? I just need it to launch and supply kernel+systemd, right? (My VPSes are VERY low disk, low RAM— so I'd worry about all these docker images increasing that.) Wouldn't it make sense to use a distribution that does NOTHING else? Like… uh… examples Kagi gives are "CoreOS" and and something discontinued, and maybe Alpine, though I thought Alpine was about Musl. Assume I actively distrust Redhat. What's the *smallest* podman-host Linux? (3/3)

Replying to @mcc@mastodon.social
HeinousTugboat
@htugboat @mastodon.social

@mcc That's why I run proxmox on multiple devices.

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

Other, weirder questions:

- I keep hearing people complain about docker "only being able to inherit from one other" container specification. I was told tonight docker-compose.yaml comprises a "container" which can compose a number of "images" (make fun of me for not knowing these basic things if you wish; I learned Linux in 1998, and nothing changes that). What is the single-inheritance rule, if it's real, concerning? The container? Image specifications? Is podman different in this sense? (4/3)

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

- What the fuck is Oracle docs.oracle.com/en/operating-s trying to say in this screenshot?

- What does podman use instead of a docker-compose file? Does it just use docker-compose? This doc docs.podman.io/en/latest/markd says it has the option of using "podman-compose". If I Kagi for that, I get… that same link, the podman-compose manpage (the dash being only a manpage convention).

MUST I write YAML files? Terrifying. I need structural editors for LISP and YAML so I don't have to touch them directly (5/3)

Replying to @mcc@mastodon.social
Grant Gould
@nonnihil @hachyderm.io

@mcc If it helps at all, "all" valid json is valid yaml, so you can just json it if you speak json.

("all" except for some gross bugs in the spec)

mcc
@mcc @mastodon.social

@nonnihil I… I thought it was all valid JSON D:

Replying to @mcc@mastodon.social
lambdageek
@lambdageek @mastodon.social
Public en edited

@mcc this is the implementation github.com/containers/podman-c

When I've tried to use it, it had some rough edges around restarting containers, although maybe I was using it wrong

lambdageek
@lambdageek @mastodon.social

@mcc my takeaway was to just use docker-compose with podman

Replying to @mcc@mastodon.social
Byll
@bdod @social.seattle.wa.us

@mcc RE: the screenshot.

Docker runs a single docker server as root. That server runs your containers, and the docker cli talks to it through a socket. podman runs as your local user.

the security implications is that anyone who can run the docker cli has to be a member of the docker group, and they can run containers as root. so they could run a container that mounts your host filesystem and then do whatever.

chiphead
@BlaynePuklich @mastodon.social

@bdod @mcc i see that argument at times (docker vs podman), and if this is the case you already got bigger problems. they both have their places but they're different security models. both can suck if you make bad decisions, and both can be good if you don't. podman, just so you know, is from the Company you Distrust.

Replying to @mcc@mastodon.social
Bryan Redeagle :bc:
@bryanredeagle @beige.party

@mcc No worries. I can help. A container is basically a filesystem that gets mounted, and a program runs within it (like fancy chroot). Those saved filesystems are called images.

When a container image is built, you usually start with a base image (often based on an existing distro) and then change things as you need. However, containers use OverlayFS. So every change is a layer added to the previous layers.

And while making your image, you can mount other images, and either perform tasks or add files from it to your own.

Replying to @mcc@mastodon.social
lambdageek
@lambdageek @mastodon.social
Public en edited

@mcc re that oracle page: docker is systemd - there's a single all powerful process with a socket into which you shove commands. Podman is a pile of binaries and shell scripts and in fact you are allegedly able to run pods without having to be root.

Christopher E. Stith
@cestith @mastodon.social

@lambdageek @mcc we do this at $work for some things. We have different system users for different compose stacks so outside of the containers there's still separation of concerns for security and resource management purposes. It's more painful to do all that, but in some projects it's worth it.

mcc
@mcc @mastodon.social

@lambdageek by "docker is systemd" you mean "docker replaces systemd"?

Replying to @mcc@mastodon.social
Christina Richards
@cdrichards @mathstodon.xyz

@mcc it’s so Linux to solve a workload isolation problem with a novelty distro app store ecosystem

Replying to @mcc@mastodon.social
Bryan Redeagle :bc:
@bryanredeagle @beige.party

@mcc Now for the compose. Compose is a Docker thing. Podman can run docker-compose files using the podman-compose program (might need to install it separate) by going into the directory with the compose file and running:

podman-compose up

However, and this depends on how deep you want to get into it, Podman also has a feature called quadlets. With that, you can write container definitions using a systemd service file format and run them with systemctl.

mcc
@mcc @mastodon.social

@bryanredeagle I actually do rather like systemd. When they bother to write documentation at least

Replying to @mcc@mastodon.social
Bryan Redeagle :bc:
@bryanredeagle @beige.party

@mcc Oh man, my client did not load the whole test of the thread.

Docker runs as root. And a lot of containers run as root (unless the developers took care to fix that). Unless you understand and take a lot of precautions, there are ways for bad actors to get into containers and break out of them. It's a whole thing.

mcc
@mcc @mastodon.social

@bryanredeagle Other people are talking about something called "podman quadlets" which sound like they have a more sensible security model (although possibly they are harder to use?)

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

Somewhat distressed as my reason for even considering this was I was thinking "if I use docker/podman, I get nix/guix plus a security isolation layer!" and here I have many responses saying "do not use docker as a security isolation layer". Well wtf do I use if I want a security isolation layer then (6/3)

Replying to @mcc@mastodon.social
Joe Groff
@joe @f.duriansoftware.com

@mcc if you're already using guix/nix, then you don't necessarily need docker since `guix container` gives you the cgroups-level isolation. if that's not enough then there's also `guix vm` to summon a fully virtualized sub-system iirc

Replying to @mcc@mastodon.social
✧✦Catherine✦✧
@whitequark @treehouse.systems

@mcc you can actually use Nix with containers where it does isolation as well as package management for you, and it's a lot better than Docker

Replying to @mcc@mastodon.social
Bryan Redeagle :bc:
@bryanredeagle @beige.party

@mcc It's mostly because there are ways to break out of the container. You can protect against that by running the container as non-root, and/or run the user inside the container as non-root.

You can run into networking issues if you need a privileged port, though.

The real dream would be if Linux had BSD jails or Solaris zones.

Replying to @mcc@mastodon.social
chiphead
@BlaynePuklich @mastodon.social

@mcc air gap.

Replying to @mcc@mastodon.social
pun gent
@ieure @retro.social

@mcc I expect you have all the answers you need, but I actively run all three of Guix, Docker, and Podman and I would be happy to clarify if you have questions about any of them.

Replying to @mcc@mastodon.social
Matthew Miller
@mattdm @hachyderm.io
Public en edited

@mcc

If you like the systemd style of key/value unit files, this is a nice way to do things:

docs.podman.io/en/v5.0.1/markd

Most containers can run rootless with podman. I have Home Assistant set up this way on Fedora IoT, with the containers all in a `hass` account.

It's pretty slick — systemd and podman keep the containers running and up to date, including automatic roll-back on failed updates.

If you hate the systemd way of doing things... probably less what you want :)

Replying to @mcc@mastodon.social
fabiosantoscode
@fabiosantoscode @mastodon.social

@mcc if you have issues with docker-compose or there's something it can't do, you can switch to bash scripts. I suppose it's the same with podman.

I usually use bash scripts from the beginning because I don't want to learn another way of running containers and I don't like yaml.

The docker CLI is kind of intuitive, why must I learn another interface?

Replying to @mcc@mastodon.social

@mcc@mastodon.social Podman, last I checked, doesn't suppor docker-compose, which is why I don't personally use it despite some real technical advantages. They used to support a docker-compose-like implementation, but it's now unsupported as they're working on some new swoopy thing called ... Quadlets I think?

FWIW you can lint your YAML with yamllint: https://github.com/adrienverge/yamllint

Also, I suspect you know this by now but you need Linux for Docker because Docker is a specific Linux thing as it rests upon a Linux kernel feature (cgroups).

docker compose is my favorite way to configure and deploy self hosted apps. There are a number of grizzled sysadmins who will spew fire and brimstone at you if you mention docker. We're all supposed to suffer with using distro packages for everything. Great in principle, a nightmare in practice :(

Replying to @mcc@mastodon.social
Xavier
@Dodecahedrus @mastodon.social

@mcc you could use dhall lang (a configuration language) to generate the yaml. I don’t know if this fixes your issues with yaml and it’s another thing to learn. Maybe you can even find dhall modules for docker/podman that reduce the amount of work.

Replying to @mcc@mastodon.social
Antwan van Houdt
@jabwd @mastodon.social

@mcc with podman you can make use of systemd, the podlet cli tool can be used to comvert docker compose into systemd units (maybe you have an ksp for those:3?)

Replying to @mcc@mastodon.social

@mcc dockerfiles have a "FROM" statement which specifies the container to inherit from… but one can use multiple "FROM" statements in the same docker file, but only one of them is active at a single time. (so, one can swap the base container underneath during the container build, useful e.g. to first build an executable in a normal container, then base the final image upon the special "scratch", which is effectively empty)

Replying to @fogti@chaos.social

@mcc one can kinda merge multiple base images together, but it's ugly. (and doesn't make sense when they're multiple complete linux distros, etc.)

so this limitation is only about storage efficiency (because merging stuff from multiple images implies copying, whereas the layer to inherit from is shared / copy-on-write)

Replying to @mcc@mastodon.social
Ongion 🥚🐞
@Ongion @mendeddrum.org

@mcc bookmarking this post because I *also* have these (likely extremely basic) questions

Replying to @mcc@mastodon.social
cassie
@porglezomp @mastodon.social

@mcc images are built from “layers” of overlay filesystems. The way docker builds images is running imperative installs inside and then snapshotting the overlay filesystem to save it as a layer. The building process only supports running on top of existing layers, not using layers as mixins. This is relevant when dealing with “Dockerfile” / “Containerfile” building new images.

Replying to @mcc@mastodon.social
Inga stands with 🇺🇦 🇵🇸
@IngaLovinde @embracing.space
Public en edited

@mcc I'm not sure what complains are you referring to, exactly.
Docker images are defined by dockerfile, and typically each image (besides the most basic ones like "Debian" or "Alpine") is defined as "take that other image and do certain manipulations with it and store the result" (so you can have e.g. "mastodon server" image).
Docker compose file can define multiple containers and their interactions (e.g. "I want there to be a mastodon backend server to be running (from that image) and accepting requests at this external host:port, and I also want there to be postgres server to be running (from that other image) and have this host directory with this path be mounted in it under this path for storage; and also I want there to be a private network connecting mastodon server and postgres, with them having the following IP addresses there", something like that)

Replying to @mcc@mastodon.social
Osmose
@Osmose @digipres.club

@mcc I think we've used these "distroless" ones from Google at a few of my jobs: github.com/googlecontainertool

Replying to @mcc@mastodon.social
Erik
@edebill @wandering.shop

@mcc we used to use Alpine as a base for docker images. I ended up hating it because they removed slightly older packages, so our Dockerfiles would no longer work. This was not a security thing. They just seemed to have a policy of removing the old one from the repo when a new one came along.

mcc
@mcc @mastodon.social

@edebill What did you use to host the alpine images? Another alpine?

Replying to @mcc@mastodon.social
Erik
@edebill @wandering.shop

@mcc we were deploying to kubernetes. Totally dissimilar to what you’re looking to do. What got me was not being able to repeatably rebuild the image (we would bake in our app, but needed the base image to start from). If you based your host on alpine, you could just plan on not being able to rebuild it without much futzing.

mcc
@mcc @mastodon.social

@edebill not being able to rebuild without futzing is scary because isn't a rebuild a prerequisite for incorporating security updates?

Replying to @mcc@mastodon.social
Noisytoot
@noisytoot @berkeley.edu.pl
@mcc musl is smaller than glibc so alpine would be a good choice I think (although maybe not if you want systemd)
mcc
@mcc @mastodon.social

@noisytoot I mean I *think* I want systemd, but the docker advocate I was talking to tonight seemed to be trying to convince me docker *replaces* systemd? I no longer configure, start or stop systemd services, just docker images with services inside them? Is that false?

I'm torn because systemd is known to incorporate AI slop, but I would go to considerable lengths to avoid interacting with openrc

Replying to @mcc@mastodon.social
queerinmech
@qim @mas.to

@mcc correct, Linux just supplies the kernel upon which containers are built

a lot of container strategies really do pretty much use the host as a hypervisor

Alpine is used because it is very small and efficient to support single applications, most constantly updated distros just do not have such a small install size

Replying to @mcc@mastodon.social
Joe Groff
@joe @f.duriansoftware.com

@mcc you probably don't trust Apple either, but our containerization thing has its own minimal init that runs in the base linux vm and sets things up for the OCI image to be able to start github.com/apple/containerizat

mcc
@mcc @mastodon.social

@joe *rubbing eyes* this is *Linux* containerization?

Does it work on Apple Silicon? Does it require Apple Silicon?

I have two problems I'm trying to solve. A short term problem is that my VPSes are falling apart and I need some sort of plan that allows me to back them up and migrate them non-awkwardly. A long term problem is I want to move off dependence from actors (IBM, Apple) I have reason to believe are using "AI code assistants".

Replying to @mcc@mastodon.social
Joe Groff
@joe @f.duriansoftware.com

@mcc yeah, this is so you can run a Docker-style container inside of a VM on macos. while the host side of things is obviously gonna be mac and apple silicon specific, i don't think the init implementation itself needs to do much that's nonportable. apple stuff is not going to get you away from AI nonsense alas, but i thought it was interesting as an example of how minimal the glue between kernel and OCI can potentially be

mcc
@mcc @mastodon.social

@joe That *is* interesting. To be clear, is it possible to run this *WITHOUT* MacOS? Is OpenDarwin still a going concern?

Replying to @mcc@mastodon.social
veetee
@vt52 @ioc.exchange

@mcc I've been hearing interesting things about IncusOS, but sadly haven't had time to sit down with it... maybe over the holiday...

linuxcontainers.org/incus-os/i

Replying to @mcc@mastodon.social
Matthew Miller
@mattdm @hachyderm.io

@mcc

Also, if I were starting from scratch, I'd probably try Amutable as the base OS. amutable.com/foundations#os

(But also having started with Linux in the 90s, I'm not sure I could adjust to not sshing in to do things.)

Replying to @mattdm@hachyderm.io
mcc
@mcc @mastodon.social

@mattdm "can't ssh in" is kind of a no-go for me, depending on what that means. i routinely edit html files in vim…?

Replying to @mcc@mastodon.social
Scott Francis
@darkuncle @infosec.exchange

@mcc @mattdm immutable infrastructure + NFS; the old ways are still good ways

Replying to @mcc@mastodon.social
Inga stands with 🇺🇦 🇵🇸
@IngaLovinde @embracing.space

@mcc Alpine is general purpose Linux but it's really small, IIRC the entire system with all the installed packages takes like 4GB on my desktop (and this includes things like Firefox, Chromium, Thunderbird, VSCodium, LibreOffice etc)

Replying to @mcc@mastodon.social
Teoh Han Hui
@teohhanhui @mastodon.social
Public en edited
Replying to @mcc@mastodon.social
scrottie (he/him/them)
@scrottie @bsd.network

@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.

Replying to @scrottie@bsd.network
mcc
@mcc @mastodon.social

@scrottie "Developing inside of a container is kinda odd"

Don't know where else I'd do it

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

@scrottie Wait, so if the container doesn't have persistent storage, where do logs go?

Replying to @mcc@mastodon.social
scrottie (he/him/them)
@scrottie @bsd.network

@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...

Replying to @scrottie@bsd.network
mcc
@mcc @mastodon.social

@scrottie Thank you for explaining.

Replying to @mcc@mastodon.social

@mcc I run containers for all my deployments (podman). Usually one per service. The more complicated ones sometimes need multiple, which I run in a pod (a bundle of containers that see each other in the same localhost). It is rare, but for some services I do run an extra nginx that puts things together and is a container of itself.

As for the last question, avoid tooling as much as possible inside containers. Tooling for you is tooling for the attackers.

Replying to @categulario@mstdn.mx
mcc
@mcc @mastodon.social

@categulario What if I put the tooling inside its own container and therefore the attackers can't use it because they're not in that container

Replying to @mcc@mastodon.social

@mcc yea, possible, then to actually use it you would plug another container's volume(s) into that one to use. Not very ergonomic but sometimes useful.

I do that sometimes, I created an image that has my tools and setup, but it is seldom used in practice.

Replying to @mcc@mastodon.social
Just a trash panda 🦝
@trashpanda @m.alittlenook.net

@mcc One reason to keep separate VPSes is that Docker is not really meant to be used as a security boundary. Containers all share the same copy of the kernel, so if you can exploit the kernel, you can escape the container.

mcc
@mcc @mastodon.social

@trashpanda I want a security boundary. What would you suggest as a security boundary?

Replying to @mcc@mastodon.social
Just a trash panda 🦝
@trashpanda @m.alittlenook.net

@mcc I don't know that I have a good answer to that besides a VPS unfortunately. Which isn't to say that a better answer isn't out there, just that I don't know one (and I am far far from an expert on docker).

Replying to @mcc@mastodon.social
Jason Petersen (he)
@jason @logoff.website

@mcc I’m not a security person but I’ve seen a lot of people who will use “Docker as a security layer” as meme text over something going horribly wrong.

Replying to @jason@logoff.website
mcc
@mcc @mastodon.social

@jason Would you say that docker/podman as a security layer is better than *no* security layer?

Is there a different security layer which is superior for isolation between Linux services?

Replying to @mcc@mastodon.social
Jason Petersen (he)
@jason @logoff.website

@mcc they’d all probably say “a VM”. I do not agree with them, because I am not a “security person”.

Replying to @mcc@mastodon.social
Xavier
@Dodecahedrus @mastodon.social

@mcc @jason one big difference is podman allows you to easily run rootless. I would say root docker is worse as a security layer than the other options without root.

Replying to @mcc@mastodon.social
mhoye
@mhoye @cosocial.ca

@mcc The thing that gets me is... you don't.

Service instances don't need 'linux', they need a rigorously pruned system that effectively cuts the whole system down to a core microkernel that only supports what the service needs and precisely nothing else.

It's the human experimenting with new ideas that needs the flexibility and extended software ecosystem that makes up linux. And somehow the Linux kernel and the most important project in the linux userspace have stopped believing that.

Replying to @mhoye@cosocial.ca
mcc
@mcc @mastodon.social

@mhoye Well, I need a distribution. I'm not making my own distribution, and if I am it's going to be a distribution of Redox or something greenfield. Do you hvae have a suggestion for a "rigorously pruned system", or are you bemoaning that none currently exists you find adequate?

Replying to @mcc@mastodon.social
Rachael L
@r343l @freeradical.zone

@mcc @mhoye Wait, are their docker / podman / whatever images that run that aren’t some kind of (possibly stripped down) posix-ish system? Basically the most stripped down containerized thing I’ve experienced is alpine which is still Just Linux albeit one that by default does NOT come “batteries included” so to speak.

mcc
@mcc @mastodon.social

@r343l @mhoye I've been informed elsewhere in this thread that FreeBSD can host Docker Linux images; I don't know how this works. Windows can host Docker images but it does it by putting them inside WSL. When I say "if I'm making a distribution, it's Redox", I mean something like "I'm saying screw all this Linux/Podman/Docker nonsense and writing my own web server, and maybe using L4 as a hypervisor just for the hell of it"

Replying to @mcc@mastodon.social
Rachael L
@r343l @freeradical.zone

@mcc @mhoye Yeah I just mean I am confused by the thread because I thought podman/docker while notionally CAN “run” arbitrary images they in practice are all posixish. But there’s no particular need to run said arbitrary images using podman/docker unless that’s what convenient (since hypervisor is not as available or easy for most folks? or is that just ubiquity of docker talking?)

mcc
@mcc @mastodon.social

@r343l @mhoye I am not aware of docker or podman being able to host anything which is not literally Linux. The most exotic thing I've seen it suggested can be hosted inside is Alpine. And no one has yet answered my question about whether Alpine can host non-Alpine images or vice versa. Probably MHoye knows more than I do, but if you think there are non-Linux docker containers, I'd ask what gave you that impression.

Replying to @mcc@mastodon.social
Peter Griess
@pgriess @mastodon.social
Public en edited

@mcc @r343l @mhoye To a first approximation a Docker image is mostly a tarball filesystem and an entry point (path to binary to run as effectively PID 1). My guess is that it is possible to expand the tar in a jail and use FreeBSD’s Linux ABI compat layer to run the entry point.

Nicolás Alvarez
@nicolas17 @treehouse.systems

@r343l @mcc @mhoye as an example, a statically-linked Go application could run in a docker image that has literally nothing else in it, not even libc

mhoye
@mhoye @cosocial.ca

@nicolas17 @r343l @mcc

... is that not true of any statically linked application?

Replying to @mcc@mastodon.social
mhoye
@mhoye @cosocial.ca

@mcc I wrote this a while back, which may be on point: exple.tive.org/blarg/2025/06/0 - but I think there's a step past that hasn't been implemented, that amounts to preemptively inventorying the system calls a container _can_ make and providing that inventory to a kernel and userspace compilation. "Provide this and nothing else and if the container asks for anything else, die immediately."

Replying to @mcc@mastodon.social
Omer Preminger
@io @mstdn.omer.land

@mcc @mhoye I can't vouch for this but someone mentioned it to me recently and I think it might fit the bill for what you're looking for...? bottlerocket.dev/

Replying to @mcc@mastodon.social

@mcc to add a different perspective on the security part: Once you have a container image you have a snapshot of all the vulnerabilities available to the software it is running (base distro, runtime).

Replying to @categulario@mstdn.mx
mcc
@mcc @mastodon.social

@categulario but… i can upgrade the image

Replying to @mcc@mastodon.social

@mcc of course! just something else to take into account, because when the things ran on the OS you just upgrade the OS, but now you re-build and re-deploy every image

Replying to @categulario@mstdn.mx
mcc
@mcc @mastodon.social

@categulario That makes it sound like I don't want Docker. I want to be able to apt-get upgrade or something like it and just have all the software update.

Replying to @mcc@mastodon.social
Just a trash panda 🦝
@trashpanda @m.alittlenook.net
Unlisted en edited

@mcc @categulario I think that docker asks one to take on a different way of looking at things than just using a VPS. I've heard it described as pet vs livestock. Containers are destroyed and rebuilt frequently, and images/containers should be built to accommodate that. Anything persistent should be in a volume.

Replying to @mcc@mastodon.social

@mcc yeah no, not a chance. I think there is discussion about other technologies that solve this problem. For me the reason to use containers is not security but to have an environment packed in an immutable box that I can move around. Because some of the applications that I deploy depend on stuff that is otherwise annoying to setup every time. So having a stable runtime from an image is useful, but not inherently more secure, although it is possible to gain better isolation.

Replying to @mcc@mastodon.social
beaiouns :verified:
@beaiouns @is.nota.live

@mcc@mastodon.socbo

I'm having fun reading all of these replies

I'm hesitant to throw my own experiences in here because it'll probably be ripped to shreds, but here goes

So basically I use docker or podman in place of virtual machines sometimes, because instead of virtualizing the whole machine it just virtualizes enough to run whatever app I'm trying to run. But it still uses the same kernel and everything as the host distro

So like I use distrobox to spin up a podman for fedora on my bare metal alpine install, but half the startup shit doesn't work right because alpine doesn't use systemd. So I have to close my eyes to ignore those errors and then use yum to install a bunch of GCC tools or whatever, and then delete the container when I actually break something

IIRC a big practical difference between docker and podman is you can run rootless podman pretty easily, where rootless docker is not the default and slightly more difficult. Also with podman you have to ignore all the "PODMAN IS NOT DOCKER" warnings in the readme files and install the containers manually instead of whatever docker-compose and podman-compose do

Also the whole podman vs docker debate seems to largely boil down to which base distro you're using, I forget who loves what but I think there's money involved. Like one distro helps develop docker and one distro ships podman by default out of spite, I forget most of the specifics tho

Hope this helps! I'm probably repeating a lot of other replies but maybe the context is useful

Replying to @mcc@mastodon.social
DNA schedule
@ryanprior @mastodon.social

@mcc I have a fennel lisp replacement for docker-compose yaml :3 if that would be useful for you, it might motivate me to finish it & release it (it's in rough form, just complete enough for one of my private use cases)

mcc
@mcc @mastodon.social

@ryanprior hmm… with no offense meant, the reason I mention yaml and lisp together at the end of the thread is they are two things I hate writing

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

@ryanprior like if I'm willing to write lisp why am I not just using Guix?

Replying to @mcc@mastodon.social
DNA schedule
@ryanprior @mastodon.social

@mcc no offense taken! I think I now remember you writing previously that you enjoy writing lisp implementations, but otherwise don't actually like lisp. I have you tagged in my head as a "lisp lady" but that's really only kinda glancingly true, huh.

Replying to @mcc@mastodon.social

@mcc@mastodon.social Sorry to be the bearer of bad news, but both Docker and Podman accept LLM contributions.

https://github.com/moby/.github/blob/main/AI_POLICY.md (Moby is the "open core" of docker)

https://github.com/podman-container-tools/podman/blob/main/AGENTS.md

Replying to @emmy@transfem.social
mcc
@mcc @mastodon.social

@emmy thanks, but until i can get out of linux, i expect i am going to be having this problem. i'd like to get out of linux as quickly as possible, but that may not be very quick, and in the meantime i have security concerns about my 15-year-old deployments [which got by fine without AI for 15 years, but then LKML decided AI must be added] :(

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

@emmy put a different way, can you recommend a container solution which does *not* have this defect?

Replying to @mcc@mastodon.social
Jacques Chester
@jacques @mastodon.chester.id.au

@mcc your suffering is righteous

In terms of trivia, they “need” Linux because containers were first implemented by stapling together a variety of Linux kernel subsystems to behave like a single concept. Think chroot for fs and similar stuff for process table, memory/CPU quotas etc. I used to joke that container launching is “fork() in a frock”.

(Naturally there are much better predecessors, eg Solaris zones, but Linux Linux Linux)

Replying to @mcc@mastodon.social
Marcos Dione
@mdione @en.osm.town

@mcc I sincerely don't want to mansplain anything here, but reading your concerns I will pick them up and try to answer them. Fell free to mute me.

And I will start with a question for you:

> Why the fuck do I need Linux if I have docker?

Do you mean outside or inside the container? And in the case of outside, do you mean just the kernel (as opposed to a *BSD or MacOS), or the GNU/Linux[1] concoction?

[1] No, I'm no longer a RMS fan, but in this case it's relevant.

1/

Replying to @mdione@en.osm.town
Marcos Dione
@mdione @en.osm.town

@mcc

> Could vim, and man, and gcc, be a container?

> What if I put the tooling inside its own container and therefore the attackers can't use it because they're not in that container

Yes, but you will have to (ab)use volumes a lot to make everything useful. And unless you count container breaches, the host OS is almost as unreachable as a sibling container.

2/

Replying to @mdione@en.osm.town
Marcos Dione
@mdione @en.osm.town

@mcc

> what is the Linux distribution itself providing?

Depending on the distro, security fixes, as opposed to new releases with new (and possibly buggy) features.

> I'd worry about all these docker images increasing that

yeap, each docker image is basically pulling all the basic libraries again and again: libc/musl, libssl, libz, etc. And depending on how those images are built, with different versions and different security update policies.

3/

Replying to @mdione@en.osm.town
Marcos Dione
@mdione @en.osm.town

@mcc

> docker *replaces* systemd? I no longer configure, start or stop systemd services, just docker images with services inside them?

Kinda. It's like using pip instead of apt. Docker will remember the container s it has running and would restart them on a reboot. I'm not 100% sure it has the same level of service lifecycle handling as systemd (f.i., restart on failure, unless it keeps crashing at boot, etc).

4/

Replying to @mdione@en.osm.town
Marcos Dione
@mdione @en.osm.town

@mcc

> "can't ssh in" is kind of a no-go for me, depending on what that means. i routinely edit html files in vim…?

You don't really run ssh in the containers; the idea is that they're single processes. If you want a whole GNU/SystemD/Linux system, then Incus (as suggested elsewhere) is the only one I used (besides full VMs) that does it.

5/