It doesn't work bare metal for the new macs, and it is extra bloat instead of making use of macOS capabilities.
Too bad apple didn't help out docker with a macos native version.
FROM macos:10.13.3 RUN xcode-build