Reputation: 6936
I am trying to use this command in docker run
docker run -p 80:80 -v $(pwd)/php-docker/src:/var/www/html/ php-hello-world
but it is not working. Is there any way to use pwd
in docker run
Upvotes: 1
Views: 305
Reputation: 59946
yes, you can use PWD, use it as variable $PWD
instead subshell $(pwd)
docker run -p 80:80 -v $PWD/php-docker/src:/var/www/html/ php-hello-world
Upvotes: 2