sixeyed / diamol

Code samples for the book "Learn Docker in a Month of Lunches"
https://www.manning.com/books/learn-docker-in-a-month-of-lunches
Creative Commons Attribution Share Alike 4.0 International
505 stars 273 forks source link

TRY IT NOW to-do application Ch-06 (Pg. 202) #29

Closed mehul08 closed 3 years ago

mehul08 commented 3 years ago

Exercise Ch-6, Section-6.3, 2nd TRY IT NOW (Pg 202)

Problem I am running a container which bind-mounts to a directory on my computer. The first command is cd ./ch06/exercises/todo-list. When I ran it, it replied "cd: no such file or directory: ./ch06/exercises/todo-list". Is the period at the beginning a part of the command or a misprint ?

I ran the command again but without the period and was able to complete the exercise.

On Pg 204 also (Figure 6.11 Using bind mounts to load read-only configuration files into containers), the command has the period at the beginning.

Thank you.

Docker version Client: Docker Engine - Community Cloud integration: 1.0.7 Version: 20.10.2 API version: 1.41 Go version: go1.13.15 Git commit: 2291f61 Built: Mon Dec 28 16:12:42 2020 OS/Arch: darwin/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.2 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: 8891c58 Built: Mon Dec 28 16:15:28 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.3 GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b runc: Version: 1.0.0-rc92 GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff docker-init: Version: 0.19.0 GitCommit: de40ad0 Code version fatal: not a git repository (or any of the parent directories): .git

sixeyed commented 3 years ago

Hi @mehul08 - thanks for reporting the issue. All the try-it-nows assume you're using this repo as your current working directory.

So cd ./ch06/exercises/todo-list should work fine provided your current directory is the diamol folder.