|
|
|
|
|
by theamk
2257 days ago
|
|
If you want to easily read or write files anywhere, or if you want to edit/develop those scripts easier. Not everything is a web-accessible service, and sometimes you do care about short startup time -- for example, if you have a file conversion script that you need to run on 1000's of files. You can kinda-sort fake it with "docker exec", but it is really awkward, and at some point, pyenv etc.. is just easier. |
|
You can simply mount your current directory to docker.
2. Docker doesn't ONLY support web-accessible services:
For example, you can run aws cli without python with this alias.
aws() { docker-run --entrypoint="aws" infrastructureascode/aws-cli:1.16.309 "$@" }
3. When you need to debug python code live with your IDE: Check these out https://code.visualstudio.com/docs/containers/debug-common https://www.jetbrains.com/help/pycharm/using-docker-as-a-rem...