Skip to content

Commit 8c12eea

Browse files
authored
Merge pull request #70 from tecladocode/jose/cou-145-rest-add-windows-command-for-docker
2 parents 4b4fdb9 + 83f26d1 commit 8c12eea

File tree

1 file changed

+10
-0
lines changed
  • docs/docs/05_flask_smorest/05_reload_api_docker_container

1 file changed

+10
-0
lines changed

docs/docs/05_flask_smorest/05_reload_api_docker_container/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ To do so, stop the running container (if you have one running), and use this com
7878
docker run -dp 5000:5000 -w /app -v "$(pwd):/app" flask-smorest-api
7979
```
8080

81+
:::info Windows command
82+
The command on Windows is the same, but the paths have to be passed in differently:
83+
84+
```
85+
docker run -dp 5000:5000 -w /app -v "/c/Documents/yourproject:/app" flask-smorest-api
86+
```
87+
88+
Instead of `/c/Documents/yourproject`, use the path to your project (but remember to use `/c/` instead of `C:/`).
89+
:::
90+
8191
- `-dp 5000:5000` - same as before. Run in detached (background) mode and create a port mapping.
8292
- `-w /app` - sets the container's present working directory where the command will run from.
8393
- `-v "$(pwd):/app"` - bind mount (link) the host's present directory to the container's `/app` directory. Note: Docker requires absolute paths for binding mounts, so in this example we use `pwd` for printing the absolute path of the working directory instead of typing it manually.

0 commit comments

Comments
 (0)