# Actions in docker container

**URL:** <https://forum.gitea.com/t/actions-in-docker-container/8266>\
**Category:** Actions\
**Created:** [December 11, 2023, 3:10pm UTC](https://forum.gitea.com/t/actions-in-docker-container/8266 "2023-12-11T15:10:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacke](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jacke](https://forum.gitea.com/u/jacke)\
**Post date:** [December 11, 2023, 3:10pm UTC](https://forum.gitea.com/t/actions-in-docker-container/8266/1 "2023-12-11T15:10:49Z")

</div>

So, I started out with a simple act\_runner running directly on host. It would pick up new jobs, spin up a bullseye container and do its thing. So that worked greate.

Since we have some ssl-rewrites on our network I figured that I would rebuild the bullseye image with our certificate, just to improve some things (like being able to register a host to FQN instead of ip:port). Did that, re-registered the act\_runner and it would use this new image now. This also worked flawlessly. The act\_runner would pick jobs up, start the custom bullseye container and process the job to completion.

Now, I also wanted the act\_runners to start up at boot and thought to use docker here as well. So I built an image based on the act\_runner:latest one, with only our certs added. So act\_runner is currently dockerized, and it picks up jobs alright. But, it does look like when it does pick up a job, it processes it directly on its own docker container, instead of spinning up the bullseye one, so we get errors about node and ssh etc… missing of course.

Have we understood it correctly that it is possible to have a dockerized act\_runner starting docker containers and running jobs on them?

Our Dockerfile for custom bullseye and act\_runner both look like this:

```auto
FROM node:16-bullseye (or gitea/act_runner:latest)

ADD ca-certificates /usr/local/share/ca-certificates

RUN update-ca-certificates

```

This is our act\_runner compose file:

```auto
version: "3.8"
services:
  runner:
    image: our-instance.com/org-name/custom-act_runner:latest
    restart: unless-stopped
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: https://our-instance.com
      GITEA_RUNNER_REGISTRATION_TOKEN: a-token
      GITEA_RUNNER_NAME: dir-watcher-service
      GITEA_RUNNER_LABELS: ubuntu-22.04:docker://our-instance.com/org-name/custom-bullseye-16
    volumes:
      - ./config.yaml:/config.yaml
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock

```

None of us here is very knowledgeable at Gitea or Docker so I’m sure we’ve simply done something naive, but thought it would be good to ask just in case we’ve hit some weird wall.
