Building OpenWrt through Docker

today i am try to building through docker

docker run --rm -v /root/docker/openwrt_sdk/sdk/:/home/sdk/ -it --privileged openwrt/sdk:ramips-mt7621-openwrt-23.05

But when I input "make menuconfig", the results displayed are very few

After exiting the menu, you can see many errors

Is my method wrong?

How to use Docker to compile images

see: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

After you have done a checkout
git checkout openwrt-23.05
or if you have done already:
git pull

update the feeds:
./scripts/feeds update -a && ./scripts/feeds install -a

then:
make menuconfig

But docker isn’t a operating system…
So what are you running docker on to begin with?

Build:

docker build --rm --target debian -t buildbot:debian .
# docker build --rm --target alpine -t buildbot:alpine .

Usage:

docker-compose up 

or 

docker run --interactive --rm --tty --ulimit 'nofile=1024:262144' \
   --volume "$(pwd):/workdir" --workdir '/workdir' buildbot:debian /bin/bash

See https://github.com/openwrt/openwrt/pull/21255