在docker build过程中执行apt-get update时报错"Could not connect to archive.ubuntu.com:80"如何处理?
答: 在Dockerfile中添加以下语句来配置apt-get
- 从当前的系统中复制/etc/apt/sources.list以及/etc/apt/apt.conf到Dockerfile所处的目录中
$ cp /etc/apt/sources.list ./
$ cp /etc/apt.conf ./
- 将以下语句加入Dockerfile中
$ cat Dockerfile
COPY sources.list /etc/apt/sources.list
COPY apt.conf /etc/apt/apt.conf