docker run -p 27018:27017 and then connect from Compass on your host with port 27018. I don’t see a reason to expose all ports.
docker run -p 27018:27017 and then connect from Compass on your host with port 27018. I don’t see a reason to expose all ports.