Docker volume mapping not working

Hi I posted this issue at to reproduce the issue, just download the zip

Unzip it, cd into it and run:

(image=node-web-app && docker build -t $image . && docker run --rm -p 49160:8080 -d $image)

Visiting localhost:49160 works but for some reason I can’t get the -v option working for volume mapping:

(image=node-web-app && docker ps -a -q --filter=ancestor=$image | xargs docker rm -f && docker rmi $image)
(image=node-web-app && docker build -t $image . && docker run --rm -v "$(pwd)":/usr/src/app -p 49160:8080 -d $image)

I’m on Mac OS X High Sierra 10.13.4 (17E199). Could someone please download the zip and see if volume mapping works for them? I must be missing something fundamental.


The SO post has more info, explanation, and possible workaround.