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的更多相关文章
随机推荐
- column count of mysql.proc is wrong. expected 20,found 16. the table is probably corruptd.
1558 1547 column count of mysql.proc is wrong. expected 20,found 16. the table is probably corruptd. ...
- <meta name="viewport" content="width=device-width, initial-scale=1.0">的说明
今天在做适配手机版时,chrome调到手机版,但是还是显示PC端的样式,无法展现出手机端的样式: 开始的时候还以为是chrome版本的问题,最新版本的chrome62.0是有很多变化的,而之前工作中使 ...
- 记一次在 Ubutun16.04 LTS 系统的 python-environment 安装 MySQL-python 的心(苦)路(笑)旅程
背景 之前项目需要准备线啦, 那么好了~~ 数据库也从测试时使用的 SQLITE 升级到了 MYSQL (高大上的免费且开源的关系型数据库,要不要了解一下!) 巧合的是,同事使用的是MySQL-pyt ...
- HDU6128-Inverse of sum
参考这篇博客:https://blog.csdn.net/dormousenone/article/details/77340852 #include<bits/stdc++.h> usi ...
- HDU-5226 Tom and matrix(组合数求模)
一.题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5226 二.题意 给一个大矩阵,其中,$a[i][j] = C_i^j$.输入5个参数,$x_1, ...
- vue语法精简(方便开发查阅)
vue语法精简(方便开发查阅) 指令 特殊的标签和属性 变异方法 事件修饰符 按键修饰符 表单修饰符 生命周期函数 计算属性 监听属性 子组件通过事件向父组件传递信息 在组件上使用v-model 动画 ...
- 【转】从Mac/OS和iOS开放源码浅谈UNIX家谱
阅读数:1245 苹果公司在各类开源项目中长期贡献着自己的力量,但其UNIX系统技术一直都属于闭源阵营(这一点可以从NUX OS阵营和家谱图中得到答案).然而,以封闭闻名的苹果公司,2017年国庆期间 ...
- vs2010下使用绘图控件MsChart的方法
1. 使用setupmschart.exe将MSCHRT20.OCX注册到系统: http://download.csdn.net/detail/xiaowh001/8892147 2. 在vs201 ...
- modern.IE
1.主要测试IE浏览器的兼容性问题 2.网站上提供各种虚拟机来表现兼容性问题,可以像平常一样使用浏览器测试,但是中国访问速度比较慢 3.网址:http://loc.modern.ie/zh-cn/vi ...
- LDa 通俗理解
LDA理解以及源码分析(一) http://blog.csdn.net/pirage/article/details/50239125 LDA在主题建模中的应用,需要知道以下几点: 文档集中的word ...