Live data from Hacker News

Rootless Docker in a multi-user environment

cmtops.dev

21–30 of 50 posts

Re: Rootless Docker in a multi-user environment

#21
post #11
post #3

I wonder why people aren't using Singularity containers instead which seem to be rootless by design.

Oh man, Singularity… I once wrote: “In the shipping container analogy, you can think about Singularty containers as if they have no walls.” [1] [1] https://sarusso.github.io/blog/container-engines-runtimes-or...

I think singularity is about keeping program dependencies together, not isolation.

Re: Rootless Docker in a multi-user environment

#22

I still don't get why multi user. I haven't seen a multi user scenario that makes any sense for any Linux deploy in ages. Is this a shared prod server? Is it a shared Dev server? Why would those be multi user? For prod, why isnt it cattle where you don't ever SSH onto the server? For Dev if you can't just run it all on your local machine why not do something like shipyard.build Somebody tell me what im missing.

>> Why would those be multi user? For prod, why isnt it cattle where you don't ever SSH onto the server? I hate the cattle not pets analogy, do you know how well taken care of most cattle are? If your operating at google/fb/apple scale then yes you can have this approach. There are lots of business that DON't need, want or have to scale to this level. There are lots of systems where this approach breaks down. Docker…

The "it only happens here" bugs are a symptom of mutable infrastructure.

Re: Rootless Docker in a multi-user environment

#23
Site is down? I am getting a connection refused..

Anyway, surprised that so many comments wonder about the usefulness of docker rootless in a shared environment. It is my main approach for separation of concerns in my homelab. I always use docker rootless to share resources with many isolated apps. I wrote a blog post about how to host Mastodon with docker rootless [1].

[1]: https://du.nkel.dev/blog/2023-12-12_mastodon-docker-rootless...

Re: Rootless Docker in a multi-user environment

#24
This is a lot of work for something that works out of the box with Podman. Of course, using Podman introduces its own idiosyncrasies, and as someone else noted, the benefit of the approach in the article is that all users share an image cache.

Source: I use Podman on a workstation where I SSH in as a bunch of different non-root users, and I've never had to think about it working.

Re: Rootless Docker in a multi-user environment

#25
post #14
post #2

How well does rootless docker work compared to rootless podman?

If it works as I understood, in this setup I can see an advantage at an architectural level: in Podman containers images are stored on a per-user basis, while in this setup they would be shared between users, thus using much less disk space (if using the same base images). Besides this, I actually have the same question.

No both use the exact same techniques to achieve so called "rootless" which is generally considered to be insecure.

Rootless docker stores images for the user executing it and that is all, same as podman.

Re: Rootless Docker in a multi-user environment

#26

Site is down? I am getting a connection refused.. Anyway, surprised that so many comments wonder about the usefulness of docker rootless in a shared environment. It is my main approach for separation of concerns in my homelab. I always use docker rootless to share resources with many isolated apps. I wrote a blog post about how to host Mastodon with docker rootless [1]. [1]: https://du.nkel.dev/blog/2023-12-12_mastod…

Possibly, the web server was down due to a large number of requests. I have a lot of stuff on the server running in containers, but limited my httpd instance to 1 CPU core and 1 GB of RAM. Better upgrade it, I guess.

Re: Rootless Docker in a multi-user environment

#27

I still don't get why multi user. I haven't seen a multi user scenario that makes any sense for any Linux deploy in ages. Is this a shared prod server? Is it a shared Dev server? Why would those be multi user? For prod, why isnt it cattle where you don't ever SSH onto the server? For Dev if you can't just run it all on your local machine why not do something like shipyard.build Somebody tell me what im missing.

We have over a dozen of production servers. Both our DevOps engineers and developers have access to these servers in case something needs to be fixed or configured.

Re: Rootless Docker in a multi-user environment

#28

I still don't get why multi user. I haven't seen a multi user scenario that makes any sense for any Linux deploy in ages. Is this a shared prod server? Is it a shared Dev server? Why would those be multi user? For prod, why isnt it cattle where you don't ever SSH onto the server? For Dev if you can't just run it all on your local machine why not do something like shipyard.build Somebody tell me what im missing.

Shared webhosting is still done with multi users.

Re: Rootless Docker in a multi-user environment

#29
post #24

This is a lot of work for something that works out of the box with Podman. Of course, using Podman introduces its own idiosyncrasies, and as someone else noted, the benefit of the approach in the article is that all users share an image cache. Source: I use Podman on a workstation where I SSH in as a bunch of different non-root users, and I've never had to think about it working.

I've used rootless podman for development for several months now.

I had a few issues in the beginning, but in the end the solutions were rather trivial. I had to:

- Delete config files from previous podman versions (pre 4)

- Enable the docker socket (for my user)

- Use docker compose 2 rather than "podman compose" or an older docker compose (shipped with the distro)

We mostly use docker-compose files for our dev setups, so I can't say if I'd run into issues with more elaborate setups. But I must say that it works extremely well for me.

Re: Rootless Docker in a multi-user environment

#30
post #24

This is a lot of work for something that works out of the box with Podman. Of course, using Podman introduces its own idiosyncrasies, and as someone else noted, the benefit of the approach in the article is that all users share an image cache. Source: I use Podman on a workstation where I SSH in as a bunch of different non-root users, and I've never had to think about it working.

You are absolutely right.

However, if your company has already highly invested into using Docker, the fact of something working OOTB in any other piece of software doesn't convince to make a decision to switch.

On top of that, our DevOps team is pretty happy with Docker :)

Post reply on HN