4

I am trying to setup an image of the osrm-backend on my docker. I am unable to run docker using the below commands (as mentioned in wiki)

docker run -t -v ${pwd}/data osrm/osrm-backend:v5.18.0 osrm-extract -p /opt/car.lua /data/denmark-latest.osm.pbf
docker run -t -v ${pwd}:/data osrm/osrm-backend:v5.18.0 osrm-contract /data/denmark-latest.osrm
docker run -t -i -p 5000:5000 -v ${pwd}/data osrm/osrm-backend:v5.18.0 osrm-routed /data/denmark-latest.osrm

I have already fetched the corresponding map using both wget and Invoke-WebRequest. Every time I run the first command from the above, it gives the error...

[error] Input file /data/denmark-latest.osm.pbf not found!

I have tried placing the downloaded maps in the corresponding location as well. Can anyone tell me what I am doing wrong here ?

I am using PowerShell on Windows 10

Naveed Butt
  • 2,861
  • 6
  • 32
  • 55
  • 1
    The wiki has `-v $(pwd):/data` (with a colon) in all three `docker run` commands. Did you do that too? (`-v $(pwd)/data` without a colon would be syntactically valid but mean something very different.) – David Maze Aug 08 '18 at 04:27
  • 1
    I did that too. I had to change the paranthesis to curly brackets to make it compatible with windows and powershell. I thought, I had to remove the colon after that, I tried that again now, but the same issue – Naveed Butt Aug 08 '18 at 04:35
  • 1
    i have the exact same issue, did you figure it out? – Karan Harsh Wardhan Apr 03 '19 at 12:35
  • no, unfortunately, no one gave the answer and I had to move on to another high priority project... :) – Naveed Butt Apr 10 '19 at 17:52

1 Answers1

0

For me the problem was that docker was not able to access the C drive, even though the sharing was turned on in docker settings. After wasting lots of time, I turned off the sharing of C drive, and then turned it back on. After that when I mounted some folder to docker, it was able to see the files.

Docker share drive

Arslan
  • 36
  • 3