Copy petalinux-v2021.2-final-installer.run file to this folder. Then run
docker build --build-arg PETA_VERSION=2021.2 --build-arg PETA_RUN_FILE=petalinux-v2021.2-final-installer.run -t petalinux:2021.2 .
On the host extract the sstate- to /opt for each architecture you need
tar -zxf sstate_aarch64_2021.2.tar.gz --directory /opt/
On the host extract the sstate-cache offline packages to /opt
tar -zxf downloads_2021.2.tar.gz --directory /opt/
Place each architecture and downloads into a sstate-rel-v2021.2 folder
After installation, launch petalinux on a linux host with:
docker run -ti --rm -e DISPLAY=$DISPLAY --net="host" -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/vivado/.Xauthority -v $HOME/Xilinx:/home/vivado/project -v /opt/sstate-rel-v2021.2:/opt/sstate-rel-v2021.2 petalinux:2021.2 /bin/bash