开启docker http远程访问
参考在ubuntu16.10上开启docker 17.03.0-ce的http远程访问
1. 创建/etc/systemd/system/docker.service.d目录
sudo mkdir /etc/systemd/system/docker.service.d
2. sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
3.刷新配置
sudo systemctl daemon-reload
4. 重新启动docker守护进程
sudo systemctl restart docker
pycharm配置 Docker(settings->Build,Execution,Deployment)
配置完点击右下角的 Apply
配置 project的解释器 (settings->Project->Project Interpreter)
- 选择add remote
- 点击docker
- server选择刚刚创建的Docker
4.静等一会
4.其余的默认选择 ok