Yes, I am running Linux and X (no Wayland). I tried everything you said in the past, and never worked, but thanks to this I kept researching a little bit more and found a solution!!
If I run the docker with --net=host it works! I found the solution here, so the commands that led to a working docker are:
export XAUTH=/tmp/.docker.xauth
export XSOCK=/tmp/.X11-unix
docker run -it --net=host --rm \
--volume=$XSOCK:$XSOCK:rw \
--volume=$XAUTH:$XAUTH:rw \
--env="XAUTHORITY=${XAUTH}" \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
ghcr.io/awvwgk/avogadro