Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: Error response from daemon: invalid volume specification: ubuntu

Tags:

docker

ubuntu

I have the following issue when I run the command docker run -v $(pwd):opt -p 8080:8080 -it synedra/hapi_api:

docker: Error response from daemon: invalid volume specification: '/home/joasimar/trai/new:opt': invalid mount config for type "bind": invalid mount path: 'opt' mount path must be absolute.

How can I fix this?

like image 200
Javier Joasimar Palos Flores Avatar asked Nov 10 '17 16:11

Javier Joasimar Palos Flores


Video Answer


1 Answers

The paths have to be absolute. There is no current working directory or / assumed. Change it to:

docker run -v $(pwd):/opt -p 8080:8080 -it synedra/hapi_api
like image 172
Andy Shinn Avatar answered Oct 09 '22 09:10

Andy Shinn