- Easily customizable.
- Just 4 methods to implement.
Go to https://hub.docker.com/r/erkekin/tornado/ and run the docker container by
$ git clone https://github.com/erkekin/tornado.git $ docker run -i -t -p 9000:9000 --name websocket erkekin/tornado python socket/py/chatroom.py
You may want to show a local volume for source code. This is really useful in development cases. If you are on you local machine this becomes a must for easy coding on containers.
$ docker run -i -t -p 9000:9000 -v -v $(pwd):/home/socket:/home/socket --name websocket erkekin/tornado bash
$ python chatroom.py
And you are done.
The reason why we first clone this repo to our desktop is using the repo as a volume.
Using volume brings the ability to change the code without restarting the container. Or rebuild.
If you don't know what I mean by volume please take a look at https://docs.docker.com/engine/userguide/containers/dockervolumes/