DEV Community

Discussion on: Learn Docker - from the beginning, part II volumes

Collapse
 
denniswebdel profile image
dennisFS

also worth adding that if you are on windows using git bash the path conversion gets messy so that command substituition needs to be escaped like this:
~> docker run -d -p 8000:3000 --name EXAMPLE --volume /$(pwd)/logs:/logs YOUR_IMAGE

Collapse
 
bijoy26 profile image
Anjum Rashid

For me (in windows git bash), I also had to wrap around with "" to make it work.

$ docker run -d -p 8000:3000 --name YOU_NAME --volume /"$(pwd)"/logs:/logs YOUR_IMAGE