I know it has been stated that Drone isn’t supported under Podman yet, but I got the server and Docker runner successfully working now on CentOS 8 with podman 3.1. Here are the steps needed to make it work:
yum install podman-remote
Add the following to /usr/lib/systemd/system/podman.socket
[Unit]
Description=Podman API Socket
Documentation=man:podman-api(1)
[Socket]
ListenStream=%t/podman/podman.sock
SocketMode=0660
[Install]
WantedBy=sockets.target
Then:
systemctl daemon-reload
systemctl enable --now podman.socket
yum install podman-docker
Now you have the Docker compatible Podman API up and running. Follow the normal Drone server install doc, replacing “docker run …” with “podman run …”. The runner requires a little more work. follow the normal install doc, replacing the runtime, but also add the following line:
--volume=/var/run/docker.sock:/var/run/docker.sock \
Now Drone and the Docker runner should be able to pull repositories and start builds as normal. Tested with both Github and Gitea.
Next I have been trying to get the SSH runner working with the example from Overview | Drone, but it fails during the build. The runner starts up normally, registers with server, and when trying to initiate a build I get the following error:
level=error msg="cannot accept stage" error="Optimistic Lock Error" stage.id=20 stage.name=default stage.number=1 thread=4
The UI shows “default - clone: skipped” on the clone step, but I don’t know if this is normal when using “type: ssh” in .drone.yml?
My main goal here was to the Drone working under Podman, and it did, so getting the SSH runner working is just bonus at this stage. I have been running with debug logging and looking at the code for the runner, but haven’t seen any obvious reason why it should fail like this.