mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-05 08:50:25 +08:00
22 lines
551 B
Markdown
22 lines
551 B
Markdown
|
|
``` bash
|
||
|
|
# !/bin/bash
|
||
|
|
function install_docker() {
|
||
|
|
if command -v docker &>/dev/null; then
|
||
|
|
return
|
||
|
|
fi
|
||
|
|
|
||
|
|
bash <(curl -sSL https://${script_host}/docker.sh) \
|
||
|
|
--install-latest true \
|
||
|
|
--ignore-backup-tips
|
||
|
|
|
||
|
|
if command -v docker &>/dev/null; then
|
||
|
|
echo -e "\n# Docker installation successful.\n# Please run this script again manually after installation."
|
||
|
|
exit 0
|
||
|
|
else
|
||
|
|
echo -e "\n# Docker installation failed.\n# Please check the error message above."
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
}
|
||
|
|
|
||
|
|
install_docker
|
||
|
|
```
|