From d25ab9b4dab222c76503535dd274009aaaf58b51 Mon Sep 17 00:00:00 2001 From: nocode Date: Tue, 23 Jun 2026 08:06:53 +0200 Subject: [PATCH] fix(build): add --network=host to podman run commands for dns connectivity Add --network=host flag to podman run commands in both build.sh and build-offi.sh to fix DNS resolution issues. The podman bridge network was unable to route to external hosts on certain wifi networks due to firewalld/NAT misconfiguration after network changes, resulting in "core.db: Resolving timed out" errors. By sharing the host's network stack, the container inherits the same network connectivity including DNS resolution via 127.0.0.53/systemd-resolved that is available on the host. --- build-offi.sh | 7 ++++++- build.sh | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build-offi.sh b/build-offi.sh index aafd7b9..fe38a2a 100755 --- a/build-offi.sh +++ b/build-offi.sh @@ -138,7 +138,12 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then "${SUDO[@]}" podman pull "$IMAGE" echo "==> Relance dans le conteneur ($SELF)..." - "${SUDO[@]}" podman run --rm "${TTY[@]}" --privileged \ + # --network=host : le réseau bridge de podman ne route plus vers l'extérieur + # sur ce wifi (firewalld/NAT cassé après changement de réseau → « core.db : + # Resolving timed out », même avec --dns). En partageant la pile réseau de + # l'hôte (qui, lui, a internet + DNS via 127.0.0.53/systemd-resolved joignable + # dans son propre netns), le conteneur récupère une connectivité identique. + "${SUDO[@]}" podman run --rm "${TTY[@]}" --network=host --privileged \ -e FWS_IN_CONTAINER=1 \ -v "$REPO_DIR":"$REPO_DIR" \ -v fws-pacman-cache:/var/cache/pacman/pkg \ diff --git a/build.sh b/build.sh index c20c535..4cb86cf 100755 --- a/build.sh +++ b/build.sh @@ -133,7 +133,12 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then "${SUDO[@]}" podman pull "$IMAGE" echo "==> Relance dans le conteneur ($SELF)..." - "${SUDO[@]}" podman run --rm "${TTY[@]}" --privileged \ + # --network=host : le réseau bridge de podman ne route plus vers l'extérieur + # sur ce wifi (firewalld/NAT cassé après changement de réseau → « core.db : + # Resolving timed out », même avec --dns). En partageant la pile réseau de + # l'hôte (qui, lui, a internet + DNS via 127.0.0.53/systemd-resolved joignable + # dans son propre netns), le conteneur récupère une connectivité identique. + "${SUDO[@]}" podman run --rm "${TTY[@]}" --network=host --privileged \ -e FWS_IN_CONTAINER=1 \ -v "$REPO_DIR":"$REPO_DIR" \ -v fws-pacman-cache:/var/cache/pacman/pkg \