just diy, if you install mrtrix without the -nogui option, it works on a Linux host from Docker
docker run --rm -it --net=host \
-v $HOME/.Xauthority:/root/.Xauthority \
-e DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-v $data:/data
$image mrview /data/foo/image.nii.gz