当前位置:首页 > linux运维

使用自定义docker加速地址下载镜像

14324472932年前 (2024-11-17)linux运维2172

1.例如加速地址为:

https://docker.1ms.run

2.配置docker加速地址

cat > /etc/docker/daemon.json <<EOF
> {"registry-mirrors": ["https://docker.1ms.run"]}
> EOF

3.重启docker让加速地址生效

systemctl  daemon-reload 
systemctl  start  docker.service

4.使用加速地址下载docker

docker pull docker.1ms.run/hello-world   #拉取镜像
docker tag docker.1ms.run/hello-world hello-world   #拉取镜像自定义文件名

5.可以使用该开源项目搭建docker加速项目:https://github.com/jonssonyan/cf-workers-proxy

扫描二维码推送至手机访问。

版权声明:本文由爱开发博客发布,如需转载请注明出处。

本文链接:https://www.lovekf.cn/?id=36

分享给朋友:

“使用自定义docker加速地址下载镜像” 的相关文章

自建内网穿透服务器-基于Docker的FRP内网穿透部署

创建配置文件# 创建存放目录 sudo mkdir /etc/frp # 创建frps.ini文件 vim /etc/frp/frps.tomlfrps.toml文件配置内容[common] # 监听端口 bind_port&nb…

CentOS优化手册

1. 调整 journal 存储设置( 解决systemd 或者 systemd-journald 进程占用大量 CPU 或内存资源的情况)编辑 /etc/systemd/journald.conf 文件,并更改 Storage 参数。例如,将其从 persistent 改为 volatile 或…

云豹直播搭建过程中node聊天接口无法使用的修复方案

1.云豹node服务原始依赖于http协议,目前浏览器已经不支持http和https混合使用,所以需要为node.js支持https. 解决思路如下: 1.使用nginx进行端口转发,将域名转发至云豹的node.js端口19967端口。 2.如何更新ssl证书(宝塔创建一个站点,域名为聊天服务器地址…

linux基线配置脚本(自己更具需求书写,并不适合所有人)

支持内容:1.检查更新系统时间。 ```bash#!/bin/bash 更新系统时间(假设你有NTP服务或者可以访问互联网时间服务器)echo “Updating system time using NTP…”sudo timedatectl set-ntp true 检查是否成功设置…

宝塔shell脚本删除日期生成的目录

#!/bin/bash # 定义要查找的目录路径 TARGET_DIR="/www/xxxxxx/public/tempipg" find "$TARGET_DIR" -type d -mtime +3 | grep -E "${TARGET_DIR}/[0-9]{8}$" | while re…

linux宽带速度测试

```bashwget -O /dev/null http://speed.hetzner.de/100MB.bin –progress=bar:force https://nbg1-speed.hetzner.com(德国纽伦堡) https://fsn1-speed.hetzner.com(…

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。