Self-Hosted Gitea Runner: Docker Settings Ignored in Workflow

Hello,

I have a pipeline step, which starts a docker container itself which is in network_mode: bridge.
I want to do some requests to that container from my current gitea runner container. Further this runner container should have a mount of type “bind” from /tmp/ to /tmp/.

So I did:

name: CI/CD Pipeline (Deploy to Production)
on:
  push:
    tags:
      - "*"

jobs:
  build-keycloak-test-image:
    runs-on: ubuntu-latest
    container:
      image: docker:dind
      network: "" # already tried network_mode: "bridge" and network: "bridge"
      volumes:
        - /tmp:/tmp

After some google research I assumed that works, but both seems to be ignored.
My docker container with image “docker:dind” uses network: “GITEA-ACTIONS-TASK-79_WORKFLOW-CI-CD-Pipeline-Deploy-to-Production_JOB-build-keycloak-test-image-build-keycloak-test-image-network”

and the mounts are just the default ones:

 "Mounts": [
            {
                "Type": "volume",
                "Name": "act-toolcache",
                "Source": "/var/lib/docker/volumes/act-toolcache/_data",
                "Destination": "/opt/hostedtoolcache",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "GITEA-ACTIONS-TASK-79_WORKFLOW-CI-CD-Pipeline-Deploy-to-Production_JOB-build-keycloak-test-image-env",
                "Source": "/var/lib/docker/volumes/GITEA-ACTIONS-TASK-79_WORKFLOW-CI-CD-Pipeline-Deploy-to-Production_JOB-build-keycloak-test-image-env/_data",
                "Destination": "/var/run/act",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "GITEA-ACTIONS-TASK-79_WORKFLOW-CI-CD-Pipeline-Deploy-to-Production_JOB-build-keycloak-test-image",
                "Source": "/var/lib/docker/volumes/GITEA-ACTIONS-TASK-79_WORKFLOW-CI-CD-Pipeline-Deploy-to-Production_JOB-build-keycloak-test-image/_data",
                "Destination": "/workspace/dev/ember",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "37c34b75cf487d36d0153dd6862829f0ca870085e7fdcc10b417d6f51ddb4858",
                "Source": "/var/lib/docker/volumes/37c34b75cf487d36d0153dd6862829f0ca870085e7fdcc10b417d6f51ddb4858/_data",
                "Destination": "/var/lib/docker",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/var/run/docker.sock",
                "Destination": "/var/run/docker.sock",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],

Is this maybe a bug? Because the runner does not say something about invalid properties.

Thank you very much for your support :wink:

After some help, I found this documentation of the config.yml of the gitea runner:

I found the config property container.network.
After setting that to bridge it worked!
Further I could add ’ /tmp/’ to the container.valid_volumes and after that the mounted volume from the workflow file worked!
If somebody run in that issue, you are welcome!

It seems like mounting volumes to job containers does not work anymore. I’m trying this with the latest gitea and acc_runner v 0.3.0. Set container.valid_volumes to “m2-cache“, created the volume with docker volume create m2-cache (wrote something to it using a busybox, so it’s working) and the build always shows the same message: [m2-cache] is not a valid volume, will be ignored.

Followed instructions to the letter and still no clue what is going wrong.