docker 切换镜像源

Dockerfile build 报错了:

WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)
WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community:

这个问题是默认的 Alpine Linux 的软件包镜像源无法直接访问,有些包无法下载导致的,可以更换为国内的镜像源

新版的 docker 的配置文件 /etc/docker/daemon.json 中可以更改镜像源:

 {
     "registry-mirrors": ["https://registry.docker-cn.com"]
   }

Docker 官方中国区

https://registry.docker-cn.com

网易

http://hub-mirror.c.163.com

ustc

https://docker.mirrors.ustc.edu.cn

相关推荐

  1. docker 切换镜像

    2023-12-05 19:40:04       50 阅读
  2. docker镜像配置

    2023-12-05 19:40:04       26 阅读
  3. node NPM镜像查看和切换

    2023-12-05 19:40:04       33 阅读
  4. dockerfile更改docker镜像

    2023-12-05 19:40:04       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-05 19:40:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-05 19:40:04       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-05 19:40:04       82 阅读
  4. Python语言-面向对象

    2023-12-05 19:40:04       91 阅读

热门阅读

  1. 前端实现token无感刷新的原因和步骤

    2023-12-05 19:40:04       53 阅读
  2. LeetCode刷题笔记第71题:简化路径

    2023-12-05 19:40:04       48 阅读
  3. sql 条件统计,count+if+sum

    2023-12-05 19:40:04       46 阅读
  4. 解析sql的数据流向关系获取

    2023-12-05 19:40:04       35 阅读
  5. Diary16-Word标题与目录设计

    2023-12-05 19:40:04       58 阅读
  6. pwgen 随机密码生成

    2023-12-05 19:40:04       53 阅读