# Could not resolve host when running Actions

**URL:** <https://forum.gitea.com/t/could-not-resolve-host-when-running-actions/7721>\
**Category:** Actions\
**Created:** [August 13, 2023, 3:57pm UTC](https://forum.gitea.com/t/could-not-resolve-host-when-running-actions/7721 "2023-08-13T15:57:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebfortin](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ebfortin](https://forum.gitea.com/u/ebfortin)\
**Post date:** [August 13, 2023, 3:57pm UTC](https://forum.gitea.com/t/could-not-resolve-host-when-running-actions/7721/1 "2023-08-13T15:57:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ebfortin](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ebfortin](https://forum.gitea.com/u/ebfortin)\
**Post date:** [August 14, 2023, 4:32am UTC](https://forum.gitea.com/t/could-not-resolve-host-when-running-actions/7721/2 "2023-08-14T04:32:01Z")

</div>

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": [
                    "Explore-Gitea-Actions",
                    "da5bfce6678b"
                ],
                "NetworkID": "b031ecf196b5f096a1bc5daf300684af1518c53ac64301bfb51c016306fdcfe0",
                "EndpointID": "1905858d558915c908051e3e40e7270b40f83f298d1a7afc537230d699fb1276",
                "Gateway": "192.168.0.1",
                "IPAddress": "192.168.0.2",
                "IPPrefixLen": 20,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": "02:42:c0:a8:00:02",
                "DriverOpts": null
            }
        }

```

config.yaml for the container section:

```auto
container:
  # 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

---

<div class="post-metadata">

**Author:** ![ebfortin](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ebfortin](https://forum.gitea.com/u/ebfortin)\
**Post date:** [August 15, 2023, 5:56pm UTC](https://forum.gitea.com/t/could-not-resolve-host-when-running-actions/7721/3 "2023-08-15T17:56:21Z")

</div>

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