Docker file for OpenWrt buildroot

Hello all,
I am trying to write a docker file to generate Openwrt image using build root.

I build my custom image with buildroot with below configuration.

I don't know how to put the below work in docker file to work
In the menuconfig i need to choose the following
(1) Set Target system to MediaTeck Ralink MIPS
(2) Set Subtarget to MT76x8 based boards
(3) Target profile to Onion Omega2+
(4) Choose luci from Luci -> collections -> luci
(5) From Network section choose iperf Package
(6) From Network -> wirelessAPD select wpad-open-ssl which inturns makes wpad-basic-wolfssl to 'M' means modularizes features. wpad-open-ssl is chosen as its a necessary package to set up a WiFi mesh. wpad-basic-wolfssl has to be removed as it conflicts with wpad-open-ssl.
(7) From Global build settings select “Select all target specific packages by defaults” option also "Select all kernel module packages by defaults"
(8) From Target images choose “squashfs”

also, I need to set a few configurations to set up WiFi mesh on the boot. For that, I need to add custom files. For that I need to Create a folder “openwrt/files/etc/uci-defaults” and put the custom script inside uci-defaults.
The custom file is like below

WIFI_SSID="$(sed -n -r -e "s/://g;s/.*(.{4})$/\1/;1p" \
uci -q batch << EOF
set network.lan.proto=dhcp
delete network.lan.ipaddr
delete network.lan.netmask
commit network
set wireless.default_radio0.ssid=${WIFI_SSID}
 set wireless.default_radio0.encryption='none'
 set wireless.default_radio0.ft_over_ds='1'
 set wireless.default_radio0.pmk_r1_push='1'
 set wireless.default_radio0.encryption='psk2'
 set wireless.default_radio0.nasid='42A36BC24245'
 set wireless.default_radio0.mobility_domain='e612'
 set wireless.default_radio0.ft_psk_generate_local='1'
 set wireless.default_radio0.ieee80211r='1'
 set wireless.default_radio0.ieee80211w='1'
 set wireless.default_radio0.r1_key_holder='42A36BC24245'
 set wireless.default_radio0.key='123456789'
 set wireless.mesh=wifi-iface
 set wireless.mesh.device='radio0'
 set wireless.mesh.encryption='psk2/aes'
 set wireless.mesh.mode='mesh'
 set wireless.mesh.mesh_id='RTLS'
 set wireless.mesh.key='123456789'
 set wireless.mesh.mesh_fwding='1'
 set wireless.mesh.ifname='mesh0'
 set wireless.mesh.mesh_rssi_threshold='0'
 set wireless.radio0.disabled='0'
 set system.cfg01e48a.hostname=${WIFI_SSID}
commit wireless
commit uci

I am very new to docker. any help is appreciated. Thank you .