# Add podman support

**URL:** <https://drone.discourse.group/t/add-podman-support/10827>\
**Category:** Drone Support\
**Created:** [June 8, 2020, 2:58pm UTC](https://drone.discourse.group/t/add-podman-support/10827 "2020-06-08T14:58:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![v-byte-cpu](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/v-byte-cpu/32/5438_2.png) [@v-byte-cpu](https://drone.discourse.group/u/v-byte-cpu)\
**Post date:** [June 8, 2020, 2:58pm UTC](https://drone.discourse.group/t/add-podman-support/10827/1 "2020-06-08T14:58:23Z")

</div>

Inspired by [this article](https://www.giantswarm.io/blog/building-container-images-with-podman-and-buildah) I recently started looking into [podman](https://podman.io/) 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?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [June 8, 2020, 3:32pm UTC](https://drone.discourse.group/t/add-podman-support/10827/2 "2020-06-08T15:32:00Z")

</div>

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:

> **[drone/boilr-runner](https://github.com/drone/boilr-runner)**
>
> boilr template for creating custom pipeline runners - drone/boilr-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.

---

<div class="post-metadata">

**Author:** ![v-byte-cpu](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/v-byte-cpu/32/5438_2.png) [@v-byte-cpu](https://drone.discourse.group/u/v-byte-cpu)\
**Post date:** [June 9, 2020, 8:04am UTC](https://drone.discourse.group/t/add-podman-support/10827/3 "2020-06-09T08:04:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [June 9, 2020, 11:48am UTC](https://drone.discourse.group/t/add-podman-support/10827/4 "2020-06-09T11:48:01Z")

</div>

You can find the docker runner code here:

> **[drone-runners/drone-runner-docker](https://github.com/drone-runners/drone-runner-docker)**
>
> Drone pipeline runner that executes builds inside Docker containers - drone-runners/drone-runner-docker

However, the podman runner would need to be its own separate runner, similar to how the [kubernetes runner](https://github.com/drone-runners/drone-runner-kube) is its own separate runner. We would not combine the docker runner and podman runner into a single codebase.

---

<div class="post-metadata">

**Author:** ![dR3b](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/dr3b/32/2518_2.png) [@dR3b](https://drone.discourse.group/u/dR3b)\
**Post date:** [September 29, 2020, 8:17am UTC](https://drone.discourse.group/t/add-podman-support/10827/5 "2020-09-29T08:17:50Z")

</div>

Podman can use the same commands as Docker!

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

```

---

<div class="post-metadata">

**Author:** ![ttys3](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ttys3/32/6549_2.png) [@ttys3](https://drone.discourse.group/u/ttys3)\
**Post date:** [August 3, 2021, 1:59pm UTC](https://drone.discourse.group/t/add-podman-support/10827/6 "2021-08-03T13:59:29Z")

</div>

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](https://hub.docker.com/r/80x86/drone-runner-podman)

you need enable podman restfull api:

```auto
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):

```auto

sudo podman run -d \
  -v /run/podman/podman.sock:/run/podman/podman.sock \
  -e DRONE_RPC_PROTO=http \
  -e DRONE_RPC_HOST=192.168.8.123:3001 \
  -e DRONE_RPC_SECRET=xxxxxxxxxx \
  -e DRONE_RUNNER_CAPACITY=1 \
  -e DRONE_RUNNER_NAME=podman01 \
  -p 3011:3000 \
  --restart always \
  --name drone-runner-podman01 \
  80x86/drone-runner-podman:v1.6.3

```

---

<div class="post-metadata">

**Author:** ![lmtr\_nn](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/lmtr_nn/32/6379_2.png) [@lmtr\_nn](https://drone.discourse.group/u/lmtr_nn)\
**Post date:** [August 24, 2021, 11:43pm UTC](https://drone.discourse.group/t/add-podman-support/10827/7 "2021-08-24T23:43:09Z")

</div>

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

> [@Drone Agent on Amazon Linux 2 ami](http://discuss.harness.io/t/a-runner-inside-a-runner-using-podman/9571):
>
> Has anybody tried using Amazon Linux 2 as the ami for for drone agent(in use with autoscaler)? If so how can we update the user-data cloud-config to install docker on amazon linux 2? This is the current cloud config that I am giving the autoscaler. The agent unfortunately can’t connect to the server because docker doesn’t run. # comes from https://autoscale.drone.io/configure/cloud-init/ #cloud-config package\_update: false package\_upgrade:…

now I notice that it is similar to @ttys3 solution

---

<div class="post-metadata">

**Author:** ![ttys3](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ttys3/32/6549_2.png) [@ttys3](https://drone.discourse.group/u/ttys3)\
**Post date:** [December 5, 2021, 1:50am UTC](https://drone.discourse.group/t/add-podman-support/10827/8 "2021-12-05T01:50:31Z")

</div>

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
