鏡像從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
