» Post Updates
- 2023-02-17: There is an official documentation about migrating from Docker to Podman Desktop which I missed when searching for it. So instead of reading this post, you should checkout Migration from Docker to Podman Desktop first.
» Setup
Install Podman Desktop, e.g. with homebrew:
|
|
Install the Podman Helper for compatibility with tools using the Docker socket.
|
|
» Adjust the Podman Machine
The Podman Machine is the QEMU based virtualized machine which runs the underlaying Linux installation, necessary for the container runtime.
At the date of writing, the resources of the machine could not be adjusted using the GUI, only on the command line.
To do so, you might have to stop the machine first:
|
|
and start it again after doing the changes:
|
|
When you want to create a smaller disk, you have to remove the old machine and create a new one:
|
|
Increasing the disk, adjusting the CPUs count, and memory can be modified without recreation:
|
|
When you need to run priviledged containers which should be able to modify your (virtualized) host machine, you have to enable this explicitly:
|
|
» Redirecting the docker command to podman
First I tried to use an alias which will point docker
to podman
but as it turned out, aliases are not recognized in Makefiles. Instead, I’ve created a Bash script with the name docker
in a folder which is part of my $PATH variable:
|
|
Lets assume I run the following command:
docker run -it --rm alpine
First, the script remembers me with a red hint that I’m running the command using podman and not docker, then it will simply execute podman
followed by all the given arguments.
» Image Building
When building images with Docker which don’t have a registry in their tag, Docker will implicitly add a docker.io/
prefix to the tag. On the other hand, Podman will add a localhost/
prefix for those tags missing a registry and podman doesn’t want to be compatible with Docker here (Issue #1034). Thus, you have to add a docker.io/
prefix to the tag explicitly if you need this compatibility.
» Kind
For running Kind with Podman, you have to set the KIND_EXPERIMENTAL_PROVIDER=podman
environment variable.
Loading images to your cluster won’t work the same way anymore:
|
|
Needs to be replaced with:
|
|
This might not be necessary anymore once unified image loading is implemented.