I am trying to get PyCharm working with my docker container and having issues. When I try to run a file I get an error that says `IOError: [Errno 2] No such file or directory: '/path/dir/main.py'`. I've been through the tutorials but clearly I'm doing something wrong. I created my Docker container like so:
```docker run -d -i -t --name mydocker -h mydocker \
-p $port:22 \
-e PYTHONPATH=./src:./my/python/path \
-v /my/path:/my/path \
docker_image:10 sudo /sshd.sh```
Then I made it my Python interpreter in PyCharm. But when I open a terminal and ssh into the container, I can see the file in the correct location, so I know it's there. Why can't I access it in PyCharm? Here is my configuration:
My script path is /path/dir/main.py
My Python interpreter is Remote Python 2.7.12 Docker (docker_image:10)
My working directory is /path/dir
I have checked "Add content roots to PYTHONPATH" and "Add source roots to PYTHONPATH". Under Execution, I have check "Run with Python console"
My Docker container settings is -v /path:/opt/project
In my Project Structure, /path is shown as a source folder (on the right) and I've marked everything as "Sources".
I am using the professional version of PyCharm.