From 1114c12aa947995dd2c6265f36eda41778fdce7a Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 22 Jul 2016 18:28:32 +0800 Subject: [PATCH] update openwrt --- openwrt/Dockerfile.mt7628 | 48 ++++++++++++++++++++++++++++++++++++++ openwrt/README.md | 5 ++-- openwrt/docker-compose.yml | 1 + 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 openwrt/Dockerfile.mt7628 diff --git a/openwrt/Dockerfile.mt7628 b/openwrt/Dockerfile.mt7628 new file mode 100644 index 0000000..061cfb9 --- /dev/null +++ b/openwrt/Dockerfile.mt7628 @@ -0,0 +1,48 @@ +# +# Dockerfile for openwrt +# + +FROM debian:jessie +MAINTAINER kev + +RUN set -xe \ + && apt-get update \ + && apt-get install -y build-essential \ + curl \ + file \ + gawk \ + gettext \ + git \ + libncurses5-dev \ + libssl-dev \ + mercurial \ + python \ + subversion \ + sudo \ + tree \ + unzip \ + wget \ + xsltproc \ + zlib1g-dev \ + && useradd -m openwrt \ + && echo 'openwrt ALL=NOPASSWD: ALL' > /etc/sudoers.d/openwrt + +USER openwrt +WORKDIR /home/openwrt + +ENV OPENWRT_VERSION=trunk +ENV OPENWRT_URL=https://downloads.openwrt.org/snapshots/trunk/ramips/mt7628 +ENV OPENWRT_IMG=OpenWrt-ImageBuilder-ramips-mt7628.Linux-x86_64 +ENV OPENWRT_SDK=OpenWrt-SDK-ramips-mt7628_gcc-5.3.0_musl-1.1.14.Linux-x86_64 +ENV OPENWRT_IMG_URL=${OPENWRT_URL}/${OPENWRT_IMG}.tar.bz2 +ENV OPENWRT_SDK_URL=${OPENWRT_URL}/${OPENWRT_SDK}.tar.bz2 + +RUN set -xe \ + && curl -sSL ${OPENWRT_IMG_URL} | tar xj \ + && curl -sSL ${OPENWRT_SDK_URL} | tar xj \ + && ln -s ${OPENWRT_IMG} img \ + && ln -s ${OPENWRT_SDK} sdk \ + && cd sdk \ + && ./scripts/feeds update -a + +CMD ["bash"] diff --git a/openwrt/README.md b/openwrt/README.md index 555613e..ef9bbe3 100644 --- a/openwrt/README.md +++ b/openwrt/README.md @@ -29,11 +29,12 @@ $ docker-compose exec openwrt bash >>> ./scripts/feeds install vim tmux htop >>> make V=s ->>> sudo apt install asciidoc >>> export TERM=xterm +>>> sudo apt install asciidoc xmlto +>>> ./scripts/feeds install libopenssl zlib >>> git clone https://github.com/shadowsocks/openwrt-shadowsocks.git package/shadowsocks-libev >>> make menuconfig ->>> make package/shadowsocks-libev/compile V=99 +>>> make package/shadowsocks-libev/compile V=s >>> tree -dF /data/ /data/ diff --git a/openwrt/docker-compose.yml b/openwrt/docker-compose.yml index 7c5d80b..b301c01 100644 --- a/openwrt/docker-compose.yml +++ b/openwrt/docker-compose.yml @@ -4,3 +4,4 @@ openwrt: command: sleep inf volumes: - ./data:/data + restart: unless-stopped