Specify the following command and complete.
For / mygit / appdir /
, specify the folder that contains the python file you want to execute.
docker run -it --rm --name pythoncv -w /mygit/appdir/ -v "$PWD":/mygit/appdir/ jjanzic/docker-python3-opencv python index.py
-w Working folder specification
-v Mount directory specification
"is not shared from OS X and is not known to Docker."Error may appear.
Please refer to this article to avoid it.
[Docker For Mac] Error response from daemon: Mounts denied https://qiita.com/nishina555/items/a75ce530d9382aa09511
It's great because it doesn't take much time to build the environment.
Recommended Posts