Merge pull request #2019 from zuohuadong/canary

chore(server-setup.ts) support opencloudos
This commit is contained in:
Mauricio Siu
2025-06-22 07:37:22 +02:00
committed by GitHub

View File

@@ -116,7 +116,7 @@ if [ "$OS_TYPE" = 'amzn' ]; then
fi fi
case "$OS_TYPE" in case "$OS_TYPE" in
arch | ubuntu | debian | raspbian | centos | fedora | rhel | ol | rocky | sles | opensuse-leap | opensuse-tumbleweed | almalinux | amzn | alpine) ;; arch | ubuntu | debian | raspbian | centos | fedora | rhel | ol | rocky | sles | opensuse-leap | opensuse-tumbleweed | almalinux | opencloudos | amzn | alpine) ;;
*) *)
echo "This script only supports Debian, Redhat, Arch Linux, Alpine Linux, or SLES based operating systems for now." echo "This script only supports Debian, Redhat, Arch Linux, Alpine Linux, or SLES based operating systems for now."
exit exit
@@ -367,7 +367,7 @@ const installUtilities = () => `
DEBIAN_FRONTEND=noninteractive apt-get update -y >/dev/null DEBIAN_FRONTEND=noninteractive apt-get update -y >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y unzip curl wget git git-lfs jq openssl >/dev/null DEBIAN_FRONTEND=noninteractive apt-get install -y unzip curl wget git git-lfs jq openssl >/dev/null
;; ;;
centos | fedora | rhel | ol | rocky | almalinux | amzn) centos | fedora | rhel | ol | rocky | almalinux | opencloudos | amzn)
if [ "$OS_TYPE" = "amzn" ]; then if [ "$OS_TYPE" = "amzn" ]; then
dnf install -y wget git git-lfs jq openssl >/dev/null dnf install -y wget git git-lfs jq openssl >/dev/null
else else
@@ -418,6 +418,16 @@ if ! [ -x "$(command -v docker)" ]; then
systemctl start docker >/dev/null 2>&1 systemctl start docker >/dev/null 2>&1
systemctl enable docker >/dev/null 2>&1 systemctl enable docker >/dev/null 2>&1
;; ;;
"opencloudos")
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo >/dev/null 2>&1
dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin >/dev/null 2>&1
if ! [ -x "$(command -v docker)" ]; then
echo " - Docker could not be installed automatically. Please visit https://docs.docker.com/engine/install/ and install Docker manually to continue."
exit 1
fi
systemctl start docker >/dev/null 2>&1
systemctl enable docker >/dev/null 2>&1
;;
"alpine") "alpine")
apk add docker docker-cli-compose >/dev/null 2>&1 apk add docker docker-cli-compose >/dev/null 2>&1
rc-update add docker default >/dev/null 2>&1 rc-update add docker default >/dev/null 2>&1