Using Docker with Circuit-Web
Prerequisites
-
Install Docker. Their webpage has instructions.
-
In Windows and OS X, launch the Docker Quickstart Terminal. Linux uses the standard Terminal.
-
Make a local copy of arogi-demos. Type:
git clone https://github.com/arogi/circuit-web.git
Getting Started
-
Type:
docker pull arogi/circuit-web
to grab the latest Circuit-Web Docker image. -
Type:
docker run -it -p 80:80 -d -v ~/repos/circuit-web/:/var/www/html arogi/circuit-web
In that statement, replace~/repos/circuit-web/
with the pathname to your local repository. -
Open a web browser and enter the following into the address bar:
On OS X and Windows, enter192.168.99.100
. On Linux, enterlocalhost
Running TSP on a Road Network — (OS X and Windows only, will add Linux support soon)
-
Type:
docker pull arogi/arogi-valhalla
to grab the latest Arogi-Valhalla Docker image. Note: This downloads statewide road networks for CA, NV, OR, and AZ. Thus it may take a while, depending on your network speed. -
Type:
docker run -it -d -p 8002:8002 arogi/arogi-valhalla
-
Type
docker ps -a
and check if circuit-web container is still running. If not, do "Getting Started" section above. -
Open a web browser and enter the following into the address bar:
On OS X and Windows, enter192.168.99.100/network.html
. On Linux, enterlocalhost/network.html
Shutting Down
-
Return to the Docker terminal.
-
Type:
docker ps -a
to see a list of all local docker containers. Note the name it gives as a label. It often is something like:jolly_ptolemy
-
To stop Docker, type:
docker stop container_name
-
To remove the container, type:
docker rm container_name
-
To remove the image, type:
docker rmi image_name
(e.g.,docker rmi arogi/circuit-web
)