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.
This commit is contained in:
+6
-1
@@ -138,7 +138,12 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then
|
|||||||
"${SUDO[@]}" podman pull "$IMAGE"
|
"${SUDO[@]}" podman pull "$IMAGE"
|
||||||
|
|
||||||
echo "==> Relance dans le conteneur ($SELF)..."
|
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 \
|
-e FWS_IN_CONTAINER=1 \
|
||||||
-v "$REPO_DIR":"$REPO_DIR" \
|
-v "$REPO_DIR":"$REPO_DIR" \
|
||||||
-v fws-pacman-cache:/var/cache/pacman/pkg \
|
-v fws-pacman-cache:/var/cache/pacman/pkg \
|
||||||
|
|||||||
@@ -133,7 +133,12 @@ if [ -z "$FWS_IN_CONTAINER" ] && ! host_is_arch; then
|
|||||||
"${SUDO[@]}" podman pull "$IMAGE"
|
"${SUDO[@]}" podman pull "$IMAGE"
|
||||||
|
|
||||||
echo "==> Relance dans le conteneur ($SELF)..."
|
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 \
|
-e FWS_IN_CONTAINER=1 \
|
||||||
-v "$REPO_DIR":"$REPO_DIR" \
|
-v "$REPO_DIR":"$REPO_DIR" \
|
||||||
-v fws-pacman-cache:/var/cache/pacman/pkg \
|
-v fws-pacman-cache:/var/cache/pacman/pkg \
|
||||||
|
|||||||
Reference in New Issue
Block a user