. ap/.env
docker pull "openwrt/imagebuilder:$OP_BUILD_TAG"
mkdir "$OP_BUILD_TYPE/bin"
docker run --rm \
-v "$(pwd)/$OP_BUILD_TYPE/bin":"/builder/bin" \
-v "$(pwd)/$OP_BUILD_TYPE/files":"/builder/custom-files" \
-v "$(pwd)/common/files":"/builder/common-files" \
-v "$(pwd)/$OP_BUILD_TYPE/.env.${OP_HOSTNAME}":"/builder/.env":ro \
-v "$(pwd)/build.sh":"/builder/build.sh":ro \
"openwrt/imagebuilder:$OP_BUILD_TAG" \
bash /builder/build.sh
docker run --rm \
-it \
-v "$(pwd)/$OP_BUILD_TYPE/bin":"/builder/bin" \
-v "$(pwd)/$OP_BUILD_TYPE/files":"/builder/custom-files" \
-v "$(pwd)/common/files":"/builder/common-files" \
-v "$(pwd)/$OP_BUILD_TYPE/.env.${OP_HOSTNAME}":"/builder/.env":ro \
-v "$(pwd)/build.sh":"/builder/build.sh":ro \
"openwrt/imagebuilder:$OP_BUILD_TAG" \
bash
# scp -O /path/to/sysupgrade.bin root@<...>:/tmp/sysupgrade.bin
# ssh root@<...>
# sysupgrade -u -n -p -v /tmp/sysupgrade.bin
# crontab -e
*/3 * * * * (wget -q -O- --timeout=3 "https://223.5.5.5/resolve?name=example.com&type=AAAA" || wget -q -O- --timeout=3 "https://223.5.5.5/resolve?name=example.com&type=AAAA") || (cp /root/network /etc/config/network; reboot)
tftp 192.168.1.1
> binary
> put factory.img
> quit