# Act Runner in docker container

**URL:** <https://forum.gitea.com/t/act-runner-in-docker-container/10856>\
**Category:** Actions\
**Created:** [February 24, 2025, 10:27am UTC](https://forum.gitea.com/t/act-runner-in-docker-container/10856 "2025-02-24T10:27:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cistoge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/cistoge/32/2969_2.png) [@Cistoge](https://forum.gitea.com/u/Cistoge)\
**Post date:** [February 24, 2025, 10:27am UTC](https://forum.gitea.com/t/act-runner-in-docker-container/10856/1 "2025-02-24T10:27:34Z")

</div>

Hello,

I followed the documentation on

> **[Act Runner | Gitea Documentation](https://docs.gitea.com/usage/actions/act-runner)**
>
> This page will introduce the act runner in detail, which is the runner of Gitea Actions.

to create a runner with the docker image, using docker-compose, but two problems occurred:

a) docker-compose.yml says that local file ./config.yaml shall be mounted on  
/config.yaml, but with this, docker complains and tells me that I am probably  
trying to mount a file on a directory or vice versa

b) when I remove that volume completely from docker-compose.yml, the  
container starts, but the Gitea web interface shows the runner as offline  
and I do not know how to set it online. Furthermore, the docker container  
complains that it cannot find a file .runner

Regards  
Christoph

---

<div class="post-metadata">

**Author:** ![edkuksa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/edkuksa/32/6571_2.png) [@edkuksa](https://forum.gitea.com/u/edkuksa)\
**Post date:** [February 25, 2025, 5:49pm UTC](https://forum.gitea.com/t/act-runner-in-docker-container/10856/2 "2025-02-25T17:49:23Z")

</div>

Here is my working runner, created via docker compose

```auto
  runner:
    image: gitea/act_runner:latest
    container_name: act_runner_global
    restart: always
    environment:
      CONFIG_FILE: '/config.yaml'
      GITEA_INSTANCE_URL: 'https://git.example.com/'
      GITEA_RUNNER_REGISTRATION_TOKEN: 'yOuR_sEcReT_tOkEn'
      GITEA_RUNNER_NAME: 'ubuntu_global'
    networks:
      - 'gitea_network'
    ports:
      - '8081:8081'
    depends_on:
      gitea:
        condition: service_healthy
        restart: true
    volumes:
      - ./act_runner/config.yaml:/config.yaml
      - ./act_runner/data:/data
      - /var/run/docker.sock:/var/run/docker.sock

```

---

<div class="post-metadata">

**Author:** ![mini\_lab\_hero](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mini\_lab\_hero](https://forum.gitea.com/u/mini_lab_hero)\
**Post date:** [February 26, 2025, 8:38pm UTC](https://forum.gitea.com/t/act-runner-in-docker-container/10856/3 "2025-02-26T20:38:44Z")

</div>

Hi, recently started using this myself. I found that I had to grab the example config from here ([link to their repo](https://gitea.com/gitea/act_runner#:~:text=You%20can%20read%20the%20latest%20version%20of%20the%20configuration%20file%20online%20at%20config.example.yaml.)) and create the “.config” file in a bind mount.
