Live data from Hacker News

Simplifying Docker on OS X

blog.andyet.com

21–30 of 89 posts

Re: Simplifying Docker on OS X

#21
My main problem with using Docker on OS X is that I have multiple OS X user accounts - one for myself, one for my main client. And I ran into a bunch of trouble trying to run boot2docker and dockermachine on both of them, it just wouldn't work. Unfortunately I forget the details since I haven't had need to use docker since then.

Re: Simplifying Docker on OS X

#23
post #18

So I imagine the solution is using xhyve to run a simple linux. Why is the xhyve virtualization framework through low-level go-bindings better than using VirtualBox for the same task?

  > Why is the xhyve virtualization framework through low-level
  > go-bindings better than using VirtualBox for the same task?
Presumably, because xhyve uses the native os virtualization framework, and as such does not require custom third party kernel modules. It also apparently works a bit better with the native os scheduler.

Re: Simplifying Docker on OS X

#24

Pretty cool trick to make the OS X docker hacks feel transparent. I've been tempted into getting a Linux laptop just because using Docker on OS X feels so hacky.

If you're going to go through the trouble of having two computers anyway, why not make the second one a home Linux server? Point the docker client's socket at that machine, instead of at a VM.

One of the benefits of doing this, I find, is that all the power-hungry stuff happens on the server, so I can have a really lightweight development machine (e.g. one of the 2015 Macbooks.)

Re: Simplifying Docker on OS X

#25

Thank you! I'll have to check this out. It baffles me that a company such as Docker has yet to make using its primary product on Mac OS X simple plug and play. Needing to remember to run `eval $(docker-machine env docker)` is not a sustainable solution. Hell I know about this and would occasionally forget and become confused at the error messages. In fact I put this horrible hack into my ~/.bash_profile (I wouldn't r…

One thing I do to avoid this is to write out the Docker environment to a file in my home directory. Then I source that file, if it exists, for each new terminal session. Not perfect, but you can see it here: https://github.com/bentruyman/dotfiles/blob/392914f92e5a8d8d...

But DLite appears to resolve a lot of this 'hackiness'.

Re: Simplifying Docker on OS X

#26
There's a lot of neat work going on in this space because Docker support on OS X is pretty lackluster out of the box. My team and I built Dusty[1] to try to solve many of the same problems, though we seem to be operating at a bit of a higher level than this tool.

I'm excited to try out xhyve for virtualization, but even if you solve the virtualization problem there are still some real usability concerns around using Docker for development in even medium-sized teams. I gave a talk at PyGotham[2] about some of the benefits and issues of using Docker for dev at this point.

All told, this looks like it might be an attractive lightweight solution though if virtualization is your main problem now.

[1] http://dusty.gc.com/ [2] https://www.youtube.com/watch?v=pYLOuuR7HI0

Re: Simplifying Docker on OS X

#27
post #11

From someone who has wasted many hours trying to get B2D working, I have ended up using https://github.com/codekitchen/dinghy Easier to use, more reliable and some nice features like the OPs .docker DNS and NFS shares. The maintainer is very responsive and I recommend it to anyone who is struggling with docker on OSX.

After seeing this article, I just migrated from Dinghy to Dlite. I saved about 5GB of disk space, got much faster VM startup time and basically no hassle. It was a cinch to work my docker-compose startup into a LaunchAgent and now I finally have all my services running on boot. I highly recommend giving it a shot; my eyes nearly popped when I saw how quickly it downloaded and started the VM (must have been all of a 10MB download).

Re: Simplifying Docker on OS X

#28
post #17

Pretty cool trick to make the OS X docker hacks feel transparent. I've been tempted into getting a Linux laptop just because using Docker on OS X feels so hacky.

Just use Vagrant! Start a Vagrant VM on your Mac and do the Docker stuff inside it.

If I "just used Vagrant," I think I'd end up with a virtualbox VM, just like if I were to have used docker-machine.

Re: Simplifying Docker on OS X

#29

Thank you! I'll have to check this out. It baffles me that a company such as Docker has yet to make using its primary product on Mac OS X simple plug and play. Needing to remember to run `eval $(docker-machine env docker)` is not a sustainable solution. Hell I know about this and would occasionally forget and become confused at the error messages. In fact I put this horrible hack into my ~/.bash_profile (I wouldn't r…

From my understanding, the limitation is from OSX and not from Docker, as OSX does not have native support for kernel namespacing. This is why Docker on OSX runs inside of a Linux virtual machine.

Re: Simplifying Docker on OS X

#30

Earlier quoted context omitted.

Been using Linux on my work macbooks since 2009. There are some bumps involved, but it works really well on the awesome Apple hardware.

How's the battery life?

I use a Macbook Pro (2014) with Kubuntu Linux installed full-time. The battery life is about half of what it is when running OSX.

If you forget your charger, there is serious range anxiety. Luckily, I've been running PC laptops for years and have gotten completely used to bringing my charger any time I take my laptop.

Post reply on HN