Check out the docker-openwrt project:
https://forum.openwrt.org/t/running-openwrt-in-a-docker-container