Skip to content

Commit 5f923d2

Browse files
committed
chapter 9: docker run with --mount: restore ./src/db.sqlite3
Commit 85831c9 replaced `.` with `${PWD}` because I (and another reader Dan Dao who posted in the Disqus forum for the chapter) encountered 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. ``` This commit removes `${PWD}` and restores `.` I encountered the error while using an outdated version of docker. I have since used an updated version of docker and `.` does not produce an error. So, this commit reverts the change from `.` to `${PWD}`. `${PWD}` remains a workaround for readers stuck with an old version of docker.
1 parent d63ce86 commit 5f923d2

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
@@ -1420,7 +1420,7 @@ and the `target` path _inside_ the container:
14201420
----
14211421
$ *docker build -t superlists . && docker run \
14221422
-p 8888:8888 \
1423-
--mount type=bind,source=${PWD}/src/db.sqlite3,target=/src/db.sqlite3 \
1423+
--mount type=bind,source=./src/db.sqlite3,target=/src/db.sqlite3 \
14241424
-it superlists*
14251425
----
14261426

0 commit comments

Comments
 (0)