Could not resolve host when running Actions

Probably a newbie problem with a known resolution but I just can’t find it with my multiple searchs.

As far as I understand an act_runner will communicate with the Docker host through /var/run/docker.sock. Everything seems to be configured correctly and the runner is able to create actions containers. However, no name resolution works. When trying to communicate with my gitea instance the spawned container running the actions fails with “Could not resolve host”.

I suspected it has to do with the container spawn being isolated in his own network so I found the “network” option in the config.yaml file. I changed it to my docker compose network but it still doesn’t work. Also tried to set it to bridge without any more success.

Any idea how this could be resolved?

Result of inspect on the created container for the Gitea Actions job:

        "Networks": {
            "GITEA-ACTIONS-TASK-32_WORKFLOW-Gitea-Actions-Demo_JOB-Explore-Gitea-Actions-network": {
                "IPAMConfig": null,
                "Links": null,
                "Aliases": [
                "NetworkID": "b031ecf196b5f096a1bc5daf300684af1518c53ac64301bfb51c016306fdcfe0",
                "EndpointID": "1905858d558915c908051e3e40e7270b40f83f298d1a7afc537230d699fb1276",
                "Gateway": "",
                "IPAddress": "",
                "IPPrefixLen": 20,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": "02:42:c0:a8:00:02",
                "DriverOpts": null

config.yaml for the container section:

  # Specifies the network to which the container will connect.
  # Could be host, bridge or the name of a custom network.
  # If it's empty, act_runner will create a network automatically.
  network: "full_devnet"

docker network ls:
3fef194aa73e full_default bridge local
098aac9c4fc7 full_devnet bridge local
9ab610dce804 full_frontnet bridge local

This has been resolved. Made a typo in the CONFIG_FILE env var when defining it in compose.yml. Dumb error…

1 Like