Ran into all of these same issues starting out native Ubuntu 22.04 and my own docker container running Ubuntu 20.04.
USE THE DOCKERFILE IN THE FLEXBUILD TARBALL. All your problems will be solved.
What I did for a successful build:
1. Download flexbuilder tarball from nxp.com/lsdk
2. Unzip it:
tar xf <downloaded filename>
3. Enter install's docker directory:
cd flexbuild_<version>/docker
4. Create docker image from NXP-provided dockerfile called "nxp-ubuntu":
sudo docker build -t nxp-ubuntu
5. Create and start docker container in privileged mode with all linux capabilities (just to make sure there are no permissions issues):
sudo docker run --privileged --cap-add=ALL -it nxp-ubuntu
6. Prompt becomes that of your docker container. Create a workspace:
sudo mkdir /home/workspace
7. Open a host terminal in another window to copy flexbuilder to your container.
sudo docker cp flexbuild_<version>.tgz <docker container ID>:/home/workspace
8. In your container prompt, navigate to workspace:
cd /home/workspace
9. Untar flexbuild:
tar xf flexbuild_<version>.tgz
10. Enter flexbuild directory and setup environment
cd flexbuild_<version>
source setup.env
11. Verify you can use bld command by typing "bld" - usage instructions should be returned.
12. Make all components for the LS1028A RDB
bld -m ls1028ardb
13. Jump for joy, go for a walk, enjoy this reward before you have to interpret more NXP documentation