Skip to content

Commit 9d7e441

Browse files
authored
Use --network=host for WSL2 Docker DNS compatibility (#26)
Docker containers on WSL2 cannot reach the WSL2-generated nameserver (10.255.255.254) through the bridge network. Using host networking lets the container resolve DNS through the host's network stack.
1 parent 33bd11e commit 9d7e441

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

csync

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ for arg in "$@"; do
3737
done
3838

3939
exec docker run --rm \
40+
--network=host \
4041
--user "$(id -u):$(id -g)" \
4142
-v "$(pwd):/workspace" \
4243
-w /workspace \

0 commit comments

Comments
 (0)