Docker trusted build test.
Contains hello.py from https://github.com/kennethreitz/flask-sockets/ (overridable).
$ sudo docker run -t -i -p 8000:8000 fspot/flask-sockets
Override the code inside the container and use a volume from the host (persistant) :
$ sudo docker run -t -i -p 8000:8000 -v /tmp/code:/code/work fspot/flask-sockets
Now you're in the container (bash prompt).
Inside the container :
$ gunicorn -k flask_sockets.worker -b 0.0.0.0:8000 hello:app # needs hello.py with app (wsgi compliant)
As we've bound port 8000 of the host to 8000 of the container, then :
$ curl localhost:8000
should work in both.
Also, open your browser and go to http://www.websocket.org/echo.html. Put
ws://localhost:8000/echo, then connect : websocket works.