Add podman support

Inspired by this article I recently started looking into podman as a possible replacement for docker.

Since podman is a daemonless container engine, Drone currently can not be run under it as there is no /var/run/docker.sock that can be accessed for container details.

Are there any plans on supporting podman as the container engine for running Drone?

We do not have any immediate plans to build and maintain a podman runner, however, we do provide a framework that lets anyone in the community create a custom runner. There is no difference between an official runner and a community runner other than stewardship.

The starter project and framework for creating a customer runner:

The tooling to create a custom runner is new and has not been formally announced or documented yet, however, a few community members were able to use the starter project and research existing runners to figure it out.

Also happy to answer questions.


Can you please provide me links to existing docker runner code ? Probably, in near future I will be able to create PoC PR to support this feature.

You can find the docker runner code here:

However, the podman runner would need to be its own separate runner, similar to how the kubernetes runner is its own separate runner. We would not combine the docker runner and podman runner into a single codebase.

1 Like

Podman can use the same commands as Docker!

podman run --rm -it alpine sh
podman run --rm -it hashicorp/terraform:0.12.29

it took me some time to fixup the bug that use the docker runner with podman.

test it works good for me.

hope this will help you.

this is just the same with drone-runner-docker, but with some bug fixed and make it work with podman

container image: 80x86/drone-runner-podman:v1.6.3

docker hub: Docker Hub

you need enable podman restfull api:

sudo systemctl enable --now podman.service
sudo systemctl enable --now podman.socket

your drone ci yaml file does not need to change, you can still use type: docker , but with all the runners deployed with podman

deploy a podman runner quick (for test demo):

sudo podman run -d \
  -v /run/podman/podman.sock:/run/podman/podman.sock \
  -e DRONE_RPC_PROTO=http \
  -e DRONE_RPC_SECRET=xxxxxxxxxx \
  -e DRONE_RUNNER_NAME=podman01 \
  -p 3011:3000 \
  --restart always \
  --name drone-runner-podman01 \

I have got a simpler solution. Podman has a server for docker compatibility so you can use it to run the docker runner

Here is how to

now I notice that it is similar to @ttys3 solution

you can not use the docker driver directly because it has bug when works with podman.

  1. the output will got truncated sometimes (when the execute time is long and output is also long)
  2. it can not auto pull non-exists image

so I need the fixup.

thus , it comes 80x86/drone-runner-podman:v1.6.3, not the official docker driver image