mirror of https://github.com/docker/docs.git
Wrong destination folder in container
/opt/webapp of web container includes app.py, if set destination folder as /opt/webapp, app.py is not visible and below error log presents, so it's better to set the destination folder as /webapp. docker logs -f web python: can't open file 'app.py': [Errno 2] No such file or directory
This commit is contained in:
parent
4a833da9f3
commit
539f8aa082
|
@ -99,7 +99,7 @@ In addition to creating a volume using the `-v` flag you can also mount a
|
|||
directory from your Docker engine's host into a container.
|
||||
|
||||
```bash
|
||||
$ docker run -d -P --name web -v /src/webapp:/opt/webapp training/webapp python app.py
|
||||
$ docker run -d -P --name web -v /src/webapp:/webapp training/webapp python app.py
|
||||
```
|
||||
|
||||
This command mounts the host directory, `/src/webapp`, into the container at
|
||||
|
|
Loading…
Reference in New Issue