- 下載下傳安裝包上傳到檔案夾
-
配置檔案:[Unit]
Descriptinotallow=Docker Application Container Engine
Documentatinotallow=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
- 安裝檔案:
#!/bin/sh
echo '解壓tar包...'
tar -xvf $1
echo '将docker目錄移到/usr/bin目錄下...'
cp docker/* /usr/bin/
echo '将docker.service 移到/etc/systemd/system/ 目錄...'
cp docker.service /etc/systemd/system/
echo '添加檔案權限...'
chmod +x /etc/systemd/system/docker.service
echo '重新加載配置檔案...'
systemctl daemon-reload
echo '啟動docker...'
systemctl start docker
echo '設定開機自啟...'
systemctl enable docker.service
echo 'docker安裝成功...'
docker -v
- https://blog.csdn.net/zhiboqingyun/article/details/113172501
- https://blog.csdn.net/hcyxsh/article/details/125218838