Set it as the homepageBookmark this site

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย

 Retrieve your password
 Sign up now
img_loading
Intelligent detection

QQ login

Just one step, get started quickly

Search
广告投放联系QQ68610888广告投放联系QQ68610888
Tips - Enshan Wireless Forum - Powered by Discuz! 7805| | Jiangsu Provincial Internet Harmful Information Reporting Center Report mailbox: js12377 | @jischina.com.cn Report Tel: 025-88802724 Bad content report mailbox on this site: 68610888@qq.com 6

解决openwrt下解决docker的换源的问题

[复制链接]
发表于 2024-1-11 00:59 | 显示全部楼层 |阅读模式
Back to top

但是搜索出来的结果都是去修改/etc/docker目录下的配置文件,但是我的系统里就没这个文件夹
Buy points (download add-ons and level up quickly)
Just one step, get started quickly
Switch to a narrow version

-----------------------------------------

{ "data-root": "\/opt\/docker\/", "log-level": "warn", "iptables": true, "registry-mirrors": ["https://hub-mirror.c.163.com","http://mirrors.aliyun.com/"] }


----------------------------------------------------------
上面是json文件的内容,保存后
找到 /etc/init.d目录
在这个目录里有个dockerd文件,编辑它,其实就是  这里面的  其中一行  procd_set_param command /usr/bin/dockerd --config-file="/etc/docker/daemon.json"

原来的是  --config-file= 后面没记住 是个变量

我直接改成 procd_set_param command /usr/bin/dockerd --config-file="/etc/docker/daemon.json"
-----------------------------------------------------------

start_service() {
        local nofile=$(cat /proc/sys/fs/nr_open)

        process_config

        procd_open_instance
        procd_set_param stderr 1
        if [ -z "${DOCKERD_CONF}" ]; then
                procd_set_param command /usr/bin/dockerd
        else
                procd_set_param command /usr/bin/dockerd --config-file="/etc/docker/daemon.json"
        fi
        procd_set_param limits nofile="${nofile} ${nofile}"
        procd_close_instance
}

-------------------------------------------
If in doubt, add an administrator QQ86788181
Points purchase (download add-ons and level up quickly)

发表于 2024-4-20 14:47 | 显示全部楼层
没用,"/etc/docker/daemon.json" docker重启的时候  配置文件会被重写
发表于 2024-4-20 14:51 | 显示全部楼层
Automatic login
发表于 2025-1-15 11:42 | 显示全部楼层
直接在配置里面设置加速地址就行, 不用用命令行新建配置文件

Previous

参与人数 1Please enter your search +1 login forum
utiao + 1 Sorry, you're not logged in and don't have permission to reply to this section

查看全部评分

发表于 2025-2-24 10:56 | 显示全部楼层
View »
发表于 2025-2-24 11:27 | 显示全部楼层
/etc/init.d/dockerd restart
Go back to the section | 显示全部楼层
试了一圈都没用,哎

本版积分规则

Shut down

Welcome to the Enshan Wireless Forum

Only talk about technology, don't talk about politics! Don't spread rumors! For you and for others.
Only talk about technology, don't talk about politics! (Click for details) Remember not to spread rumors at will, just live your life in peace, for your own good and for the good of everyone. Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.

View »

If in doubt, add an administrator QQ86788181|Mobile version|Little dark house|Archiver|Enshan Wireless Forum (Changzhou Enshan Computer Development Co., Ltd. All rights reserved) ( Su ICP No. 05084872 )

GMT+8, 2025-7-11 09:23

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

快速回复 返回顶部 返回列表