Then I followed your suggession and pinged the localhost and servers private ip and it succeeded.
ubuntu@ip-172-26-76-252:~$ sudo docker exec -it bot_wa bash
bash-4.2$
bash-4.2$
bash-4.2$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.039 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.040 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.040 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.039 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.039 ms
^C
--- localhost ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5097ms
rtt min/avg/max/mdev = 0.035/0.038/0.040/0.007 ms
bash-4.2$
bash-4.2$ ping 172.26.76.252
PING 172.26.76.252 (172.26.76.252) 56(84) bytes of data.
64 bytes from
172.26.76.252: icmp_seq=1 ttl=64 time=0.046 ms
64 bytes from
172.26.76.252: icmp_seq=2 ttl=64 time=0.073 ms
64 bytes from
172.26.76.252: icmp_seq=3 ttl=64 time=0.064 ms
^C
--- 172.26.76.252 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2035ms
rtt min/avg/max/mdev = 0.046/0.061/0.073/0.011 ms
bash-4.2$