Podman and Bitbucket self-hosted runner
Asked by Felix Schendel:

Hi, is it possible to use bitbucket self-hosted runners using podman? Thanks


Answers:
author: Theodora Boudale
body: Hi Felix,

We offer two different types of Runners for Linux:

* [Linux Docker Runners](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/)
* [Linux Shell Runners](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-linux-shell/)

The Docker ones require Docker to run, however, the Shell ones do not, and they use Bash to run the pipelines steps on your machine.

I am not familiar with Podman, but if it's a tool you can use from Bash, you can look into our Linux Shell Runners.

Kind regards,  
Theodora

comments: author: Felix Schendel
body: perfect, we'll try with the shell runners


author: Tony Jackson
body: Did you have any luck with this [@Felix Schendel](/t5/user/viewprofilepage/user-id/833097) ? Looking to do the same.


author: Felix Schendel
body: Yes, we went with the shell runners. They have some limitations (mentioned in the link) but those were fine for us.


author: uacode
body: Any updates about Podman?


author: Theodora Boudale
body: Hi [@uacode](/t5/user/viewprofilepage/user-id/2002067),

The Linux Docker runner requires Docker to run. We have a feature request in our issue tracker about supporting Podman:

* <https://jira.atlassian.com/browse/BCLOUD-22336>

You can add your vote to it (by selecting the **Vote for this issue** link) to express your interest. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Theodora


author: mosen1
body: It is now possible to pass the podman socket to the runner. Within RHEL i enabled the socket using:

```
systemctl enable --now podman.socket
```

However the runner itself attempts to parse the version string out of the API and is doing some kind of string regex or manipulation which fails, as shown in the stack trace below:

```
Exception in thread "main" java.lang.NumberFormatException: For input string: "4."
at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
at java.base/java.lang.Integer.parseInt(Unknown Source)
at java.base/java.lang.Integer.parseInt(Unknown Source)
at com.atlassian.pipelines.runner.core.runtime.linux.docker.LinuxDockerRuntimeSetup.lambda$verifyDockerRequirements$2(LinuxDockerRuntimeSetup.java:91)
```

I do not know if it is possible to fake the version response out of podman, but certainly we are way into unsupported territory.

comments: author: Wouter Bunthof
body: I've got a similar issue, but my error is
> Exception in thread "main" java.lang.NumberFormatException: For input string: "3."

However I'm also running V3 podman.
> Version: 3.0.1

Did you find any solution?


author: Felix Schendel
body: In our case we can't install docker on the host so if podman is not supported it makes no sense to use pipelines unfortunately.

To further describe the issue: it seems docker image "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner" relies on the docker daemon. We tried to mount the podman socket instead of the docker one but it was still complaining with sth like:

<br />

connect(..) failed: Connection refused: /var/run/docker.sock

Any ideas welcome! Hope someone has successfully used self-hosted runners using podman.


Tags: bitbucket-cloud

cloud