Skip to content

Roconda/osrm-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image for OSRM

This project lets you prepare and run a docker container with OSRM and the map of your choice.

Run

There are two methods using this docker container. The first one is to add a PBF resource url that will be fetched on startup. The other option is to use a data container. The first method is recommend and easier to get started with.

Without data container

You only have to define a .osm.pbf file as a PBF_RESOURCE environment.

I recommend you to select a file from GeoFabrik.de.

Run the container like

docker run \
  -d
  -p 5000:5000
  -e PBF_RESOURCE="http://download.geofabrik.de/europe/luxembourg-latest.osm.pbf"
  timms/osrm-docker

Using a data container

First you'll need to prepare the url to your .osm.pbf source file.

Run your data container. The data container will keep your map files even if you restart your OSRM server.

docker run \
    -v /data \
    --name osrm-data \
    timms/osrm-docker:latest \
    echo "running data container..."

Now you can run your osrm server with any map.

docker run \
    -d \
    --volumes-from osrm-data \
    -p 5000:5000 \
    timms/osrm-docker:latest \
    ./run.sh \
        Barcelona \
        "https://s3.amazonaws.com/metro-extracts.mapzen.com/barcelona_spain.osm.pbf"

The first argument is the name you want to give to the map. It's used mostly as a file name in the data storage. The second argument is the URL to your source map file.

About

Docker meets OSRM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 95.0%
  • Makefile 5.0%