Handle iptables better WSL2 (#2849)

This commit is contained in:
Pascal Vizeli 2021-04-29 12:31:34 +02:00 committed by GitHub
parent f3a562006a
commit 0d915a3efc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
docker-ce-cli \
containerd.io \
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/iptables-legacy \
&& rm -rf /var/lib/apt/lists/*
# Install tools

View File

@ -4,6 +4,9 @@ function start_docker() {
local starttime
local endtime
update-alternatives --set iptables /usr/sbin/iptables-legacy || echo "Fails adjust iptables"
update-alternatives --set ip6tables /usr/sbin/iptables-legacy || echo "Fails adjust ip6tables"
echo "Starting docker."
dockerd 2> /dev/null &
DOCKER_PID=$!