Docker: Use slirp4netns port mapping driver.

This commit is contained in:
Viyurz 2024-02-15 15:58:23 +01:00
parent 1fe82fe923
commit 82a9f3730c

View file

@ -14,4 +14,13 @@ sudo loginctl enable-linger "$USER"
PATH="/usr/share/docker.io/contrib:$PATH" dockerd-rootless-setuptool.sh install
systemctl --user enable --now docker
mkdir -p "$HOME/.config/systemd/user/docker.service.d"
cat << EOF > "$HOME/.config/systemd/user/docker.service.d/override.conf"
[Service]
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns"
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=slirp4netns"
EOF
systemctl --user enable docker
systemctl --user restart docker