Closed LeamHall closed 1 year ago
Redid the directory structure, getting the same issue.
... Recreating ch2-hello_web_1 ... done Attaching to ch2-hello_web_1 web_1 | python: can't open file '/code/manage.py': [Errno 13] Permission denied ch2-hello_web_1 exited with code 2
[leam@shaphan code]$ pwd /home/leam/lang/docker/code
[leam@shaphan code]$ tree |grep -v pyc . └── ch2-hello ├── db.sqlite3 ├── django_project │ ├── asgi.py │ ├── init.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── docker-compose.yml ├── Dockerfile ├── manage.py ├── pages │ ├── admin.py │ ├── apps.py │ ├── init.py │ ├── migrations │ │ ├── init.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py └── requirements.txt
[leam@shaphan code]$ docker-compose --version docker-compose version 1.29.2, build unknown
[leam@shaphan code]$ docker --version Docker version 20.10.23, build %{shortcommit_cli}
The issue seems to be the OS version of docker-compose. Removing that, and installing Docker CE and the compose plugin, seems to work.
When using the code in the book (version 4.0, page 31), I get the following error when running docker-compose up:
Removing the last two lines from the docker-compose.yml file lets it build.
I did not see any directions to create the "code" volume, did I miss it?