From a56aea5df35bccfe0f214ab1f0d7429ae061d3cf Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 4 Aug 2016 14:37:38 +0800 Subject: [PATCH] update openwrt --- openwrt/Dockerfile.bcm2708 | 1 + openwrt/Dockerfile.bcm2710 | 1 + openwrt/Dockerfile.mt7628 | 1 + openwrt/README.md | 27 +++++++++++++++++---------- openwrt/docker-compose.yml | 26 +++++++++++++++++++++++--- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/openwrt/Dockerfile.bcm2708 b/openwrt/Dockerfile.bcm2708 index 0d21763..3936ea7 100644 --- a/openwrt/Dockerfile.bcm2708 +++ b/openwrt/Dockerfile.bcm2708 @@ -18,4 +18,5 @@ RUN set -xe \ && ln -s ${OPENWRT_IMG} img \ && ln -s ${OPENWRT_SDK} sdk \ && cd sdk \ + && ln -s /data bin \ && ./scripts/feeds update -a diff --git a/openwrt/Dockerfile.bcm2710 b/openwrt/Dockerfile.bcm2710 index fc6bb9c..91ad2d8 100644 --- a/openwrt/Dockerfile.bcm2710 +++ b/openwrt/Dockerfile.bcm2710 @@ -18,4 +18,5 @@ RUN set -xe \ && ln -s ${OPENWRT_IMG} img \ && ln -s ${OPENWRT_SDK} sdk \ && cd sdk \ + && ln -s /data bin \ && ./scripts/feeds update -a diff --git a/openwrt/Dockerfile.mt7628 b/openwrt/Dockerfile.mt7628 index ff4cb91..e3e1ac7 100644 --- a/openwrt/Dockerfile.mt7628 +++ b/openwrt/Dockerfile.mt7628 @@ -18,4 +18,5 @@ RUN set -xe \ && ln -s ${OPENWRT_IMG} img \ && ln -s ${OPENWRT_SDK} sdk \ && cd sdk \ + && ln -s /data bin \ && ./scripts/feeds update -a diff --git a/openwrt/README.md b/openwrt/README.md index d8d897d..d1df2b7 100644 --- a/openwrt/README.md +++ b/openwrt/README.md @@ -7,22 +7,27 @@ Build OpenWrt Package/Image For Raspberry Pi ```yaml openwrt: - image: vimagick/openwrt:bcm2710 - container_name: openwrt_bcm2710 - command: sleep inf - volumes: - - ./data/bcm2710:/data + image: vimagick/openwrt + command: sleep infinity + environment: + - TERM=xterm restart: unless-stopped + +bcm2708: + extends: + service: openwrt + image: vimagick/openwrt:bcm2708 + volumes: + - ./data/bcm2708:/data ``` ## up and running ```bash -$ docker-compose up -d -$ docker-compose exec openwrt bash +$ docker-compose up -d bcm2708 +$ docker-compose exec bcm2708 bash >>> cd ~/sdk >>> sudo chmod 777 /data ->>> ln -s /data bin >>> ./scripts/feeds update -a >>> ./scripts/feeds list @@ -30,14 +35,12 @@ $ docker-compose exec openwrt bash >>> ./scripts/feeds install vim tmux htop >>> make V=s ->>> export TERM=xterm >>> sudo apt install -y asciidoc xmlto >>> git clone https://github.com/shadowsocks/openwrt-shadowsocks.git package/shadowsocks-libev >>> vi package/shadowsocks-libev/Makefile - Package/shadowsocks-libev-spec = $(call Package/shadowsocks-libev/Default,openssl,(OpenSSL),+libopenssl +libpthread +ipset +ip) + Package/shadowsocks-libev-spec = $(call Package/shadowsocks-libev/Default,openssl,(OpenSSL),+libopenssl +libpthread +ipset +ip +iptables-mod-tproxy +zlib) >>> make menuconfig # Network ▷ shadowsocks-libev-spec ▷ Save ▷ Exit ->>> make package/zlib/compile V=s >>> make package/shadowsocks-libev/compile V=s >>> tree -dF /data/ @@ -58,3 +61,7 @@ $ docker-compose exec openwrt bash $ opkg install tmux_1.9a-1_brcm2708.ipk htop_1.0.3-1_brcm2708.ipk $ tmux new htop ``` + +## read more + +- diff --git a/openwrt/docker-compose.yml b/openwrt/docker-compose.yml index 5505a19..74966bf 100644 --- a/openwrt/docker-compose.yml +++ b/openwrt/docker-compose.yml @@ -1,7 +1,27 @@ openwrt: + image: vimagick/openwrt + command: sleep infinity + environment: + - TERM=xterm + restart: unless-stopped + +bcm2708: + extends: + service: openwrt + image: vimagick/openwrt:bcm2708 + volumes: + - ./data/bcm2708:/data + +bcm2710: + extends: + service: openwrt image: vimagick/openwrt:bcm2710 - container_name: openwrt_bcm2710 - command: sleep inf volumes: - ./data/bcm2710:/data - restart: unless-stopped + +mt7628: + extends: + service: openwrt + image: vimagick/openwrt:mt7628 + volumes: + - ./data/mt7628:/data