When using Docker Desktop for Mac, you're actually using a tiny (custom) Alpine Linux running in a special xhyve VM on macOS. There's so much cool stuff happening, you're meant to forget it's still running on a Linux kernel.
There are many articles telling you how to get into the Docker VM on Mac. This is just a short list of those commands for dealing with the VM tty. I have yet to have a reason for doing so, but I get asked how to do it, so here ya go. Copy/paste from below or star my Gist here.