Docker ubuntu apt-get更换国内源解决Dockerfile构建速度过慢
2019-06-20 23:08
2943 查看
创建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 kk "kk@qq.com" RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list RUN apt-get clean RUN apt-get update
相关文章推荐
- 关于ubuntu 更换成国内源之后,apt-get 出现The following packages have unmet dependencies:的解决方法
- Ubuntu apt-get 更换源,以提高下载速度
- Dockerfile执行命令报错"The command '/bin/sh -c apt-get install -y git' returned a non-zero code: 100"解决
- Ubuntu 16.04 apt-get更换为国内阿里云源
- ubuntu切换国内镜像源,加速apt-get下载速度
- Ubuntu 16.04 apt-get更换为国内阿里云源
- Ubuntu apt-get和pip国内源更换
- Ubuntu--ubuntu apt-get update更换源也无法解决的一种情况
- 在Docker中解决ubuntu中apt-get update使用的方法
- 关于在ubuntu平台下使用apt-get命令下载速度太慢的问题解决
- apt-get在基于Ubuntu基础镜像Dockerfile中的常见用法
- Ubuntu 16.04 apt-get更换为国内阿里云源
- Ubuntu apt-get update 无法更新速度是0的情况解决方法
- Ubuntu apt-get 更换源,以提高下载速度
- Ubuntu 16.04 apt-get更换为国内阿里云源
- Ubuntu上出现无法获得锁“Could not get lock /var/lib/apt/lists/lock”问题的解决
- 解决代理 Ubuntu 命令行apt-get 联网问题
- 解决ubuntu无法apt-get的问题
- ubuntu下sudo apt-get update Sources 404 Not Found [IP: 91.189.92.200 80]解决办法
- Ubuntu14.0下解决Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?