I think it useful to understand how the build system works so you can always install any OpenWrt package you may need. If you search for the packages on OpenWrt.org you can download the build configuration file(s) and it lists the dependencies.
Here is how you would use the build system to build mosquitto which also handles the dependencies. You run the scripts from the directory in which you install the build system:
./scripts/feeds install mosquitto
Here's the output:
Installing package 'mosquitto' from packages
Installing package 'libwebsockets' from packages
Installing package 'libuv' from packages
Installing package 'c-ares' from packages
I don't use Docker, I think it strangles performance.