Skip to content

EasyPi/docker-openwrt

Repository files navigation

OpenWrt

Build Status Docker Stars Docker Pulls Image Layers

docker-compose.yml

openwrt:
  image: vimagick/openwrt
  container_name: openwrt
  hostname: OpenWrt
  ports:
    - "8022:22"
    - "8080:80"
  restart: always

build image

$ make build
$ make login
$ make push
$ make clean

up and running

$ docker-compose up -d
$ docker-compose exec openwrt sh
>>> opkg update
>>> opkg install luci
>>> exit

issues

  • OpenWrt cannot access NIC properly.

OpenWrt Builder

πŸ“» OpenWrt Package Builder for Raspberry Pi

docker-compose.yml

base:
  image: easypi/openwrt:base
  command: sleep infinity
  environment:
    - TERM=xterm
  restart: unless-stopped

bcm2710:
  extends:
    service: base
  image: easypi/openwrt:bcm2710
  volumes:
    - ./data/bcm2710:/data

Server Setup

$ docker-compose up -d bcm2710
$ docker-compose exec bcm2710 bash
>>> cd ~/sdk
>>> sudo chmod 777 bin

### build all
>>> ./scripts/feeds update -a
>>> ./scripts/feeds install -a
>>> make defconfig
>>> IGNORE_ERRORS=1 make V=s

### build shadowsocks-libev
>>> rm -r package/feeds
>>> git clone https://github.com/shadowsocks/openwrt-feeds.git package/feeds
>>> git clone https://github.com/shadowsocks/openwrt-shadowsocks.git package/shadowsocks-libev
>>> ./scripts/feeds install zlib
>>> vi package/shadowsocks-libev/Makefile
- DEPENDS:=+libev +libudns +libpcre +libpthread +libsodium +libmbedtls
+ DEPENDS:=+libev +libudns +libpcre +libpthread +libsodium +libmbedtls +zlib
>>> make menuconfig # Network β–· <M> shadowsocks-libev β–· Save β–· Exit
>>> make package/shadowsocks-libev/compile V=s

### build luci-app-shadowsocks
>>> git clone https://github.com/shadowsocks/luci-app-shadowsocks.git package/luci-app-shadowsocks
>>> pushd package/luci-app-shadowsocks/tools/po2lmo
>>> make && sudo make install
>>> popd
>>> make menuconfig # LuCI β–· 3. Applications β–· <M> luci-app-shadowsocks β–· Save β–· Exit
>>> make package/luci-app-shadowsocks/compile V=s

$ tree -A -F -L 3 /data/
/data/
β”œβ”€β”€ packages/
β”‚   └── arm_cortex-a53_neon-vfpv4/
β”‚       β”œβ”€β”€ base/
β”‚       └── packages/
└── targets/
    └── brcm2708/
        └── bcm2710/

You need to manage dependencies manually without ./scripts/feeds.

Client Setup

$ opkg update
$ opkg install shadowsocks-libev*.ipk \
               luci-app-shadowsocks*.ipk \
               iptables-mod-tproxy

References

About

πŸ“‘ OpenWrt Package Builder for Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published