Podman v4.6 Introduces Podmansh: A Revolutionary Login Shell
blog.podman.io
blog.podman.io
> GNU Rush is a Restricted User Shell, designed for sites providing limited remote access to their resources, such as, for example, savannah.gnu.org. Its main program, rush, is configured as a user login shell for users that are allowed only remote access to the machine. Using a flexible configuration file, GNU Rush gives administrator complete control over the command lines that users execute, and allows to tune the usage of system resources, such as virtual memory, CPU time, etc. on a per-user basis.
> In particular, GNU Rush allows to run remote programs in a chrooted environment, which helps tighten security when offering access over such programs as sftp-server or scp, that access the entire file system by default.
Or e.g. change ssh config to use ForceCommand.
That said, the main benefit is not just that a shell gets a container but that you can easily compose this feature with the container / image ecosystem to deploy specialized shells. Perhaps even you don’t need a VM to service the request but rather a container orchestrator ..
Instead it’s a system replacement shell. Nothing to do with your running containers. Instead it seems to let you sandbox users on your VM/baremetal to a container.
Maybe someone encountered similar situation can share your experience.
I suggested that the team document or at least label compatibility issues so users are informed about them, but they rejected the idea[0], recommending instead that users keep abreast of changes to a 35 page troubleshooting file.
That said, I've been living on it full time for a few months, and it's working well. I'm using the Docker CLI with Podman providing the backend implementation. Biggest caveats: Mounting volumes from the host is still a little limited. It doesn't play nice with giving docker.sock back to Docker Engine (wontfix[1]). The --platform flag was broken but should be fixed in 4.6.
With the release of podman 4.6.0 a lot of the issues have been sorted out, podman-desktop is still shipping engine 4.5.1 at the moment, but a new release should be coming out soon. I'd suggest you give it another shot.
I'm confused by this one. You're already running a VM in order to use containers on a Mac. What does the daemonless approach inside a container give you? That feature works great on Linux servers for me, but I'm not sure what's the point outside of that.
Upthread there’s a good suggestion that the authors should create an explicit compatibility document.
Did you realize that there's a daemon on podman for mac (https://docs.podman.io/en/latest/markdown/podman-system-serv...)?
Are you aware it runs rootful podman, not rootless podman?
And why do you care about those things if it's self-contained in a linux VM anyway, where there's already plenty of daemons, and plenty of root?
I am confused.
The way podman desktop works includes running a podman daemon by default inside the podman linux VM. That's the daemon I'm talking about.
The docker cli also runs on mac, but the docker daemon doesn't run on macOS directly, but instead as a daemon inside the linux VM.
Hence, in podman desktop on macOS, just like docker desktop on macOS, you have a similar daemon running inside the linux VM that's launched.
Do you understand now?
Podman sucks in non-Enterprise environments. Either use docker or some minimal kubernetes distro. Everything else is a waste of time.
People are correct in thinking podmansh is just a single command that `podman exec -ti podmansh` container, and they would be correct. But the interesting thing is through the user of quadlet and systemd, administrators can easily configure the podmansh container for all users or for specific users. The ease of customization and systemd managing the life cycle of the container based on users sessions is a really nice feature.
Many users will never use this, but certain users like Governement, Banking or other entities who are very concerned about security, this is a really nice feature.
Not really sure what one would use a login shell for, though. I mean, if I, as the user, am merely logging into a containerized shell, why don't I execute the container locally? Why use SSH? Sure, the volumes mounted into the login shell container might contain data I need, but one could also simply mount them as network storage locally.
It provides support for starting host commands within a container, and also exporting commands from containers to the host.
Then there's also the training angle. I've found nothing quite as tangibly gets the visceral sense of computing across like walking a junior through a "where are your bits now?" now exercise with a handful of physical boxen.
It feels hacky: > CAUTION: The Kubic repo is NOT recommended for production use.
Even at home, I've set up multiple accounts for myself (main one, one for closed-source programs, one for gaming I can share with other people…) and for my family (to each their preferences, wallpaper and so on). Having two or three user sessions running at the same time is not uncommon. I'm probably the exception here, but I don't think Podman targets the regular home user anyway.
It's not obvious to me how Podmansh would revolutionize that, but I guess it's nice, I'll try it for sure.
If you are out of ideas to improve products, pause, think and improve code and other stuff, it’s not written in store that there should be new functionalities every day
podman exec -i --wait 10 [-t] {registry.PodmanSh} /bin/sh
Which has been something people have been doing for years now. It isn't any notable added complexity that isn't usable in other contexts (they added a timeout feature for handling errors better), and it isn't new functionality. sudo systemctl edit --force user-1234.slice
[Slice]
MemoryMax=1G
CPUQuota=10%
It's also something that's been available on the other UNIX-likes (FreeBSD/Solaris) since essentially forever.Frankly, ssh-to-container is a "slaps forehead" obvious solution and I'm surprised none of us thought of it before - I'd love to see it as a standard option in the OS, e.g. chsh allows you to specify a container and optional port and volume mappings.
In the old days, we'd (try to) use chroot, but that has all sorts of big problems with needing access to various directories, and those batches begat patches...
I think CNCF is at the point where you can assume that "there's a CNCF project for that" is true for anything container/kubernetes related.
Also, containers mean that one user can make changes (install/upgrade software, etc) and not adversely affect another user (incl their security stance).
loginctl enable-linger USER
(run once, as root) should cause USER's podmansh container to start as soon as the system enters multi-user mode, independent of USER's login sessions, allowing persistent daemons, including those necessary for job scheduling, namely…Ordinarily, users can create systemd timer units[4] to schedule at- and cron-style jobs; I assume you need to run a systemd instance inside each user's podmansh container to allow users to create systemd units in the present containerized context (running systemd inside a container is explicitly supported by podman[5]).
If your users don't like systemd, you can also run traditional atd/crond daemons in user containers.
[1] https://www.freedesktop.org/software/systemd/man/systemd.gen...
(This is the same mechanism that, e.g., automatically creates systemd mount units for mounts defined in /etc/fstab.)
[2] https://docs.podman.io/en/latest/markdown/podman-systemd.uni...
[3] https://github.com/containers/podman/blob/6ab38e55e733e70c95...
[4] https://www.freedesktop.org/software/systemd/man/systemd.tim...
[5] https://docs.podman.io/en/latest/markdown/podman-run.1.html#...
Think sharing special devices. Think sharing certain directory content that containers secret data, for the users eyes only.