Debug_with_docker_in_pycharm
Debug with docker in pycharm
Why
As I really really appreciate it that we can have a isolated develop environment, when I heard pycharm can debug with docker, I was more than happy. However, things are not that easy.
What I got
I tried, tried and tried. At an amzing monment I succeeded running docker on windows throgh DockerToolbox. Mostly, I refer One answer to Running a Docker image in PyCharm causes “Invalid volume specification”.(By the way, my machine and environment is exactly like the answer)
BUT suddenly I failed to repeat it.
So I changed to try it on ubuntu
Unbuntu 14.04 in virtualbox.
The default settings when add docker as shown below is not suitable for unbuntu 14.

According to another SO question's answer, adding unix:///var/run/docker.sock to the API URL shows Connection successful when click Apply. But when running programs it still won't work.
And then
Problem partially solved, when we use docker to debug our project throgh PyCharm, it's not attach to a running docker and/or exec the commands (by now). Instead it start a new Containner and run the commands, so if we want to debug a python file, we should make sure the docker running python when open.
In other word, the Dockerfile better with last sentence:
CMD ["python3"]
And in linux (ubuntu) when this assured, all things is OK. And now I can debug with alpine-python
TODO
After succeeded in linux, I go back and try in windows, it's surely a bug of pycharm and hope can be solved in latter version.
And what's more, what I really want is more than this, I hope as below:
+------------------------------+
| | +------------------+ +-------------------+
| | <----------------+ | | |
| Docker/rkt/others | | Desktop UI XXXXXX Happy ME |
| +----------------> | | | |
| | +------------------+ +-------------------+
+------------------------------+
Some remote servers
In other word, no applications on PC/Desktop, no more reinstall systems, no different configurations, no more configurations problems! But with full control of what we use.
I will review related techs in the future, and this is another weekend I spent play with docker and all the configurations and DIT NOTHING WORTHFUL. Well, that's typical me. -.-
Debug_with_docker_in_pycharm的更多相关文章
随机推荐
- Renesas PPP Mode
不同厂家的NB/4G/2G,配置PPP模式略有差异,回调配置在如下路径: “synergy\ssp_supplemental\src\framework\sf_cellular_cat3\sf_cel ...
- ELF文件和BIN文件
文件的内容:1. BIN文件是 raw binary 文件,这种文件只包含机器码.2. ELF文件除了机器码外,还包含其它额外的信息,如段的加载地址,运行地址,重定位表,符号表等. 所以ELF文件的体 ...
- Java-Runoob-高级教程-实例-字符串:01. Java 实例 – 字符串比较
ylbtech-Java-Runoob-高级教程-实例-字符串:01. Java 实例 – 字符串比较 1.返回顶部 1. Java 实例 - 字符串比较 Java 实例 以下实例中我们通过字符串函 ...
- php去除换行符的方法小结(PHP_EOL变量的使用)
本来在unix世界换行就用/n来代替,但是windows为了体现他的不同,就用/r/n,更有意思的是在mac中用/r.因此unix系列用 /n,windows系列用 /r/n,mac用 /r,这样就用 ...
- Blueprint 编译概述
转自:http://blog.csdn.net/cartzhang/article/details/39637269 一.术语 Blueprint,像C++语言一下的,在游戏中使用前需要编译.当你在B ...
- 十二.jQuery源码解析之.eq().first().last().slice()
eq(index):将集合中的索引为index的元素提取出来. first():返回集合中的第一个元素. .last():防护集合中的最后一个元素. .slice(start[,end]):返回集合中 ...
- PyQt5系列教程(二)利用QtDesigner设计UI界面
软硬件环境 OS X EI Capitan Python 3.5.1 PyQt 5.5.1 PyCharm 5.0.1 前言 在PyQt5系列教程的第一篇http://blog.csdn.net/dj ...
- django-模板,过滤器
for…in…:跟python中的for…in…是一样的用法 {% for m in modules %} {{ forloop.cpunter }} {{ m }} {% end %} forloo ...
- c++builder 字节 编码 转换大全 String TBytes byte
System.SysUtils System::DynamicArray<System::WideChar> TCharArray System::TArray__1<System: ...
- spring jpa sqls
package com.example.repository; import java.util.List; import org.springframework.data.jpa.repositor ...