Docker ubuntu apt-get更换国内源解决Dockerfile构建速度过慢
创建Dockerfile并且更新apt源在Dockerfile中添加如下两句代码:RUNsed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.listRUNapt-get clean更新apt源的Dockerfile如下:FROM ubuntu:latestMAINTAINER i...
·
创建Dockerfile并且更新apt源
在Dockerfile中添加如下两句代码:
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean
更新apt源的Dockerfile如下:
FROM ubuntu:latest
MAINTAINER itdream "itdream6@163.com"
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update
更多推荐
已为社区贡献2条内容
所有评论(0)