Docker includes invalid characters "${PWD}" for a local volume name
Asked Answered
F

2

6

I want to install OSRM locally using the docker container under windows

I followed the steps in this doc

In the end I can not execute the necessary commands and I receive the following error :

enter image description here

Any suggestion will be very helpful for me, thank you !

Finable answered 25/10, 2019 at 11:6 Comment(2)
I think in windows ${PWD} will not workLucre
Please post formatted text, not screenshots.Salicin
E
12

Path expansion is different in each shell.

For PowerShell use: ${pwd} 

For cmd.exe "Command Prompt" use: %cd%

bash, sh, zsh, and Docker Toolbox Quickstart Terminal use: $(pwd) 

Note, if you have spaces in your path, you'll usually need to quote the path.

Also answered here: Mount current directory as a volume in Docker on Windows 10

Evolute answered 11/2, 2020 at 22:20 Comment(0)
F
2

seems like the window command prompt does not interpret $PWD, you have to use gitbash or powershell I think. or another option is to use full path or current path.

The flag -v "${PWD}:/data" creates the directory /data inside the docker container and makes the current working directory "${PWD}" available there. The file /data/berlin-latest.osm.pbf inside the container is referring to "${PWD}/berlin-latest.osm.pbf" on the hos

Furan answered 25/10, 2019 at 11:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.