Skip to content

Commit 85831c9

Browse files
committed
chapter9: propose provide full path for --mount source
In the Disqus thread for chapter 9 (http://disq.us/t/4lw8u3p), reader Dan Dao reports seeing error: ``` $ docker build -t superlists . && docker run -p 8888:8888 --mount type=bind,source=./src/db.sqlite3,target=/src/db.sqlite3 -it superlists ... docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: './src/db.sqlite3' mount path must be absolute. ``` I also encountered that error. Both of us could have done something incorrect leading to the error. I replaced source=./src/db.sqlite3 with source=${PWD}/src/db.sqlite3 to provide an absolute path. and reran the command and did not get an error. I have tried this only on: macOS version 11.7.10 Docker version 20.10.14, build a224086
1 parent 0d63241 commit 85831c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter_09_docker.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ and the `target` path _inside_ the container:
14181418
----
14191419
$ *docker build -t superlists . && docker run \
14201420
-p 8888:8888 \
1421-
--mount type=bind,source=./src/db.sqlite3,target=/src/db.sqlite3 \
1421+
--mount type=bind,source=${PWD}/src/db.sqlite3,target=/src/db.sqlite3 \
14221422
-it superlists*
14231423
----
14241424

0 commit comments

Comments
 (0)