Docker – modifying iptables for host container from alpine

  docker, iptables

Docker – modifying IPTABLES for host from container

^ Basically my question is essentially the same as this one, except for one detail.

When I followed the answer above, it worked great when I was using the debian base image. But now I have switched my base image to alpine instead. Why did this stop working now, and how do I achieve the same effect?

When I used the debian base image, iptables would insert the rule into the host’s iptables. Now it only inserts the rule into the container’s iptables.

This is my docker run command:

docker run -u squid:squid -d --name squid --network host --privileged squid-alpine

Source: Docker Questions