Table of contents
Download the dependent environment about Docker
Enter the following command to install the dependent environment and press Enter
yum -y install yum-utils device-mapper-persistent-datalvm2
Install Docker
- The following command is to cache a copy of the software package information locally in advance to improve the speed of searching and installing software
yum makecache fast
- After improving the installation speed, install docker related. (docker-ce community edition and ee is enterprise edition)
yum install docker-ce docker-ce-cli containerd.io
Start, and set it to start automatically at boot, test
- Start the Docker service:
systemctl start docker
- To set autostart at boot:
systemctl enable docker
Open the remote API access port
- Modification
docker.service
:vi /usr/lib/systemd/system/docker.service
- Find the following content and add
-H 0.0.0.0:2375
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H 0.0.0.0:2375
- Reload configuration and restart docker
systemctl daemon-reload && systemctl restart docker
- verify:
curl -i http://127.0.0.1:2375/info
Log in to the harbor warehouse
docker login harbor.xxx.com -u xxx -p xxx