docker installation and remote access

For installation of other systems, please go here

CentOS Docker installation

Automatically install using the official installation script

The installation command is as follows:

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

You can also use the domestic daocloud one-click installation command:

curl -sSL https://get.daocloud.io/docker | sh

Start Docker.

$ sudo systemctl start docker

Verify that Docker Engine-Community is installed correctly by running the hello-world image.

$ sudo docker run hello-world

Uninstall docker

Remove the installation package:

yum remove docker-ce

Delete images, containers, configuration files, etc.:

rm -rf /var/lib/docker

remote access

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

Find ExecStart and add -H tcp://0.0.0.0:2375 at the end, as shown in the figure below

3. Restart docker

 systemctl daemon-reload
 systemctl start docker

4. Open port

firewall-cmd --zone=public --add-port=2375/tcp --permanent  

Guess you like

Origin blog.csdn.net/qq_37544675/article/details/121405900