答: 在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

相关文章:

  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2021-09-03
  • 2021-05-12
  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
猜你喜欢
  • 2021-07-16
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案