## [[OpenNDS]] Dev Setup via p3terx/openwrt-build-env on [[Docker]]
https://hub.docker.com/r/p3terx/openwrt-build-env
Detailed blog post (in Chinese): https://p3terx.com/archives/build-openwrt-with-docker.html
```shell
# Open dev folder
cd ~/projects
# Get the docker image
docker pull p3terx/openwrt-build-env
# Run it on one terminal window
docker run -it p3terx/openwrt-build-env
# In another terminal window, enter
docker exec -it peaceful_poincare zsh
# Clone OpenWrt and the Higher-Brothers fork of OpenNDS:
git clone https://git.openwrt.org/openwrt/openwrt.git
git clone git://github.com/Higher-Brothers/opennds.git
# Run the OpenWrt installation scripts, uninstalling the OpenNDS that comes packaged with OpenWrt by default:
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds uninstall opennds
# Go back to the home dir
cd ~
# Copy the Higher-Brothers OpenNDS package into OpenWrt:
cp -rf ~/opennds/linux_openwrt/opennds ~/openwrt/package/feeds/routing
# Generate config files
cd openwrt
make defconfig
# Config, follow the OpenNDS instructions
make menuconfig
# Optionally add -jN to parallize to N cores,
# e.g. if your computer has 4 cores, run `make -j4`
make
```
This will take a while, possibly a few hours.
### Failure
![[Screen Shot 2021-08-23 at 2.51.18 AM.png]]
### Trying make with M in Menu Config > Network > Captive Portals
![[Screen Shot 2021-08-23 at 3.33.38 PM.png]]
```shell
# Try again
make
```