# Docker set up fails on own data

**URL:** https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587
**Category:** openrouteservice
**Created:** [December 18, 2023, 12:20pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587 "2023-12-18T12:20:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mundf](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/mundf/32/2717_2.png) [@mundf](https://ask.openrouteservice.org/u/mundf)
#### Post date: [December 18, 2023, 12:20pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/1 "2023-12-18T12:20:15Z")

</div>

I have set up docker and the plugin for qgis for the first time.  
Now I’m struggling to use my own osm.pbf files.

Explanation: first, installing docker for windows, cloning the copy of openrouteservice to my C drive and running

```auto
curl -O https://raw.githubusercontent.com/GIScience/openrouteservice/master/docker-compose.yml

```

After this I get the docker-compose.yml where I change BUILD\_GRAPHS to true.  
now, running

```auto
docker compose up

```

starts the docker image and the plugin in qgis starts working for the Heidelberg region.

Then I go into the docker/conf/ors-config.yml file and change source to my own osm.pbf file I downloaded from geofabrik.

I run

```auto
docker compose up

```

again and now qgis returns:

```auto
Feature ID None caused a GenericServerError:
500 ({"error":{"message":"Cannot invoke \"org.heigit.ors.routing.RoutingProfile.getGraphhopper()\" because the return value of \"org.heigit.ors.routing.RoutingProfilesCollection.getRouteProfile(int)\" is null"},"info":{"engine":{"build_date":"2023-11-28T10:04:13Z","version":"8.0"},"timestamp":1702901090307}})

```

Eventhough I’m setting the starting point of the isochrone into the region of the pbf file. What am I missing?

---

<div class="post-metadata">

### Author: ![Jules](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jules/32/187_2.png) [@Jules](https://ask.openrouteservice.org/u/Jules)
#### Post date: [December 18, 2023, 12:46pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/2 "2023-12-18T12:46:06Z")

</div>

Hi @mundf and welcome to our forum. Please provide us with the output of the two endpoints: `health` and `status` and your `docker-compose.yml`. So, we better know what’s going on with your instance.

Besides, make sure your pbf is available inside the docker container. The container can’t access files outside its own file system or mounted volumes.

---

<div class="post-metadata">

### Author: ![mundf](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/mundf/32/2717_2.png) [@mundf](https://ask.openrouteservice.org/u/mundf)
#### Post date: [December 18, 2023, 1:11pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/3 "2023-12-18T13:11:42Z")

</div>

Dear Jules,  
Thanks for the quick reply. the pbf is inside the docker container: docker/data/alsace-latest.osm.pbf

health:

```auto
{
    "status": "not ready"
}

```

while using the osm\_file.pbf file it’s `"status" : "ready" `

status:

```auto
{
    "languages": [
        "cs",
        "cs-cz",
        "de",
        "de-de",
        "en",
        "en-us",
        "eo",
        "eo-eo",
        "es",
        "es-es",
        "fr",
        "fr-fr",
        "gr",
        "gr-gr",
        "he",
        "he-il",
        "hu",
        "hu-hu",
        "id",
        "id-id",
        "it",
        "it-it",
        "ja",
        "ja-jp",
        "ne",
        "ne-np",
        "nl",
        "nl-nl",
        "pl",
        "pl-pl",
        "pt",
        "pt-pt",
        "ro",
        "ro-ro",
        "ru",
        "ru-ru",
        "tr",
        "tr-tr",
        "zh",
        "zh-cn"
    ],
    "engine": {
        "build_date": "2023-12-18T12:47:38Z",
        "version": "8.0"
    },
    "profiles": {
        "profile 1": {
            "storages": {
                "WayCategory": {
                    "gh_profile": "car_ors_fastest_with_turn_costs"
                },
                "HeavyVehicle": {
                    "gh_profile": "car_ors_fastest_with_turn_costs"
                },
                "WaySurfaceType": {
                    "gh_profile": "car_ors_fastest_with_turn_costs"
                },
                "RoadAccessRestrictions": {
                    "gh_profile": "car_ors_fastest_with_turn_costs",
                    "use_for_warnings": "true"
                }
            },
            "profiles": "driving-car",
            "creation_date": "",
            "limits": {
                "maximum_distance": 100000,
                "maximum_waypoints": 50,
                "maximum_distance_dynamic_weights": 100000,
                "maximum_distance_avoid_areas": 100000
            }
        }
    },
    "services": [
        "routing",
        "isochrones",
        "matrix",
        "snap"
    ]
}

```

docker-compose.yml:

```auto
version: '2.4'
services:
  ors-app:
    container_name: ors-app
    ports:
      - "8080:8080"
      - "9001:9001"
    image: openrouteservice/openrouteservice:nightly
    user: "${UID:-0}:${GID:-0}"
    volumes:
      - ./docker/graphs:/home/ors/ors-core/data/graphs
      - ./docker/elevation_cache:/home/ors/ors-core/data/elevation_cache
      - ./docker/logs/ors:/home/ors/logs
      - ./docker/logs/tomcat:/home/ors/tomcat/logs
      - ./docker/conf:/home/ors/ors-conf
      - ./docker/data:/home/ors/ors-core/data
    environment:
      - BUILD_GRAPHS=True
      - "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"
      - "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost"
      - ORS_CONFIG=/home/ors/ors-conf/ors-config.json

```

here’s `ors-config.yml`:

```auto
ors:
  engine:
    source_file: ./ors-core/data/alsace-latest.osm.pbf # or osm_file.pbf by default
    graphs_root_path: ./ors-core/data/graphs
    elevation:
      cache_path: ./ors-core/data/elevation_cache

    profiles:
      car:
        profile: driving-car
        elevation: true
        encoder_options:
          turn_costs: true
          block_fords: false
          use_acceleration: true
        preparation:
          min_network_size: 200
          min_one_way_network_size: 200
          methods:
            ch:
              enabled: true
              threads: 1
              weightings: fastest
            lm:
              enabled: false
              threads: 1
              weightings: fastest,shortest
              landmarks: 16
            core:
              enabled: true
              threads: 1
              weightings: fastest,shortest
              landmarks: 64
              lmsets: highways;allow_all
        execution:
          methods:
            ch:
              disabling_allowed: true
            lm:
              disabling_allowed: true
              active_landmarks: 6
            core:
              disabling_allowed: true
              active_landmarks: 6
        ext_storages:
          WayCategory:
          HeavyVehicle:
          WaySurfaceType:
          RoadAccessRestrictions:
            use_for_warnings: true

```

---

<div class="post-metadata">

### Author: ![Rennoldsb](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/rennoldsb/32/2658_2.png) [@Rennoldsb](https://ask.openrouteservice.org/u/Rennoldsb)
#### Post date: [December 19, 2023, 11:42pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/4 "2023-12-19T23:42:36Z")

</div>

How exactly are you getting that pbf into the image? From what I see there is no reference to where that pbf is, you just have it listed in ors-core which would require your own custom image.

To do it the way you are suggesting, you would need to have a separate dockerfile that builds off the nightly and imports your pbf to the ors-core directory.

---

<div class="post-metadata">

### Author: ![mundf](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/mundf/32/2717_2.png) [@mundf](https://ask.openrouteservice.org/u/mundf)
#### Post date: [December 20, 2023, 3:20pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/5 "2023-12-20T15:20:32Z")

</div>

@Rennoldsb thank you so much for your reply.  
I’m just starting to use docker and, obviously, haven’t grasped the whole concept fully yet.

How would I have a separate dockerfile? Is this the most straightforward way?

---

<div class="post-metadata">

### Author: ![Rennoldsb](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/rennoldsb/32/2658_2.png) [@Rennoldsb](https://ask.openrouteservice.org/u/Rennoldsb)
#### Post date: [December 20, 2023, 3:59pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/6 "2023-12-20T15:59:47Z")

</div>

@mundf Depending on how you are trying to deploy. I deployed my instance to Azure which was a big challenge, and the drawback is I won’t get nightly builds, I built it on one nightly image and that’s what I’m stuck with unless I rebuild it.

The Dockerfile I created is this:

```
FROM openrouteservice/openrouteservice:nightly

COPY ./us-latest.osm.pbf /home/ors/ors-core/data/osm_file.pbf

COPY ./ors-config.json /home/ors/ors-conf/ors-config.json

```

This uses the ORS nightly build as the base image, then I import my own pbf as literaly ‘osm\_file.pbf’ so I don’t need to futz with the basic compose YAML.

If you don’t want to do that, take a look at the docs here: [Advanced Docker Setup | openrouteservice backend documentation [Advanced Docker Setup | openrouteservice backend documentation (giscience.github.io)](https://giscience.github.io/openrouteservice/installation/Advanced-Docker-Setup#building-for-the-first-time)

---

<div class="post-metadata">

### Author: ![mundf](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/mundf/32/2717_2.png) [@mundf](https://ask.openrouteservice.org/u/mundf)
#### Post date: [January 22, 2024, 3:11pm UTC](https://ask.openrouteservice.org/t/docker-set-up-fails-on-own-data/5587/7 "2024-01-22T15:11:55Z")

</div>

Thank you @Rennoldsb

Your method helped me to get it working!
