{work in progress}
You need to have docker installed on your machine. Visit docker page for installation.
This is a docker installation for osrm.
This installation comes with Andorra map and car.lua profile.
Clone the git repository and open a terminal in this repository.
If you want to mount an OSRM server with an other country (instead of Andorra), you need to put the correct pbf file into data folder (and remove andorra-latest.osm.pbf). Visit geofabrik to select your desire map.
Run these commands.
- To create the docker image
sudo docker build -t osrm .
- To build and run the container in daemon mode
sudo docker run -d -p 5000:5000 --name osrmrun -v $(pwd)/data:/opt/osrm/data -v $(pwd)/profile:/opt/osrm/profile osrm
- To start container
sudo docker start osrmrun
- To stop container
sudo docker stop osrmrun
sudo docker run -it -p 5000:5000 --name osrmrun -v $(pwd)/data:/opt/osrm/data -v $(pwd)/profile:/opt/osrm/profile osrm bash
In a browser, enter the following url :
http://localhost:5000/table/v1/car/1.52194,42.50630;1.73399,42.54356
It's a test distance matrix with two points from Andorra.