Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if you can't connect to Docker using Pycharm

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use Pycharm to connect to Docker. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.

problem description

After following the steps to create Docker on Ubuntu, start Pycharm to connect Docker using plugins, unable to connect.

Analyze and solve Docker container problems

After connecting with Xshell, I found that docker container is working properly.

Docker containers restrict IP

By default, Docker daemons can only respond to client requests from local hosts. To allow remote client requests, TCP snooping needs to be turned on in the configuration file.

Edit the configuration file/etc/systemd/system/multi-user.target.wants/docker.service

Add-H tcp://0.0.0.0 after the environment variable ExecStart to allow client connections from any IP.

[Service]Type= notifyExecuStart = /usr/bin/dockerd -H fd:// -H tcp: 0.0.0ExecuRelod = /usr/kill -s HUP MAINPID Restart Docker Daemon

instructions

systemctl daemon-reload systemctl restart docker.service To communicate with a remote server docker -H Server IP address info

-H is used to specify the server host, info subcommand is used to view Docker server information

About "how to use Pycharm can not connect Docker" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report