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的更多相关文章
随机推荐
- decimal类型运算注意点
代码如下: //货币类型的两个数基本运算 Console.WriteLine("错误的写法"); - ); ; - ) / ; Console.WriteLine(errorNum ...
- 使用用WCF中的双工(Duplex)模式将广告图片推送到每个Winform客户端机子上
参考资料地址:http://www.cnblogs.com/server126/archive/2011/08/11/2134942.html 代码实现: WCF宿主(服务端) IServices.c ...
- Azkaban任务流编写
在Azkaban中,一个project包含一个或多个flows,一个flow包含多个job.job是你想在azkaban中运行的一个进程,可以是Command,也可以是一个Hadoop任务.当然,如果 ...
- Python将数据写入excel或者txt,读入csv格式或xls文件,写入csv(写一行空一行解决办法)
1.写入excel,一开始不需要自己新建一个excel,会自动生成 attribute_proba是我写入的对象 import xlwt myexcel = xlwt.Workbook() sheet ...
- [转]MVC 经验总结_序
<appSettings> <add key="vs:EnableBrowserLink" value="false"/> </a ...
- 八.jQuery源码解析之get()
理论上get是用来返回jQuery对象中部分或全部元素为数组的,但是转换为数组后, 数组中的单个元素又是一个一个dom元素.所以get还有另外一个功效,就是将jQuery对象转换成dom对象. 如果g ...
- 无法正确解析FreeMarker视图
在使用SpringMVC处理FreeMarker的时候,出现了无法解析视图名的问题,报的异常说明的也非常清楚就是不能解析视图 这个free就是一个FreeMarker的模板名,它的完整路径是/WEB- ...
- Electron 前端页面导入jQuery 出现错误Uncaught ReferenceError: jQuery is not defined
如下: <script src="../assets/js/jquery-1.10.2.js"></script> 方法1 改为: <script&g ...
- python爬搜狗微信获取指定微信公众号的文章
前言: 之前收藏了一个叫微信公众号的文章爬取,里面用到的模块不错.然而 偏偏报错= =.果断自己写了一个 正文: 第一步爬取搜狗微信搜到的公众号: http://weixin.sogou.com/we ...
- Lazy JSF Primefaces Datatable Pagination
http://www.javacodegeeks.com/2012/04/lazy-jsf-primefaces-datatable.html