Hey guys so I’m currently working with a group to create a web application where we are using this repository as our foundation for our project:
The problem I’m encountering is that when I follow the four steps under the “How to use” section, I can’t seem to be able to execute step 4 properly where I get this error:
Result:
docker: Error response from daemon: Mounts denied:
The path /website is not shared from the host and is not known to Docker.
You can configure shared paths from Docker → Preferences… → Resources → File Sharing.
See Sign in | Docker Docs for more info.
ERRO[0000] error waiting for container: context canceled
Note that, the only steps I am executing for both situations are steps 2 & 4 because I have already cloned the project and created a superuser before. But I’m unsure if I should create a new superuser every time I open up the console in the project folder’s directory.
Furthermore, the reason why I have “insightwrite:master” in the console command instead of “django-docker-template:master” is because my project name on GitHub is called insightwrite.
If someone could help me with this issue that would be appreciated (:
Notice the difference in ${pwd} which would try to refer to an environment variable and not run a command in a subshell. The same value is in $PWD as well, but that is upper case. With your syntax you get an empty variable as it is probably undefined, but that shouldn’t cause invalid reference format, just mount the wrong directory. So maybe there is something in that variable but not the right one. Fix the parenthesis in your command and that should work.
I almost missed it, because it is harder to notice it in your post. Please, always use code blocks for codes, terminal outputs and logs. More information in the formatting guide: How to format your forum posts
If fixing the parenthesis doesn’t help, you can also quote the path.
which helps if your working directory has space in its path. I don’t see other problem in the command, but invalid reference format indicates the image name is invalid. That can happen when something before the image name is incorrect and that something else is interpreted as an image name while the actual image name becomes an argument for example. Or the image name becomes a volume and an argument is interpreted as image name.
If you have space in ${pwd}, than the result could be something like this:
As you see, /Users/my becomes an anonymous volume’s mount point and user/folder/website:/usr/src/website becomes the image tag, but slashes are not supported in the version tag so you get “invalid reference error”
It worked! Specifically because I didn’t add the quotation marks for the path like you mentioned and sorry for not formatting my code this is my first time on this forum lol. Either way I am pretty thankful for the explanation and I appreciate the help a ton.