ES modify the IK Word Source Source MYSQL Hot Word Dynamic Update (report an error to solve X3) A problem that

2023-03-16  

  • Client, Windows, Python 3.5, pycharm
  • Server, CentOS7.2, Docker 18.09.0

1. Docker open remote connection, modify /usr/lib/systemd/system/docker.service files.

vim /usr/lib/systemd/system/docker.service 

Find [Service] in the file

[Service]  
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock  

2. After the modification, Docker needs to read the configuration file and restart the Docker service.

 systemctl daemon-reload
 systemctl restart docker

3. Open the docker remote service connection port. Note that this machine system is CentOS7.

Firewall-CMD-Zone = Public-ADD-PORT = 2375/TCP-PerManent 
 Firewall-CMD-RELOAD 
 #Can be opened by the following command to see if 2375/TCP is turned on. 
 Firewall-CMD-List-ALL

在这里插入图片描述
4. Install docker in pycharm

pip install docker

In setting, check whether the docker is installed. If not, search in the Install Package after searching in the+number on the right.
在这里插入图片描述
5. Test connection

import docker
import json
client = docker.DockerClient(base_url='tcp://192.168.102.11:2375')
cls = client.containers.run("ubuntu", "echo hello world")

source

Related Posts

java.io file

vs2010 method of connecting MySQL database

Database Basic Knowledge SCP

linux mount command mount detailed explanation

ES modify the IK Word Source Source MYSQL Hot Word Dynamic Update (report an error to solve X3) A problem that

Random Posts

8. Spring Cloud service fault tolerance, Hystrix (FINCHLEY version)

linux mount command mount detailed explanation

vs2010 method of connecting MySQL database

c#, enter the grades of any students, and use bubbling sorting to achieve sorting from small to small. In

.NET interface control DEVEXPRESS new release V18.2.6 | Attack download