5

I'm trying to setup the OSRM server on the top of Docker. I need to configure it using docker-compose.yml inside my micro-services project using .net core.

version: '3.4'

services:
  test_web:
    image: ${DOCKER_REGISTRY-}osrmweb
    build:
      context: .
      dockerfile: OSRM_WEB/Dockerfile
    ports:
      - 1111

  osrm-data:
    image: irony/osrm5
    volumes:
      - /data

  osrm:
    image: irony/osrm5 
    volumes: 
      - osrm-data
    ports:
      - 5000:5000
    command: ./start.sh Sweden http://download.geofabrik.de/europe/sweden-latest.osm.pbf

I have this docker-compose.yml file. When I run the docker-compose up there is no error but the container is Exited. [![ ][1]][1]

I can't see any response in this url.

https://localhost:5000/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false

Is there anything else I need to do in configurations? Any suggestions? [1]: https://i.stack.imgur.com/m9BLz.png

Giacomo Pirinoli
  • 548
  • 6
  • 17
Croos Nilukshan
  • 154
  • 1
  • 14

1 Answers1

0

Try an HTTP URL instead of HTTPS:

http://localhost:5000/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false

Also, the red "Exited" statuses in your screenshot are ok, because there are some one-time commands to be executed, when setting up an OSRM backend service:

  • Download the sweden-latest.osm.pbf file (and exit)
  • osrm-extract (and exit)
  • osrm-partition (and exit)
  • osrm-customize (and exit)

Finally the osrm-routed is run (and does not exit) and listens at the port 5000

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416