News for hackers. Stuff that matters.
Re:Docker for Mac Without Docker Desktop by riffic on Friday January 28, 2022 @01:08PM (#30118258)
I know people doing docker dev are generally targeting a Linux of some sort, but why the heck doesn't the macOS kernel support native containerization?

Come on Apple. Microsoft can do it.

edit: this seems like a new development since my last whine/complaint on this topic:

https://macoscontainers.org/

Re:Docker for Mac Without Docker Desktop by mr_toad on Friday January 28, 2022 @07:37PM (#30122466)
I don’t think it’s lack of support so much as lack of demand. MacOS containers sound like a solution looking for a problem.
Re:Docker for Mac Without Docker Desktop by pjmlp on Friday January 28, 2022 @02:20PM (#30119102)
Although just today I was having some Windows containers hiccups, I am looking forward to the day that Microsoft doesn't require installing a third party solution (Docker) to use them.
Re:Docker for Mac Without Docker Desktop by tda on Saturday January 29, 2022 @01:18AM (#30124209)
And for anyone looking to migrate away from docker desktop on Windows for use with VSCode I wrote this guide: https://gist.github.com/tdamsma/06cafea175d6784aea7b3634bb94...
Re:Docker for Mac Without Docker Desktop by pjmlp on Saturday January 29, 2022 @02:30AM (#30124533)
It doesn't help for Windows containers though.
Re:Docker for Mac Without Docker Desktop by my123 on Saturday January 29, 2022 @11:43AM (#30127761)
https://github.com/woachk/dockerinstall for a very minimal install, stuff other than that is unneeded for Windows containers.
Re:Docker for Mac Without Docker Desktop by pjmlp on Saturday January 29, 2022 @12:27PM (#30128255)
Thanks, that is more what I was looking for.
Re:Docker for Mac Without Docker Desktop by zamalek on Friday January 28, 2022 @03:25PM (#30119858)
Install a WSL machine. Install docker (or containerd, or whatever) in it. Install docker-cli on your host, then use `docker context` to use the server in WSL. 20min of effort if your Google fu is good.

If you need something like the docker desktop UI, check out portainer.

Re:Docker for Mac Without Docker Desktop by pjmlp on Saturday January 29, 2022 @02:29AM (#30124527)
Thanks it doesn't help for Windows containers, that was my point.
Re:Docker for Mac Without Docker Desktop by musicale on Friday January 28, 2022 @05:25PM (#30121292)
> why the heck doesn't the macOS kernel support native containerization

It doesn't seem like a huge leap from sandboxing to containerization.

They also might consider supporting BSD-style jails.

Re:Docker for Mac Without Docker Desktop by jokethrowaway on Friday January 28, 2022 @02:36PM (#30119310)
Indeed, with windows' linux subsystem I have to say working from M$ sounds reasonable, maybe even better than dealing with Mac OS X half-baked package managers and subpar docker experience.

It used to be that Windows had a better UX than OS X (imho at least), but nowadays they're equally crap and they can't compare with what's available on linux.

With two machines, I'd still pick Windows for gaming dev and linux for everything else.

With three machines, I'd add a screen-less mac mini to do iOS related builds.

Re:Docker for Mac Without Docker Desktop by CubsFan1060 on Friday January 28, 2022 @01:48PM (#30118751)
That URL got me excited, but didn't seem to be a lot of progress on it in the last 6 months or s.
Re:Docker for Mac Without Docker Desktop by asdff on Friday January 28, 2022 @02:06PM (#30118953)
I have used the native launch agent system in macos to do what some people use docker containers for.
Re:Docker for Mac Without Docker Desktop by whartung on Friday January 28, 2022 @02:20PM (#30119110)
Do you have this written up anyplace sharable?
Re:Docker for Mac Without Docker Desktop by asdff on Friday January 28, 2022 @04:22PM (#30120531)
No, but basically this would apply to like little services that might run on docker locally on my mac. Say you have a Dockerfile that uses pip to install some stuff and run a python script. There are a few tools on github I use that are configured like this. To run it without docker, I would write up a simple launch agent plist file that calls up another script that just initializes a conda environment with the dependencies and runs the python. this might not be applicable to all docker use cases, though, but it works well enough for me.
Re:Docker for Mac Without Docker Desktop by conradludgate on Friday January 28, 2022 @01:45PM (#30118706)
Because most people want to run Linux containers (to get the same environment as their servers)
[dead]
Re:Docker for Mac Without Docker Desktop by kstrauser on Friday January 28, 2022 @02:42PM (#30119389)
> macOS is mainly targeted at secretaries, managers and artists.

Counterpoint: I've never seen someone in the Bay Area developing on a Windows machine, in any company I've worked at. In my experience, locally, it's more like 95% Mac, 5% Linux, and 0% Windows.

Now, I know that neither of our anecdotes represent the state of the world in general, but the notion that "Macs are for non-techies" is laughable on the face of it.

Re:Docker for Mac Without Docker Desktop by dekhn on Friday January 28, 2022 @06:59PM (#30122216)
I had a windows laptop a few times while working. I much prefer it to Mac laptops (which is what I've been made to use most of the time), or even linux laptops. Most of my dev work targets linux but with visual studio code remote, or a shell, or a remote desktop, what I run on the local machine is less important.

What is important is having a set of keystrokes that make sense to me (the mac command button does not work well on my PC laptops, and remapping just makes stuff worse) and don't change over decades.

Re:Docker for Mac Without Docker Desktop by kstrauser on Saturday January 29, 2022 @02:30PM (#30129563)
I’m fine with that. Develop on a C64 if you’re efficient with it for all I care. I don’t like using Windows because it feels strange and all the keyboard shortcuts are wrong to me. What’s uncool is making fun of it, and by extension people who use and like it, as a toy for people who aren’t technically sophisticated.

That’s right up there with “iPhones are for sheep LOL” as far as things that make the speaker sound a lot worse than the people they’re talking about.

Re:Docker for Mac Without Docker Desktop by kelnos on Friday January 28, 2022 @03:33PM (#30119953)
> macOS is mainly targeted at secretaries, managers and artists. Tech work isn't designed to be compatible with a mac.

I don't think this is true at all. Despite not developing Mac applications, we've (Twilio) been a Mac shop since day one, 14 years ago. This was driven by our three founders, who, at the time, were all engineers. These days our IT department offers Windows machines for employees who need it for some reason, but uptake is likely in the single-digit percentages.

And I know a lot of people who do technical work at various companies whose primary work machine is a MacBook Pro.

This might be a Silicon Valley startup thing. I would expect the Stack Overflow survey is skewed pretty hard toward Windows due to big corporate enterprises that aren't tech companies. It seems to me that most "tech companies" prefer Macs.

> Take for example using netcat. The version available to Mac is 17 years old and lacking some useful flags

I run Linux, so I don't have firsthand experience with much of this, but everyone I know who uses macOS for development has something like Homebrew installed, so they can get up-to-date versions of the various tools that are outdated in the default macOS install.

Re:Docker for Mac Without Docker Desktop by skrtskrt on Friday January 28, 2022 @02:40PM (#30119359)
I have worked at 4 small-to-mid-sized tech companies now and only one didn't have every software engineer on Macs with Docker.

I don't disagree that the built-in tools on Mac leave a lot to be desired, but you can also just brew install things and clearly Docker has gone to a lot of effort to make this all work on Mac, so the demand is there.

I switched to Linux for the current company, and was expecting fewer Docker oddities and better battery life, but I seem to actually have way more issues now, which - without sinking a week or more into investigating transient issues - I attribute to it not being isolated in a VM.

I often have to reboot my machine just to get basic DNS resolution working from inside a container

Re:Docker for Mac Without Docker Desktop by darrenf on Friday January 28, 2022 @02:57PM (#30119543)
> Iirc, a 2018 stackoverflow survey of what devs use had 50% on windows, 40% on Linux and 10% on mac.

You needn't rely on your memory, the survey is still available [0]. FWIW, it doesn't seem to contain a question about the OS where development takes place, only about the targets[1]. The top answers were:

Linux 48.3%

Windows Desktop or Server 35.4%

Android 29.0%

AWS 24.1%

Mac OS 17.9%

[0] https://insights.stackoverflow.com/survey/2018/

[1] "Linux and Windows Desktop or Server are the most common choices that our respondents say they have done development work for this year." (emphasis mine)

Re:Docker for Mac Without Docker Desktop by jdpedrie on Friday January 28, 2022 @03:32PM (#30119946)
It does have stats for Developers' Primary Operating System[0]:

Windows 49.9%

MacOS 26.7%

Linux-based 23.2%

BSD/Unix 0.2%

[0] https://insights.stackoverflow.com/survey/2018/#technology-_...

Re:Docker for Mac Without Docker Desktop by darrenf on Friday January 28, 2022 @04:59PM (#30120981)
Wow. I have no idea how I missed that. Mea culpa. Albeit those numbers are still radically different to the poster I replied to.
Re:Docker for Mac Without Docker Desktop by JimDabell on Friday January 28, 2022 @09:57PM (#30123345)
The most recent stats from StackOverflow are 25.19% macOS for all respondents and 30.04% macOS for professional developers.
Re:Docker for Mac Without Docker Desktop by viro on Friday January 28, 2022 @03:02PM (#30119597)
oh wow he completely misrepresented that stat.
Re:Docker for Mac Without Docker Desktop by viro on Friday January 28, 2022 @03:05PM (#30119628)
I have a simple one for ya... Use docker and Vmware on the same windows machine.
Re:Docker for Mac Without Docker Desktop by ideologysec on Friday January 28, 2022 @05:07PM (#30121078)
Are you talking about the old problem of VMware and Hyper-V not playing well together, or suggesting that using both together solves Windows development woes?
Re:Docker for Mac Without Docker Desktop by viro on Wednesday February 02, 2022 @12:35PM (#30180872)
old? It happened last week for me.
Re:Docker for Mac Without Docker Desktop by minerva23 on Friday January 28, 2022 @01:48PM (#30118744)
> why the heck doesn't the macOS kernel support native containerization?

Because Apple has no plans of growing their server OS marketshare. I know there are benefits of using namespaces (containers) in the desktop market, but they don't sell iMacs/MBPs. Exterior design and heavy marketing is their sales strategy.

Re:Docker for Mac Without Docker Desktop by sjtindell on Friday January 28, 2022 @05:00PM (#30120993)
I never understood this, because surely some huge percentage of developers use Macs. Enterprises buy stacks of them nonstop. Just making that group happy would get you the reputation of being a developers machine, for serious computer people, which could translate into laymen purchases too.
Re:Docker for Mac Without Docker Desktop by Kwpolska on Friday January 28, 2022 @06:25PM (#30121909)
Would developers really be happy with containers running macOS inside? Production is running Linux, so they need two sets of images and their local image will be different from the one running in production.
Re:Docker for Mac Without Docker Desktop by tjr225 on Friday January 28, 2022 @11:02PM (#30123665)
I'm really not sure what comment you're replying to but Mac developers write code that runs on linux primarily using Docker and "VMs" that run linux on docker. Like; probably 75% of the devs on the west coast do this.
Re:Docker for Mac Without Docker Desktop by pjmlp on Saturday January 29, 2022 @09:37AM (#30126589)
Mac developers run code that runs on iOS, iPadOS, watchOS and macOS, that is why they are Mac developers.

Otherwise they are just UNIX developers that don't care which POSIX platform they are actually using.

Re:Docker for Mac Without Docker Desktop by tjr225 on Saturday January 29, 2022 @12:55PM (#30128562)
Yeah, I meant developers who prefer to use macs.
Re:Docker for Mac Without Docker Desktop by pjmlp on Saturday January 29, 2022 @09:36AM (#30126579)
iOS, iPadOS, watchOS and macOS applications aren't made out of thin air, they also need developers.
Re:Docker for Mac Without Docker Desktop by Langdal on Friday January 28, 2022 @02:27PM (#30119196)
Also creating their own SoC that outperforms others in the space.
Re:Docker for Mac Without Docker Desktop by Toine on Friday January 28, 2022 @04:26PM (#30120569)
"Exterior design and heavy marketing is their sales strategy" this is old, boring and not even true.
Re:Docker for Mac Without Docker Desktop by riffic on Friday January 28, 2022 @02:31PM (#30119248)
containerization won't just help in the server-space. It has use-cases in app development like CI.
Re:Docker for Mac Without Docker Desktop by smoldesu on Friday January 28, 2022 @04:33PM (#30120669)
Apple would like you to move to XCode Cloud[0] in the future, running CI pipelines on your local device is soooo last-century.

[0] https://developer.apple.com/xcode-cloud/