Docker
Install Docker
-
Download the Docker installation package
- Servers with Internet Access
- Servers without Internet Access
wget https://pdpublic.mingdao.com/private-deployment/offline/common/docker-29.9.3.tgz# Docker installation package download link, after downloading, upload to the deployment serverhttps://pdpublic.mingdao.com/private-deployment/offline/common/docker-29.9.3.tgz -
Extract the Docker installation package
tar -zxvf docker-29.9.3.tgz -
Move the files to the binary directory
mv -f docker/* /usr/local/bin/ -
Create the Docker configuration directory
mkdir -p /etc/docker/ -
Create the Docker configuration file
The default Docker data directory is /data/docker. To change it, modify the
data-rootvalue indaemon.json.cat > /etc/docker/daemon.json <<EOF{"registry-mirrors": ["https://uvlkeb6d.mirror.aliyuncs.com"],"data-root": "/data/docker","max-concurrent-downloads": 10,"default-ulimits": {"nofile": {"Name": "nofile","Soft": 102400,"Hard": 102400}},"exec-opts": ["native.cgroupdriver=cgroupfs"],"storage-driver": "overlay2","default-address-pools":[{"base":"172.80.0.0/16","size":24}],"log-driver": "json-file","log-opts": {"max-size": "1g","max-file": "5"}}EOF -
Configure systemd to manage Docker
cat > /etc/systemd/system/docker.service <<EOF[Unit]Description=DockerAfter=network-online.targetWants=network-online.target[Service]Type=notifyExecStart=/usr/local/bin/dockerdExecReload=/bin/kill -s HUP \$MAINPIDLimitNOFILE=102400LimitNPROC=infinityLimitCORE=0TimeoutStartSec=0Delegate=yesKillMode=processRestart=on-failureStartLimitBurst=3StartLimitInterval=60s[Install]WantedBy=multi-user.targetEOF -
Start Docker
systemctl daemon-reloadsystemctl start dockersystemctl enable docker
Install Docker Compose
-
Download Docker Compose
- Servers with Internet Access
- Servers without Internet Access
wget https://pdpublic.mingdao.com/private-deployment/offline/common/docker-compose-linux-x86_64# After downloading, upload it to the deployment server.https://pdpublic.mingdao.com/private-deployment/offline/common/docker-compose-linux-x86_64 -
Create the Docker CLI plugin directory
mkdir -p /usr/local/lib/docker/cli-plugins -
Move the file to the plugin directory
mv docker-compose-linux-x86_64 /usr/local/lib/docker/cli-plugins/docker-compose -
Grant execute permission
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose -
Create a symbolic link for compatibility with the legacy docker-compose command
ln -s /usr/local/lib/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose -
Verify the installation
docker compose versiondocker-compose version