Skip to content

Commit

Permalink
docker: Set alternatives for iptables
Browse files Browse the repository at this point in the history
This is to avoid the below issue while starting up docker.

```
Mar 24 22:59:10 ubuntu-jammy dockerd[2820]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument
```

Relates: docker/for-linux#1437

Signed-off-by: Tam Mach <[email protected]>
  • Loading branch information
sayboras committed Mar 25, 2023
1 parent 1ca4a2b commit 9bcab51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions provision/ubuntu/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

# wget https://packages.cloud.google.com/apt/doc/apt-key.gpg
# apt-key add apt-key.gpg
if [ "${NETNEXT}" == "true" ]; then
# Workaround for docker issue with iptables 1.8.7 in newer kernel versions
# https://github.com/docker/for-linux/issues/1437
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi

#Install packages
sudo apt-get update
Expand Down

0 comments on commit 9bcab51

Please sign in to comment.