Apparently, under Linux, that command is copying all files instead of hard-linking them, therefore the slowness. This is also taking a lot of disk space (cannot blame docker container). Needs to be fixed by understanding why hardlinks are not being created.
Correction - the culprit is not Linux, but the huge size the dev env has on Linux (5.2 Gb) compared to Mac OSX (1.7 Gb). The hard-linked environment on Linux occupies 2.7 Gb while on the Mac, only 150 Mb. For these reasons, one can understand why Linux builds are so slow and why the whole disk space of the CI is being taken.