Windows installation Docker command issues - load custom pbf no longer works

I’ve managed to get a local install of ORS working on Windows/Docker before several times, but every time I come back to it after a few months, something has changed which requires some kind of change to my process. I’m struggling to figure out how to load a specific .pbf file. This used to be easy using a command like…

"C:\OpenRouteService\custom.pbf":/home/ors/ors-core/data/osm_file.pbf

…however I’ve noticed that the above command doesn’t work any more because the /home/ors/ors-core/data directory seems to have been confusingly abolished.

Here are my steps:

  1. Execute this command in the windows command prompt. I used to use ‘latest’ instead of ‘nightly’ but was told that ‘latest’ is not actually updated. Advice welcome on which version to use!
    docker pull openrouteservice/openrouteservice:nightly

  2. Then run this windows command which does all the important stuff, and which I’ve adapted based on advice here and here
    docker run -dt --name ors-app -p 8080:8082 -v C:/OpenRouteService/graphs:/home/ors/graphs -v C:/OpenRouteService/elevation_cache:/home/ors/elevation_cache -v C:/OpenRouteService/logs/ors:/home/ors/logs -v C:/OpenRouteService/conf:/home/ors/config -v "C:\OpenRouteService\italy-latest.osm.pbf":/home/ors/files/osm_file.pbf -e "JAVA_OPTS=-Xms2g -Xmx4g" openrouteservice/openrouteservice:nightly

Firstly is this the correct approach? I wish that instructions for Windows users were provided, it would surely lead to more widespread adoption of ors! How do I load my custom pbf?

And why do the folders keep changing? For example why has :/home/ors/ors-core/data/graphs become :/home/ors/graphs and how are we meant to keep up with these changes?

Thanks in advance.

I found a solution! On this page there’s a hidden dropdown box which has the answers Running with Docker | openrouteservice backend documentation

It looks like I also had the syntax wrong to boost the RAM memory allocation. The command below worked fine, and could be useful for any other Windows users out there. Thanks

docker run -dt --name ors-app -p 8080:8082 -v C:/OpenRouteService/graphs:/home/ors/graphs -v C:/OpenRouteService/elevation_cache:/home/ors/elevation_cache -v C:/OpenRouteService/logs/ors:/home/ors/logs -v C:/OpenRouteService/conf:/home/ors/config -v C:/OpenRouteService/files:/home/ors/files -e "XMS=1g" -e "XMX=8g" -e "ors.engine.source_file=files/italy-latest.osm.pbf" openrouteservice/openrouteservice:nightly

1 Like

For those out there struggling with this scenario, considering I’ve been there much like Baycode, take a look at this sample repo I’ve created - GitHub - rjsvieira/openrouteservice: 🌍 The open source route planner api with plenty of features.

1 Like

Hi,

For your knowledge, the correct path for the PBF file has changed. Based on your updated command, it should work by placing your .pbf file in the files directory. Your current command is correct:

-v "C:\OpenRouteService\italy-latest.osm.pbf":/home/ors/files/osm_file.pbf

ORS Docker images might evolve over time, leading to changes in the directory structure. To stay updated, I recommend checking the official OpenRouteService Docker repository and Kubernetes vs Docker for any documentation updates or changes to the folder paths.

Thanks

1 Like