Drone CI with Podman

Christoph Miksche
1 min readSep 23, 2022

--

I run Drone CI for a longer period now with Docker. Because I decided to switch for multiple reasons from Docker to Podman, this setup had to be changed a bit.

In this blog post, I want to cover how to install Podman and how to set up Drone so that it works with Podman.

Installing Podman

Install the podman and podman-docker packages. E.g. on a Debian based System:

apt install podman podman-docker

If you currently use docker-compose, then you should also install podman-compose:

pip3 install podman-compose

After installing Podman, it could be that you will not find docker images. For that, you should add the following lines to /etc/containers/registries.conf:

[registries.search]
registries = ['quay.io', 'docker.io']

Configuring Drone CI

Drone CI uses a mapping of the Docker Socket. This mapping has to be changed so that Drone CI thinks that Podman is our Docker instance.

First, we need to find out where the current podman socket is:

systemctl status podman.socket

Here, something like /run/podman/podman.sock should be written.

In my case, with docker-compose, I had to change volumes:

volumes:
- '/run/podman/podman.sock:/var/run/docker.sock'

If you start Drone from the CLI, a config could look like:

sudo podman run -d \
-e DRONE_RPC_PROTO="https" \
-e DRONE_RPC_HOST="YOURDOMAIN" \
-e DRONE_RPC_SECRET="YOUR_SECRET" \
-e DRONE_RUNNER_CAPACITY=2 \
-e DRONE_RUNNER_NAME="NAME" \
--restart always \
--name runner \
-v /run/podman/podman.sock:/var/run/docker.sock \
docker.io/drone/drone-runner-docker

That’s it. Obviously you have to enable and start the services, but running Drone with Podman is easier than you think.

--

--

Christoph Miksche

Software Developer and Investor from Germany. Writing about Software, Tech and Investments.