Official nginx container should be stable
Port forwarded NATted access fails after several hours.
I have a ‘stable’ OSX boot2docker machine running in bridged mode on Virtual Box. Latest versions of OS X, Docker toolbox and VirtualBox.
The docker-machine is just about default - just the second network adapter is in bridged mode so that I can access its containers from a second mac.
Mac is on 192.168.123.8, the docker-machine it hosts is on 192.168.123.25 (second interface) I can access the nginx web sites such as 192.168.123.25:8080 - this container can be accessed by any other computer on my subnet. So far so good.
Recently I wanted to made these containers accessible from the internet and set up the connection using port forwarding:
Cable modem -> airport extreme -> mac running docker machine.
85.xx.xx.xx:8080 -> airport extreme does port forwarding from 8080 to 192.168.123.25:8080
ngnix sites are visible from the internet - I was really happy.
The following morning it is not working - the access from the internet has stopped responding - times out. However the nginx site is still running and accessible via the internal ip address 192.168.123.25:8080. I assumed that the problem was the airport or internet connection - restarted both - no change.
I then tried to restart the container - still not working externally.
Finally after restarting the docker-machine and the container the site is working and once again accessible from the internet.
This has happened each time i restart the docker-machine - Always the nginx container is responding on the local address / port, but access through the airport express to the same address fails after some hours.
I’m struggling to know where I can begin to diagnose the problem - any theories / suggestions as to what is causing this type of behaviour?