rancher / dapper

Docker build wrapper
Apache License 2.0
365 stars 89 forks source link

Add support for network #113

Open p-se opened 1 year ago

p-se commented 1 year ago

When running dapper in a container which is created by act on Manjaro, docker cannot resolve any DNS names. This is the case if, on the host system, a custom DNS server is configured that points to a local address. In my case, this was 127.0.1.1, which is unreachable for the container created inside another container, unless the host network is used.

This issue can be resolved without using the host network by configuring the Docker daemon on the host system, e.g.:

{
    "dns": [
        "1.1.1.1"
    ]
}

in /etc/docker/daemon.json.

While this is certainly an issue which isn't frequent and which can be circumvented, it requires manual configuration of the host system to be able to run act for the E2E tests for rancher/telemetry and rancherlabs/rancher-telemetry-stats.

By being able to run dapper with --network=host, this configuration does not have to be applied and instead, the E2E tests themselves could contain the argument --network=host when calling dapper to prevent any issues, even if a custom DNS is used which points to a local address, which is otherwise unreachable from the container.