Drone CI with Podman
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.
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
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
[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.
Want to keep your Drone and Podman Instance uptodate?⌗
Checkout Autoupdate. One tool to update various software which has no built-in auto update functionality.
You can use your Fediverse (i.e. Mastodon, among many others) account to reply to this post.