我在Docker容器中运行带有环境的Django项目OK,当我想调试这个项目时,pycharm运行
python2.7 -u /opt/.pycharm_helpers/pydev/pydevd.py -multiproc -qt-support -client 10.0.2.2 -port 56359 -file /opt/project/manage.py runserver 0.0.0.0:8000 < / p>
没有cython ....运行“/usr/local/bin/python2.7”“/ opt /。pycharm_helpers / pydev / setup_cython.py”build_ext -inplace
并堆叠......
使用此建议https://youtrack.jetbrains.com/issue/PY-18913#comment=27-1373843 我手动将pycharm_helpers卷连接到docker container pycharm设置(参见temp2.jpg)
然后手动运行 “/usr/local/bin/python2.7”“/ opt /。pycharm_helpers / pydev / setup_cython.py”build_ext -inplace
setup_cython构建成功, 提交已安装cython的图像, 再次启动调试并查看:
python2.7 -u /opt/.pycharm_helpers/pydev/pydevd.py -multiproc -qt-support -client 10.0.2.2 -port 56359 -file /opt/project/manage.py runserver 0.0.0.0:8000 < / p>
在调试控制台窗口上 并再次叠加.....
我有fedora 21并尝试使用systemctl禁用firewalld和systemctl stop firewalld
systemctl status firewalld
firewalld.service - firewalld - 动态防火墙守护程序 加载:已加载(/usr/lib/systemd/system/firewalld.service;已禁用) 活动:不活动(死机)
但仍有问题
供参考:
ip link show dev docker0
4:docker0:mtu 1500 qdisc noqueue state DOWN模式DEFAULT组默认 link / ether 02:42:be:3a:42:eb brd ff:ff:ff:ff:ff:ffiptables -L -n -t nat | grep DOCKER
DOCKER all - 0.0.0.0/0 0.0.0.0/0 ADDRTYPE&gt;匹配dst-type LOCAL
DOCKER all - 0.0.0.0/0!127.0.0.0/8 ADDRTYPE&gt;匹配dst-type LOCAL
我尝试通过ssh将pycharm连接到docker容器 - 调试工作正常。 但我想解决docker interpreter的问题