Podman in Linux
diego-pacheco.blogspot.com
diego-pacheco.blogspot.com
> Docker recently changed the license
From my understanding this is related to Docker Desktop not Docker. I'm pretty sure Podman can't replace Docker Desktop. This is also what the linked website says.
Or did I miss something?
And in the linked Blog post it says
> Docker was dropped from Kubernetes.
which from my understanding is also incorrect, because it's the docker-shim which is deprecated (not dropped) and Docker inc could probably make Docker Engine CRI compliant.
This is how Podman fits in:
Podman (and its various components) can replace everything but parts of Docker Desktop, namely the GUI that Docker Desktop, has. For everything else, it has it's own Docker compatible CLI, an optional daemon (by default it's daemonless), there is no containerd component as it communicates directly to any OCI compatible runtime. They've also implemented their own OCI compatible runtime, crun, which is supposed to be faster than runc, and more lightweight.
I suppose for the average Joe/Jane this probably doesn't matter. They want to run a few commands the first time around to set up, and then do "start/stop/remove my container" and that's all they want to do.
EDIT: github link: https://github.com/containers/podman/issues/8016
According to a post on the podman website: "Current implementation relies on qemu which currently has some platform dependencies." [1]
I also just checked on my machine and it is indeed running on Qemu.
IIRC Qemu also has support for Apple's Hypervisor.framework.
[1] https://podman.io/community/meeting/notes/2021-04-06/#podman...
Looks like they are adding it https://twitter.com/glours/status/1438526841577357315
I quote: "A dream coming true for a lot of #linux users, @dieuthicao announced that we’ll start working on a #Linux version of @docker Desktop"
As a Linux user, far from a dream at all, really.
ETA: Oh hey here it is: https://github.com/heyvito/podman-macos
> ETA: Oh hey here it is: https://github.com/heyvito/podman-macos
This GUI isn't an official Podman application. It's a third party. Not that it's bad or anything, it's just not official.
Except for:
- Docker Compose (because podman-compose has a large amount of open issues https://github.com/containers/podman-compose/issues)
- Docker Swarm (since Docker provides a lightweight orchestrator out of the box), you'd need to use something like K3s or another Kubernetes distro
- anything that uses the Docker socket (/var/run/docker.sock), so you can forget about running anything like Portainer or any of the other tools out thereSee for example: https://www.redhat.com/sysadmin/podman-docker-compose
Of course, there's no Swarm support, as evidenced by that very article:
> Caveats
> One known caveat is that Podman has not and will not implement the Swarm function. Therefore, if your Docker Compose instance uses Swarm, it will not work with Podman.
Feels like people will either be pigeonholed into Kubernetes for all of their deployments, or will have to migrate over to something like Hashicorp Nomad: https://www.nomadproject.io/
Curiously, it also supports Podman as a task driver: https://www.nomadproject.io/docs/drivers/podman
https://docs.docker.com/machine/
For now however, you can use minikube which provides drivers for Hyper-V and hyperkit:
Linux, yeah, I don't think there is a Desktop version for that. It's all CLI
I also think that it's more than safe to say that K8s is dropping Docker when they've deprecated it as a container runtime
There was Kitematic for Docker, I think it was independent, but it's owned by Docker now and they shut it down. https://github.com/docker/kitematic
If you mean Docker Desktop added some features from Kitematic, that's a misleading way of saying it.
This is wrong. Docker itself is no longer a container runtime: it has spun out that capability into containerd. Kubernetes can now call Docker’s container runtime (again: containerd) directly instead of going through a redundant docker-shim.
In other words: Kubernetes has dropped Docker’s old container runtime in favor of… Docker’s new container runtime.
Docker desktop also includes Docker-compose (a way to chain multiple docker container together)
And of course the UI.
Podman is just replacing the basic docker CLI. I would say that podman replaces about 20% of what Docker desktop offers.
Multiple siblings here have already mentioned that it absolutely can (and does for many).
My question is: in what way does it not? What is Docker Desktop doing for you that podman lacks? Just UI?
Docker desktop also includes Docker-compose (a way to chain multiple docker container together)
And of course the UI.
Podman is just replacing the basic docker CLI. I would say that podman replaces about 20% of what Docker desktop offers.
Using it on RPi4 with Fedora IoT running linuxserver io containers.
Appreciate the systemd integration as well making the containers services that gracefully go down and come up when the pi gets rebooted without me needing to do anything.
1. Docker containers absolutely can be run without root. Yes, it’s not the default policy, but containers can have a user ID. If you are referencing the daemon-less root-less nature of podman, that’s a clear advantage of podman vs Docker. 2. Docker containers also have a restart policy which I use to also have them startup on machine reboot. By graceful, you must mean sending SIGTERM to the containers which Docker does as well.
Perhaps podman does these things better, but I want to point out that Docker does have many features for better or for worse.
I see this repeated a lot, but it's not the default, its has to be explicitly configured: https://github.com/containers/podman/blob/v3.3.1/docs/tutori...
And in addition to the known upsides, there are some lesser known downsides:
1. There are feature limitations with it: https://github.com/containers/podman/blob/v3.3.1/rootless.md
2. There are security implications, quoting Arch Wiki:
> Warning: Rootless Podman relies on the unprivileged user namespace usage (CONFIG_USER_NS_UNPRIVILEGED) which has some serious security implications, see Security#Sandboxing applications for details.
Also worth noting that Docker itself has a rootless mode as well by now: https://docs.docker.com/engine/security/rootless/
I'm happy that there are Docker alternatives, but I have the feeling that podman has been hyped a lot recently and many articles and comments give the impression that it's more secure by default and without any downsides.
https://people.kernel.org/brauner/runtimes-and-the-curse-of-...
I have gone back and forth with podman. At some point it seemed to sometimes get into a funny state where I would simply delete everything[1] to fix it. On all systems where I run docker, I make sure to have "userns-remap": "default" in /etc/docker/daemon.json. Haven't looked into the rootless mode yet, but I was aware a few years ago that they were working on it.
[0] Without remapping root inside a different namespace, anyone with access to the docker daemon can access the outer root filesystem as root using a command such as `docker run --rm -it -v /:/oops alpine`
[1] Amusingly, the simplest way to do this was by using root to run `rm -rf` on my own ~/.local/share/containers/ directory, since the containers used UIDs other than my own (ones that are part of my subuid range)
Docker doesn’t have this functionality: the daemon runs as root, and anybody who is granted access to launch containers by invoking Docker commands can inherently access root-level privileges. The most mundane way to do this is to launch a container with the host’s namespaces instead of generating new ones.
The only thing podman gives you that docker itself can't is running without a daemon at all.
I still like the systemd integration and that it doesn't require a daemon too, and I still favor it over Docker.
1: https://news.ycombinator.com/item?id=28393949
Edit: Clarified that it's the unprivileged user namespaces feature specifically, not namespaces in general. Thanks for the feedback solarkraft.
The way I understand it, with containers running under a root user, is that to break out of a container you‘d have to find a vulnerability in standard (rootful) namespaces, which is much less likely (since it’s the same thing everything including Docker uses).
Frankly if you are that concerned about security (e.g. you have multitenant workloads or are dealing with sensitive data), you should be using KVM or gvisor.
That intermixes with security concerns about what's possible if running as root directly in different ways, and be more or less problematic than a root container depending on the use case, and also more or less likely based on how well those APIs are exercised for the specific use case.
It's not that these should be avoided, it's just that people should be aware that it's not necessarily a pure security increase at the expense of a bit of extra CPU due to kernel checks. There's a bit to consider. Maybe later everyone will consider this tested enough that's it's mostly a pure win. Maybe it's already at that point but people haven't internalized it. I don't know enough to know what stage we're at, but I thought it was worth mentioning, as it took me by surprise when I learned of it.
ultimately we must consider userns vs privileged-ns a fork in the road. one direction sweeps privilege concerns under the rug, and opens up new attack surface today leaving the door open for more non-obvious problems tomorrow. the other relies on highly competent engineers that know the nuances of the system they are working with, and have strong will to stomp out needless complexity from design to implementation.
I would encourage most security-conscious users to enable it and migrate to recent podman over using Docker, assuming a sufficiently recent kernel. The latest batch of major Linux OS releases have all enabled kernel.unprivileged_userns_clone, so Red Hat, Canonical et al seem to agree.
For those interested, though, you can read the anatomy of a userns clone() vulnerability here:
https://github.com/moby/moby/issues/2259
This has made it impossible to use docker in scripts where root access is not available. Thank you podman!
Deploying stacks (on Linux) Docker Compose style are typical use cases for using Docker, `podman-compose` works sometimes, however, over half of such initial attempts fail and require tinkering.
Docker CE (at least for Linux) is still the best option when the use cases are simply clone the repo & deploy/run the stack using `docker-compose up -d`, it simply does the job at the best cost.
podman / buildah / skopeo trio is definitely worth learning, podman can be very useful to migrate containerized workloads from local / standalone dev machines to production k8s clusters, by leveraging `generate kube`.
Come on. While maybe not an outright lie, this is certainly bending the truth and leaving out crucial details–Docker CLI is still open source and free, just not Docker Desktop.
While you can use podman on Linux (and should if it fits your needs!), you're not being forced to use it because Docker became paid or anything like that!
What I’ve done so far in replacing Docker Desktop has been to use just the CLI, Engine, and Compose on WSL2.
curl -LO https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz
tar -xvzf docker-20.10.8.tgz
mv docker/dockerd /usr/bin/dockerd
mv docker/docker-init /usr/bin/docker-init
mv docker/docker-proxy /usr/bin/docker-proxy
mv docker/docker /usr/bin/docker
rm -rf docker
rm docker-20.10.8.tgzThere is apparently support in the works, but I can't find or get that support on Ubuntu at this stage. Shame, I was hoping it might support IPv6 better than docker currently does.
As I like rootless containers. I think the implementation feels awkward for local directory permission mounting volumes.
cp ./app.AppImage /srv/app/app.AppImage
for deployment_host in $( <deployment_hosts jq '.[].hostname');
ssh deployment_user@deployment_host /srv/app/app.AppImage &
done
okay boss, what's the next problem?(But I guess it wasn't the fault of that deployment -- you just staged the binary, you didn't start it running.)
I've done it (and later cringed). But it definitely works.
That said, the default overlay storage driver already supports reflinks, which will get you most of the benefits.
Overall, it's a drop-in replacement with additional features and a more linux friendly underlying architecture. You can even alias podman to docker and shouldn't run into any issues.