Docker: Error response from daemon: invalid volume specification: ubuntu
17,169
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
Related videos on Youtube
Author by
Javier Joasimar Palos Flores
Updated on September 15, 2022Comments
-
Javier Joasimar Palos Flores over 1 year
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?
-
Zeinab Abbasimazar over 6 yearsYou have to set an absolute path for the destination directory when using volumes. BTW read the documentations comprehensively before posting a question.
-
-
Olasunkanmi over 2 yearsThis is Oct. 2021 and all I can say is: thanks so much. You saved me sleepless nights