Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Half-OT: Is it possible to run Xcode CLI tools from inside Docker for Mac?


No. Docker for mac runs a Linux VM.


Doesn't that defeat the purpose of Docker?

But anyway, thanks for the info :)


Running a Linux VM on Mac defeats some of the purpose of Docker, but it's still valuable:

* Docker is useful for production and has various other benefits, and Docker for Mac is a nice way to develop locally with Docker even if it's not as efficient as on Linux.

* Docker for Mac uses some built-in virtualization tools in macOS to share network and filesystem more efficiently than you could do with the older VirtualBox approach. So it's maybe a little closer to native OS support than you're thinking.

* A typical configuration has a single Linux VM holding many Docker containers, which is better than the alternative of many VMs.


I see. okay.

I assumed the main idea of Docker were reproducible builds on different machines and wanted to use it for building iOS apps.


That's certainly a use case, it's just not compatible with Apple's restrictions.


No, because the purpose of Docker is not 'to run XCode CLI tools'...


I think the GP means that the purpose of Docker is to provide containers, which are a substitute for VMs. If you are going to be running a VM anyway, why run a container?


The purpose of running Docker on Mac is to run Linux containers, mainly for developing or testing containers that will be run on Linux servers.

macOS doesn't support native containers. Windows does have Windows containers. Docker on Windows can run both Linux or Windows containers.


Yes. thank you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: