Live data from Hacker News

Simplifying Docker on OS X

blog.andyet.com

81–89 of 89 posts

Re: Simplifying Docker on OS X

#81

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.

Linux works quite well on Macbooks. No need to buy more hardware.

It works great indeed. My main pain point though is that if you want to dual-boot then every update of OS X will destroy your Linux workspace.

Re: Simplifying Docker on OS X

#82
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.

In my experience the OSX tools for docker work absolutely fine. If you've got in a bad state, completely uninstall all existing docker-related stuff, `brew update` and `brew install docker-machine`. The article sounds like a fun personal project, but I definitely don't see inconvenience on OSX being a justification. If shell commands are too much to type then create aliases. The VM's IP doesn't seem to change; add an…

My experience is that the toolchain works fine but performance is lacking, especially when sharing many files between the OS X host and the Docker container.

Re: Simplifying Docker on OS X

#83

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 get ~3/4s of the battery life that i have on osx if i do not run anything on flash.

if flash starts, i get less than half. (using archlinux on a mid-2012 mbp)

Re: Simplifying Docker on OS X

#84
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.

I used to use dinghy, but setting it up required a lengthy process. Because I'm trying to migrate my department to Docker, I wanted to streamline the onboarding process, and ended up blowing away everything and switching back to Docker Toolbox.

Haven't had any problems since, and it's been easier to get people started.

Re: Simplifying Docker on OS X

#85
post #74

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.

I dual-booted Mint on my 2011 MBA the other week and it was a nasty experience. I feel like Linux users have low standards, or maybe I've been away too long. Here's four things I found immediately: 1. The fans don't automatically react to temperature without a background daemon (?!). 2. Multi-touch trackpad support is terrible. The default synaptic driver can't handle you resting your thumb on the bottom of the track…

I always run Ubuntu.latest. 15.10 on a 2014 macbook pro at the moment.

1. I currently don't have a problem with that (the fans/temperature management). In my seven years of running Ubuntu on Macbooks, I've run into that in the past, but it's been a while. 2. I've never been a 'full' OSX user, but I understand that they are doing a lot of very nifty things with the touch pad, not surprisingly. My experience with the touchpad under Ubuntu is generally not as good as under OSX. 3. Can't comment on this one 4. As described elsewhere.

For most people, I would not recommend running any Linux flavor on a Macbook. I am a 'UNIX guy' for decades now. Hell, I even run a minimalistic windows manager (http://www.6809.org.uk/evilwm/)

For me, the upsides outweigh the downsides. I'm pretty sure that's not the case for most people though.

Re: Simplifying Docker on OS X

#86
Honestly, for me it looks like a wasting time. If you want to have simplicity - install Docker Toolbox, which will help you with getting access to docker with all environment variables. If do not need simplicity - you probably want to handle multiple docker hosts, including VM, Linux machines, Cloud instances - this is why you want to have an option to switch between docker environments using `eval $(...)`. Also you can use something like https://github.com/Tarrasch/zsh-autoenv to automatically call this command in specific folders.

And if you really need docker-lite- you do not need to write it in go, just do

Run that once (do sudo or any other crazy stuff):

``` echo $(docker-machine ip dev) local.docker >> /etc/hosts ```

Add that to `.bashrc`

``` eval $(docker-machine eval dev) ```

Re: Simplifying Docker on OS X

#87
post #76

Earlier quoted context omitted.

Same goes for Cisco AnyConnect VPN. Updating the routing table seems to temporarily fix it, but it would be nice not to hack around it to get it to work.

> Updating the routing table seems to temporarily fix it, can you share a link ? thanks

It's been a while, but I believe the fix is in this thread:

https://github.com/boot2docker/boot2docker/issues/628

Re: Simplifying Docker on OS X

#88
post #69

Earlier quoted context omitted.

docker-machine automates setting up a VM running Docker. There's nothing manual about it (besides running "docker-machine create dev" or whatever)

Docker-machine drove me up a wall. Getting file sharing to work so I could use my nice Mac editors on my in-docker code was a huge waste of time and effort. Docker-machine was just another one of those crappy half-measures that keep Mac owners struggling to find a way to make Docker graceful. I was also motivated by bringing on new team members who were on Windows rather than Macs. Vagrant works fine and transparentl…

It's unfortunate you had such a bad experience with Docker. No doubt there's a steep learning curve to use more advanced features. If you're still willing to look in to it, I'd recommend taking at look at https://docs.docker.com/engine/userguide/dockervolumes/ under "Mount a host directory as a data volume."

Re: Simplifying Docker on OS X

#89
Hey, this is pretty sweet.

This is a simple alternative than the solution I wrote about here: https://allysonjulian.com/setting-up-docker-with-xhyve/ which uses docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve).

I've been trying to figure out how to deal with the env variables used by docker, and used a workaround ~/.profile (https://gist.github.com/astrohckr/efceb07887225cbc2ba2). Like the OP, running eval in every terminal session makes me a bit concerned as well.

I'll give dlite a Go.

Post reply on HN