Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果alpine包依赖下载缓慢的话可以试 #2

Open
itfen opened this issue Feb 3, 2021 · 0 comments
Open

如果alpine包依赖下载缓慢的话可以试 #2

itfen opened this issue Feb 3, 2021 · 0 comments

Comments

@itfen
Copy link

itfen commented Feb 3, 2021

Step 3/15 : ENV HOME /root
---> Running in 6160fda9f086
---> 483c34765823
Removing intermediate container 6160fda9f086
Step 4/15 : RUN apk update && apk add --no-cache git gcc libc-dev make automake autoconf libtool pcre pcre-dev zlib zlib-dev openssl-dev wget vim --repository https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/main
---> Running in 3adbe2b7c3e5

fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
可以看到上面还是到了alpinelinux.org中下载,而这里会很缓慢。。。。

可以试着在 安装准备前增加下面这段语句

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

结果如下:

Step 5/16 : RUN apk update && apk add --no-cache git gcc libc-dev make automake autoconf libtool pcre pcre-dev zlib zlib-dev openssl-dev wget vim --repository https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.6/main
---> Running in 55a80ed1aef0

fetch http://mirrors.ustc.edu.cn/alpine/v3.6/main/x86_64/APKINDEX.tar.gz

这样就跳到ustc上下载了 会快很多

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant