Why would you run R on a Mac in Docker? Docker isn’t an emulator. You’re still going to need ARM code.
Not that this wasn't a known caveat of Docker, but I think a lot of people are going to realize this in the next year or two.
I would imagine that Docker for Mac will likely get native support for ARM macOS soon enough, in which case there'd be no x86 emulation involved and you could run the ARM Linux version of R in a container just fine.
My understanding is Rosetta 2 does not support x86 virtualization.
Previous benchmarks[0] show that the overhead on Intel Macbooks for the Docker Linux VM is quite low for scientific computing.
Would the x86 emulation hurt performance substantially or is there some other issue with this approach?
[0]: https://lemire.me/blog/2020/06/19/computational-overhead-due...