I am using docker toolbox v17.03 in Windows 10 Home. I am playing with flask app from python slim. I tried to mount the current directory to app and tried ${PWD} and %cd% like below.
docker container run -it -p 5000:5000 -e FLASK_APP=app.py --rm -e FLASK_DEBUG=1 -v %cd%:/app web1
==> Got the error saying invalid characters
docker container run -it -p 5000:5000 -e FLASK_APP=app.py --rm -e FLASK_DEBUG=1 -v ${PWD}:/app web1
==> Neither error nor working
The second form ${PWD} would be working in a Powershell session.
If it still says "invalid characters", that means:
[a-zA-Z0-9][a-zA-Z0-9_.-]
, making it inelligible for a volume name.Double-check what %cd% returns, and if there is any special non-ascii character in it (or spaces)