Soukaina EL HAYOUNI
Soukaina EL HAYOUNI

Reputation: 391

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

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 !

Upvotes: 6

Views: 5910

Answers (2)

Bret Fisher
Bret Fisher

Reputation: 8596

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

Upvotes: 13

Adiii
Adiii

Reputation: 59966

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

Upvotes: 3

Related Questions