Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

make run leads to 'invalid mount config for type "bind"' error #67

Open
dasmur opened this issue Jun 18, 2020 · 0 comments · May be fixed by #68
Open

make run leads to 'invalid mount config for type "bind"' error #67

dasmur opened this issue Jun 18, 2020 · 0 comments · May be fixed by #68

Comments

@dasmur
Copy link
Contributor

dasmur commented Jun 18, 2020

Unfortunately, my pull request #65 introduced an error into the Makefiles run target, resulting in the following error:

sudo docker run -it --mount type=bind,src="",destination=/landkreise crawler
docker: Error response from daemon: invalid mount config for type "bind": field Source must not be empty.
See 'docker run --help'.
Makefile:4: recipe for target 'run' failed
make: *** [run] Error 125

Root cause
The current run target uses $(pwd) in the middle of the command which should spawn a subshell, but instead make itself expands this to a variable (which does not exist), resulting in an empty value for src=.

Solution
Escape the $ by using $$.

dasmur added a commit to dasmur/corona_landkreis_fallzahlen_scraping that referenced this issue Jun 18, 2020
The current run target does not properly spawn a subshell which results
in an "invalid mount config" when `docker run` tries to
inteprates the `--volume` parameter. Hence, this commit prevents `make` from
trying to expand the string to a variable in the first place.
(fixes: corona-zahlen-landkreis#67)
@dasmur dasmur linked a pull request Jun 18, 2020 that will close this issue
@dasmur dasmur changed the title Bug "invalid mount config for type "bind" when using make run make run leads to 'invalid mount config for type "bind"' error Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant