garrett@lemm.eetoSteam Deck@lemmy.ml•Steam Deck Platform Driver In No Apparent Rush For Upstreaming Into The Linux Kernel
·
6 months agoDoesn't distrobox (and podman) come with SteamOS these days too?
You wouldn't be able to layer, but using distrobox-export from inside a distrobox container would let you export command line apps as well as graphical ones too. The graphical apps will even show up in your menu and can be pinned as well.
(Of course, if something is available on Flathub already as a Flatpak, installing the app via Discover is easier and better. While Flathub has a lot of apps, it doesn't have everything, so being able to pick and choose from any distribution using distrobox is nice for a very large selection of software.)
podman-compose definitely got better over the past year...
But you can also use
docker-compose
itself with podman instead!https://www.redhat.com/en/blog/podman-docker-compose
Basically, for system level containers, you can do:
sudo systemctl start podman.socket
(or
enable --now
instead ofstart
if you want it to stick around after rebooting)Then use
docker-compose
and it'll communicate with podman instead of docker.For user session "rootless" containers, it's mainly the same thing, except you'll need to remove
sudo
and then add--user
after start or enable in that systemctl command. And you'd need to set an environment variable (either prefixing it on the command or using export to set it in your session), like this:DOCKER_HOST=unix:///run/user/$UID/podman/podman
(Put that in front of the docker-compose command and it'll connect to podman as your user instead, provided the service is available. Or toss it into your .bashrc with "export " before it and new bash sessions would have it.)
https://brandonrozek.com/blog/rootless-docker-compose-podman/
The one big gotcha I've hit is that if you have SELinux on your system, you'll want to add
:z
to your volume(s) mount to have it automatically deal with SELinux stuff. (Lowercase z for volumes that can be mounted for multiplayer containers and uppercase Z for volumes that are tied to a specific container.)But, I've found that using "quadlet" service files is much, much better than using podman-compose or docker-compose. There's a program called "podlet" that can even convert compose files to service files (quadlet)... It can convert command line flags and kubes and other formats too.
Quadlets are basically systems service files that integrate with podman, letting you easily set up a container as a system (or even user level) service, making managing a container just like managing any other service.
Here's the podlet command that'll convert things to quadlets: https://github.com/containers/podlet