Using Podman with Blink Self-Hosted Runner
Overview
Blink's self-hosted runner traditionally supports Docker. However, with a few modifications, you can use Podman as well. This guide outlines the necessary steps to configure Podman for use with Blink's self-hosted runner.
Prerequisites
Ensure you have Podman installed on your system. If not, you can install it using your package manager.
Steps to Enable Podman Support
1. Enable Podman Socket
Verify if the Podman socket is enabled by checking for the file /run/user/$UID/podman/podman.sock.
ls /run/user/$UID/podman/podman.sock
If the file does not exist, you need to enable the Podman socket:
systemctl --user start podman.socket
2. Modify the Docker Command
The Blink UI generates a docker run command for the Self-Hosted Runner. To use Podman instead, make the following changes to the command:
- Change the volume mapping:
- From: -v /var/run/docker.sock:/var/run/docker.sock
- To: -v /run/podman/podman.sock:/var/run/docker.sock
- Change the following:
- Replace: --add-host "host.docker.internal:host-gateway"
- With: -e DOCKER_HOST_MACHINE=host.containers.internal
The Original Docker Command:
docker run -d --name blink-runner -e CTRL_URL=<TENANT_DOMAIN> --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock --add-host "host.docker.internal:host-gateway" blinkops/blink-runner:<RUNNER_VERSION> ./blink-runner -auth <TOKEN>
The Adjusted Podman Command
podman run -d --name blink-runner -e CTRL_URL=<TENANT_DOMAIN> --restart unless-stopped -v /run/podman/podman.sock:/var/run/docker.sock -e DOCKER_HOST_MACHINE=host.containers.internal blinkops/blink-runner:<RUNNER_VERSION> ./blink-runner -auth <TOKEN>
3. Run the Adjusted Podman Command
Execute the adjusted podman run command in your terminal.
Conclusion
With these adjustments, you can successfully use Podman as the container runtime for Blink's Self-Hosted Runner. If you encounter any issues, ensure all steps are followed correctly and that your system meets all prerequisites.