Install Colima and Docker, then start Colima:
brew install colima
brew install docker
echo "{ \"credStore\" : \"desktop\" }" > ~/.docker/config.json
colima start
$ uname
Darwin
$ colima ssh -- uname
Linux
$ echo "files under /Users on macOS filesystem are readable from Linux" > some-file
$ colima ssh -- cat some-file
files under /Users on macOS filesystem are readable from Linux
$ colima ssh -- sh -c 'echo "/tmp/colima is writable from both macOS and Linux" > /tmp/colima/another-file'
$ cat /tmp/colima/another-file
/tmp/colima is writable from both macOS and Linux