- 利用runner做前端依赖下载工作,runner放香港等海外机器,下载率相对较高
- 需要npm yarn ssh git基础环境
- 安装git时候报错如下
# 基础镜像node:12.18.0-alpine3.11
$ apk --no-cache add git
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
ERROR: unsatisfiable constraints:
git (missing):
required by: world[git]
解决:
- 看网上答复修改无效,但发现原因是dns问题,修改runner所在机的dns,本次为ubuntu,修改/etc/docker/daemon.json无效,需修改/etc/resolv.conf
root@xxx:~# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 8.8.8.8
nameserver 114.114.114.114
nameserver 127.0.0.53
nameserver 223.5.5.5
options edns0
- 重跑CI,基础环境无报错