Skip to content

Commit 96f684d

Browse files
committed
chore(workflow): add k3s mirrors
1 parent 2d5e283 commit 96f684d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

_scripts/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ function clean_before_exit {
2020
trap clean_before_exit EXIT
2121

2222
if [[ "${INSTALL_K3S_MIRROR}"=="cn" ]] ; then
23+
mkdir -p /etc/rancher/k3s
24+
cat << EOF > "/etc/rancher/k3s/registries.yaml"
25+
mirrors:
26+
"docker.io":
27+
endpoint:
28+
- "docker.mirrors.ustc.edu.cn"
29+
- "http://hub-mirror.c.163.com"
30+
- "https://registry-1.docker.io"
31+
EOF
2332
k3s_install_url="http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh"
2433
else
2534
k3s_install_url="https://get.k3s.io"

0 commit comments

Comments
 (0)