Docker -i is allocating pseudo tty as well as Keeping STDIN open even if not attached

Hi ,

please found the output for

WARNING: IPv4 forwarding is disabled. Networking will not work.
Welcome! Please enter your name: Satyam

Hello and Welcome Satyam!
[[email protected]_satyam ~]# docker run -t kodekloud/simple-prompt-docker
WARNING: IPv4 forwarding is disabled. Networking will not work.
Welcome! Please enter your name: SATYAM
^C
[[email protected]_satyam ~]# docker run -ti kodekloud/simple-prompt-docker
WARNING: IPv4 forwarding is disabled. Networking will not work.
Welcome! Please enter your name: SATYAM

Hello and Welcome SATYAM!

Hi satyam.saty143,
Run the followind command and try again:

sudo sysctl -w net.ipv4.ip_forward=1

Super simple solution. But this won’t work every time, you need to update the actual /etc/sysctl.conf file to make it permanent. Just open up the file and uncomment the line with net.ipv4.ip_forward=1 . You’re all done. Exit and reload your vagrant image. The error should now disappear.

Read more about this problem if you’re interested.