Suppose there is a QuarkChain cluster running on the host (e.g. 192.168.183.237) with default RPC port 38291.
Launch Docker container:
docker run -it -w /quarkchain-dev --net=host quarkchaindocker/quarkchainweb
Register host IP:
//inside Docker container
root@ubuntu:/quarkchain-dev# vi web/web/settings.py
//append host IP to ALLOWED_HOSTS, such as:
ALLOWED_HOSTS = [“localhost”, “192.168.183.237”]
Start the web server:
//inside Docker container
root@ubuntu:/quarkchain-dev# . env/bin/activate
(env) root@ubuntu:/quarkchain-dev# export PYTHONPATH=.
(env) root@ubuntu:/quarkchain-dev# env/bin/python web/manage.py runserver 0.0.0.0:8080 --insecure
Then you can access http://localhost:8080/ (inside host), or http://192.168.183.237:8080 (outside host) to explore local quarkchain.
That’s it. Enjoy!