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的更多相关文章
随机推荐
- sdk manager 代理,解决下载速度慢的问题
原文:http://blog.csdn.net/android_panda/article/details/18598883 地址:mirrors.neusoft.edu.cn 端口:80 要勾选:F ...
- redis3.0自带集群配置
参考 http://redis.readthedocs.org/en/latest/topic/cluster-tutorial.html http://yindashan.github.io/blo ...
- vim自定义配置之代码折叠
vimConfig/plugin/codeFold-setting.vim "--fold setting-- set foldmethod=syntax " 用语法高亮来定义折叠 ...
- js 获取下一秒 时间
function getNextTime(start){ //var start = '09:30:00'; var _s = new Date(); var startDate = _s.getFu ...
- 【CentOS 6.5】 Qt Creator 启动失败
在CentOS 6.5中 点击 [应用程序]->[编程]->Qt Creator , 没有反应,Creator没有启动,转而进入Shell cd /opt/Qt5.2.1/Tools/Qt ...
- JQ与JS等价代码
选择器 //jquery var els = $(".el"); //原生方法 var els = document.querySelectorAll(".el" ...
- 如何连接并处理 sdf 数据库文件(便捷数据库处理)
如何连接并处理 sdf 数据库文件 SqlCeConnection cc = new SqlCeConnection(); DataTable dt = new DataTable(); ...
- String(byte[] bytes, Charset charset) 和 getBytes() 使用
转自:https://techbirds.iteye.com/blog/1855960 @Test public void testBytes(){ //字节数 //中文:ISO:1 GBK:2 UT ...
- Java Graphics 2D绘制图片 在Liunx上乱码
绘图的代码工具类 package com.gwzx.framework.captcha; import java.awt.Color; import java.awt.Font; import jav ...
- 30. Substring with Concatenation of All Words (String; HashTable)
You are given a string, s, and a list of words, words, that are all of the same length. Find all sta ...