Live data from Hacker News

Simplifying Docker on OS X

blog.andyet.com

51–60 of 89 posts

Re: Simplifying Docker on OS X

#51
post #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 1…

As a Dinghy user too, thank you! I will give a shot at Dlite right now :)

Re: Simplifying Docker on OS X

#52
post #16
post #4

Docker does run natively on OSX. Just forward a port with ssh/socat/etc and set the environment variable correctly to point to your build host that can run lxc. There is so much over-engineering going on in this arena. :/

There is no definition of "native" where your statement is true.

I think the meaning is the docker tools/client runs on OSX, so one could just run a remote host or VM with docker installed and use the default tools for running/connecting against the remote host...

Personally, I wish more of it worked as transparently as what Joyent provides for their server implementation.

Re: Simplifying Docker on OS X

#53
I also really hatte the official Docker way in OS X. It's even hard to uninstall! If anybody is interested how to uninstall official Docker for OSX: https://therealmarv.com/how-to-fully-uninstall-the-offical-d... Running Docker in a Vagrant VM is or was the best way. Speaking of Vagrant... does anybody know if there is a xyhve Vagrant project?

Re: Simplifying Docker on OS X

#54
post #20
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?

It is more light-weight?

Yes. VirtualBox is emulating a whole PC including controllers for all internal stuff like CPU, graphics, HDD etc. Where as xhyve is more like an interface which can be used by VMs to access the native hardware indirectly.

Re: Simplifying Docker on OS X

#55

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 estimate that I get better than half of the battery life.

Years ago, when I started doing it, the battery life of Linux on Macbook was really terrible.

I only need a couple of hours of battery life for my mac at most, so that's fine for me at least.

Re: Simplifying Docker on OS X

#57
post #5

I just use bash aliases in my .profile ---- alias dm="docker-machine" alias dc="docker-compose" alias denv='function __denv() { eval "$(dm env $@)"; unset -f __denv; }; __denv' ---- dm create --driver virtualbox local denv local Also works with swarm params: denv local --swarm swarm-master

Mine are similar:

dssh() { docker exec -ti $1 /bin/bash }

dexec() { img="$1" shift docker exec $img /bin/sh -c "$@" }

Re: Simplifying Docker on OS X

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

Out of curiousity, did you try docker-machine (the docker toolbox)? I have found that to be fairly straightforward, though I had not used B2D previously.

Re: Simplifying Docker on OS X

#59
post #58
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.

Out of curiousity, did you try docker-machine (the docker toolbox)? I have found that to be fairly straightforward, though I had not used B2D previously.

To be clear on adamsea's point, docker-machine is now the replacement for B2D and is also officially supported.

Re: Simplifying Docker on OS X

#60
post #50
post #40

I feel like this isn't much simpler than the official docker-machine workflow, but I may be too far in the weeds at this point to objectively tell how complicated it is. In my case I need to test tools across 4 versions of Docker so I'm locked into using docker-machine and dvm.

The lack of /var/run/docker.sock is annoying but its really not that big of a deal in my opinion either. docker-machine covers a lot of other use cases such as multi-host docker swarms and docker in the cloud. Adding this tool to the toolbox is extra mental overhead for a small benefit if you have any need for these more advanced use cases.

I also am not sure what major advantages this brings. And the article was slightly unclear in that you can add Docker environment variables to your `.bash_profile` -- you still are dealing with environment vars, but don't have to run the `eval` command all the time. And, I believe the docker-machine default VM settings mount your User (Users/myname) directory in it's virtual machine
Post reply on HN