Just FYI: If you are using Mac M1 chip. There is no official support for docker selenium hub Apple Silicon version yet (as of developing and deploying this test). I used unofficial images to run this test. If you are also using m1 chip and trying to achive this, on dockerhub search for this: "seleniarm/hub", "seleniarm/node-chromium" same for firefox, etc.
Good luck!