zoukankan      html  css  js  c++  java
  • docker安装openwrt镜像(不完美案例)

    镜像从http://downloads.openwrt.org/releases下载
    注意选择generic-rootfs.tar.gz这种类型的镜像

    使用docker import导入镜像,导入后可以使用docker images查看看

    docker import http://downloads.openwrt.org/releases/17.01.5/targets/x86/generic/lede-17.01.5-x86-generic-generic-rootfs.tar.gz lede-17.01.5 
    docker images


    进入lede里的shell交互环境
    docker run -i -t lede-17.01.5 /bin/ash

    更新opkg
    opkg update

    尝试启动/usr/sbin/uhttpd,报错了,提示Error: No sockets bound, unable to continue 

    / # /usr/sbin/uhttpd
    Error: No sockets bound, unable to continue


    添加参数 
    uhttpd -p 80 -h /www 

    好了,可以启动了,现在用浏览器访问一下ip地址

    先ifconfig列出lede的ip

    / # ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02  
              inet addr:172.17.0.2  Bcast:0.0.0.0  Mask:255.255.0.0
              inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1159 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1412 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1603917 (1.5 MiB)  TX bytes:120743 (117.9 KiB)

    嗯,有问题...浏览器页面是这样的

    /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/'.
    The called action terminated with an exception:
    /usr/lib/lua/luci/util.lua:623: Unable to establish ubus connection
    stack traceback:
    	[C]: in function 'assert'
    	/usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch'
    	/usr/lib/lua/luci/dispatcher.lua:141: in function 
    

    宣告失败,貌似是ubus的问题,不知道怎么搞...

    参考链接:https://wiki.openwrt.org/doc/howto/docker_openwrt_image

  • 相关阅读:
    51nod 1163 最高的奖励
    51nod 1191 消灭兔子
    51nod 2538 二三排列
    node做渲染服务器的实现
    gulp静态服务器的搭建
    canvas中裁切(橡皮檫)的应用--探照灯,点击去除遮罩
    canvas中图片、视频的加载(截图、切片)
    canvas中笔触基础知识
    Gitee的使用流程
    gulp的使用
  • 原文地址:https://www.cnblogs.com/sherlock-merlin/p/9395780.html
Copyright © 2011-2022 走看看