Docker Q&A

IPv4 forwarding is disabled. Networking will not work Solution 1: This won’t work every time ```shell // run on host server sysctl -w net.ipv4.ip_forward=1 sudo systemctl restart network ``` Solution 2: Append **net.ipv4.ip_forward=1** to **/etc/sysctl.conf** file. Solution 3: Append parameter **—net=host** to **docker run**, that will use host ports and ignore the **-p** parameters for example: ```shell docker run -it --network host –name mynginx nginx ```
This post is licensed under CC BY 4.0 by the author.