Files
LinuxMirrors/docs/other/example2.md

23 lines
573 B
Markdown
Raw Normal View History

2025-10-05 10:01:15 +08:00
``` 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 \
2025-10-14 02:16:16 +08:00
--ignore-backup-tips \
--lang auto
2025-10-05 10:01:15 +08:00
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
```