pycharm使用docker中的环境
2024-06-23 本文已影响0人
田丰w
pycharm 使用 docker 中的环境
不要使用docker 的 python interpreter, 不能安装新包
推荐在 docker 中配置 ssh server,使用 ssh interpreter

一些问题
- 新安装的包 pycharm 不能识别时,右下角切换 python 解释器来触发包的重新扫描

-
使用 systemd 作为容器的启动 entrypoint, 而不是用 bash 启动, 因为默认安装的 sshd 是由 systemd 拉起的
-
当宿主机也存在sshd服务时, docker 里的 sshd 服务无法启动, 暂时没找到解法. 因自己的宿主机就是pycharm运行的os(Ubuntu), 我把宿主的 sshd 服务停掉了(暂时没用)