developing for linux/cloud on macOS Mojave/Catalina

Are people primarily using Docker Desktop for Mac and/or VirtualBox these days to develop locally on their macOS systems?


As I work with more and more applications that have conflicting dependencies, it would be nice if Apple stepped up like Microsoft and started making this easier (e.g. WSL2 on Windows10).


Right now I'm trying to work out a way of using xhyve (https://github.com/machyve/xhyve) (which is what docker desktop (https://github.com/moby/hyperkit) is based on) to be able to script and instantiate development/staging environments locally but just in case my google foo is bad perhaps I am missing a more commonly used system?


I realize that a VM is needed since macOS isn't Linux but I don't like having to setup a full VM with its static and physical device characteristics to do compartmentalization.

MacBook Pro

Posted on Nov 10, 2019 7:46 AM

Reply

Similar questions

4 replies

Nov 16, 2019 3:02 PM in response to etresoft

Thanks for the reply,


> Why should Apple make any effort to make it easier to develop for other platforms?


To make life easier for people using macOS in multi-platform development environments - which is why I brought up the Microsoft example. I think/know of lots of people who are developers using Apple hardware but don't develop for macOS or iOS. You might be correct in that Apple shouldn't focus on creature comforts for those users. I'm mainly worried about attack surface as a result of using things like brew/MacPorts/curl-bash/etc for projects when you don't really have the time to vet every dependency that you inadvertently put on your MacBook.


The hypervisor framework you informed me of is great and those derivative projects are great so I'm going to just keep using xhyve and keep my macOS base OS free of cruft needed for development. Still have my hopes that Apple might assist even more by creating something like WSL2 for macOS in the future :-)







Nov 11, 2019 1:10 PM in response to subaqua

Why should Apple make any effort to make it easier to develop for other platforms? Apple did provide the hypervisor framework that those two projects you mention are based upon. But what Apple is providing are the tools to make other tools. It is your choice to pick the tools you want to use.


There are more options than just Docker and Virtual Box. But if your ultimate plan is to deploy on Docker, then maybe you should use Docker. My advice would be to get it all running in a good VM and then do the Docker build. But if you are doing all of this to learn Docker, then do it all in Docker.

Nov 16, 2019 4:59 PM in response to subaqua

subaqua wrote:

Still have my hopes that Apple might assist even more by creating something like WSL2 for macOS in the future :-)

Unlike Windows, the Mac already is UNIX. No WSL, or MSL, is required. That being said, it is still not Linux. So you have to pay attention to what is included in your builds. Linux isn't even Linux. Every distro is different. You'll learn that in a hurry by playing around with Docker.


Would it be rude if I dashed your hopes altogether? Apple has announced that they will not be including scripting languages in future versions of macOS.


Do you remember the WWDC 2018 video with Craig Federighi responding to the rumour that iOS and macOS would be merging? Apple used the "anvil" keynote animation to show a big "No." onscreen. But the question was whether iOS and macOS would be merging. It wasn't whether macOS would be replaced altogether.


If you aren't developing for macOS or iOS, then what platform are you developing for? That's what you should be using.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

developing for linux/cloud on macOS Mojave/Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.