user7499192
user7499192

Reputation:

host to docker directory mount error

I am getting this error while mounting host directory to docker container.

$ docker run -v $pwd:/opt/lampp/htdocs/ -it xampp bash
docker: Error response from daemon: invalid volume spec ":/opt/lampp/htdocs/": invalid volume specification: ':/opt/lampp/htdocs/'.
  See 'docker run --help'.

Inside docker /opt/lampp/htdocs/ exists :

Please help.

Upvotes: 0

Views: 110

Answers (1)

Avinash
Avinash

Reputation: 2191

$docker run -v $PWD:/opt/lampp/htdocs/ -it xampp bash

docker use bash internal $PWD Check Here

Upvotes: 1

Related Questions