
Docker for Mac and Windows Is Now Generally Available and Ready for Production - samber
https://blog.docker.com/2016/07/docker-for-mac-and-windows-production-ready/
======
senex
I've been tracking the beta for a while. I'm confused about this announcement.
These issues still seem unresolved?

(1) docker can peg the CPU until it's restarted
[https://forums.docker.com/t/com-docker-xhyve-and-com-
docker-...](https://forums.docker.com/t/com-docker-xhyve-and-com-docker-osxfs-
cpu-usage/10537/32)

(2) pinata was removed, so it can't be configured from CLI scripts
[https://forums.docker.com/t/pinata-missing-in-latest-mac-
bet...](https://forums.docker.com/t/pinata-missing-in-latest-mac-
beta-1-11-2-beta15/15541)

(3) it's not possible to establish an ip-level route from the host to a
container, which many dev environments depend on
[https://forums.docker.com/t/ip-routing-to-
container/8424/14](https://forums.docker.com/t/ip-routing-to-
container/8424/14)

(4) filesystem can be slow [https://forums.docker.com/t/file-access-in-
mounted-volumes-e...](https://forums.docker.com/t/file-access-in-mounted-
volumes-extremely-slow-cpu-bound/8076/168)

Are these fixed in stable? I'm personally stuck transitioning from docker-
machine and (from the comments) it seems like other folks are as well...

~~~
jmspring
Sadly, the state of things, be it the Docker ecosystem or others, "ready for
production" means something much different than it did years ago.

For me, the definition of ready for production, Debian is a good example of
the opposite end of Docker.

~~~
rhinoceraptor
I think by 'production', they mean 'ready for general use on developer
laptops'. No one in their right mind is deploying _actual_ production software
on Docker, on OS X/Windows.

I've been using it on my laptop daily for a month or two now, and it's been
great. Certainly much better than the old Virtualbox setup.

~~~
mherrmann
I'm still using VirtualBox. Could you elaborate why Docker is better?

~~~
numbsafari
Leaving containers vs VMs aside, docker for Mac leverages a custom hypervisor
rather than VirtualBox. My overall experience with it is that it is more
performant (generally), plays better with the system clock and power
management, and is otherwise less cumbersome than VirtualBox. They are just
getting started, but getting rid of VirtualBox is the big winner for me.

~~~
carwyn
It's based on the OS X sandbox and xhyve which is in turn is based on bhyve
[https://blog.docker.com/2016/03/docker-for-mac-windows-
beta/](https://blog.docker.com/2016/03/docker-for-mac-windows-beta/)

------
Todd
I just installed D4W a few days ago for the first time. It's been great. It's
a seamless experience on W10 Pro with Hyper-V. I've used VirtualBox a lot and
I like it but I always have to fuss with the network bridge and such. With
this, it's hard to tell I'm even using a VM. Their network port mapping is
seamless.

FYI, I was using rc4 and I didn't see any information on how to upgrade
(should I uninstall first?). I ran the release setup and it did an in-place
upgrade, deleting earlier components and such.

~~~
sootzoo
My experience has been the auto-upgrade works without requiring reinstall (and
indeed just did so to GA last night). I don't think there's any specific fresh
install requirement.

------
yladiz
I don't use Docker much now, but in my experience the reliance on Virtualbox
(on Mac) was a little clunky and annoying, and I really wished for native
support without Virtualbox. I'm super happy to see that's here!

~~~
gtirloni
I think it makes sense to depend on the "native" virtualization solutions for
each operating system (Hyper-V and xhyve).

We have been using Vagrant and VirtualBox heavily and the new Docker for
Windows/Mac is making us reconsider that since you can't easily use more than
one hypervisor on the same dev machine without some hassle. We might be
building our Vagrant boxes for these other hypervisors soon. VirtualBox still
seems easier to work with but there isn't anything much exciting happening
with it lately.

Let's see...

~~~
amorphid
I believe xhyve works fine with recent versions of VirtualBox, since xhyve is
a pure userland app (aka no kernel extensions). Check out the issues section
in the xhyve readme...

[https://github.com/mist64/xhyve/blob/master/README.md](https://github.com/mist64/xhyve/blob/master/README.md)

~~~
sigjuice
xhyve needs to interact with all kinds of low-level things so there has to be
kernel code involved. xhyve does not install kernel extensions of its own like
VirtualBox or VMWare Fusion. xhyve uses the kernel extensions provided by
Apple (com.apple.driver.AppleHV and possibly others).

~~~
amorphid
Ah, that makes sense. It doesn't install anything extensions of it's own, only
using the kernel bits provided by Hypervisor.framework.

------
girvo
Absolutely love Docker.app, it's made life so much simpler at work for all of
us, and performance has been increasing steadily (though it's still not 1:1
with boot2docker-xhyve).

------
voltagex_
On Windows, Hyper-V doesn't really play nicely with laptops. If you've got it
enabled and bridged to your wifi adapter, Windows 10 may think that your
connection is Ethernet and turn off all bandwidth saving features. I only
found out after Windows Update had exhausted my monthly LTE quota.

~~~
drdaeman
Speaking about Windows, it is also disabled on Windows 10 Home and only
available on Pro edition. Hope they'll maintain VirtualBox support as a first-
class citizen (well, given that it was the most mature option during the beta
period, suppose they will).

------
Perceptes
Basically echoing senex's comment, but this announcement seems bizarre in
light of [https://forums.docker.com/t/file-access-in-mounted-
volumes-e...](https://forums.docker.com/t/file-access-in-mounted-volumes-
extremely-slow-cpu-bound/8076). In particular, a Docker employee responds with
a status update in [https://forums.docker.com/t/file-access-in-mounted-
volumes-e...](https://forums.docker.com/t/file-access-in-mounted-volumes-
extremely-slow-cpu-bound/8076), saying this isn't resolved for stable Docker
for Mac. It's totally unusable for Rails development right now.

~~~
nzoschke
The 'convox start' dev environment enables Rails dev on Docker for Mac with a
custom file sync strategy.

This is another case of simple solutions win... You can effectively rsync code
changes without all the low level file system madness.

[https://convox.com/blog/bidirectional-
sync/](https://convox.com/blog/bidirectional-sync/)

~~~
Perceptes
Thanks. There are some workarounds posted in the thread I linked, too.
Frustrating that Docker for Mac doesn't just work for the main use case (local
development), though.

------
spilk
Can I run my usual VirtualBox VMs I have running for everything else (non-
docker related) alongside Docker for Windows yet? When I tried one of the
betas it enabled Hyper-V which prevented me from using any of my other VMs.

~~~
jimlei
Wondering about this myself, going to write up a tutorial soon for people I
know who use Windows. Last time I tried Docker for Windows it broke VirtualBox
completely (just had to disable Hyper-V). Might be an easy fix for that
though, didn't spend any time investigating

------
ben_jones
Can I expect a dockerfile that 100% works on Linux to 100% on Mac and Windows?

~~~
ktzar
Short answer, yes. Medium answer, images your Dockerfile is based on are still
run in a Linux environment, even if it's virtualised differently.

~~~
adamhepner
Wait now, hold on a minute. I'm very confused and curious how does this work?

Can I run any linux-based container on Windows? Can I run (are there any?)
windows-based containers? If so, does it work the other way around: windows
container on linux host? Does it somehow use the recently published Linux
Subsystem for Windows, or is it completely different compatibility layer? If
it is different, doesn't it seem like a waste of effort?

~~~
jimlei
> Can I run any linux-based container on Windows?

No, on windows you still have to run a Linux vm which the containers will run
inside. Meaning all containers actually run on a Linux host. The new Docker
for Windows app only abstract away some stuff so it feels easier working with.

> does it work the other way around

No

~~~
mh-cx
> No, on windows you still have to run a Linux vm which the containers will
> run inside.

I don't think, that's correct. To me that's the whole point of having a native
Windows / Mac version of docker. From their feature list:

> Faster and more reliable – native development environment using hypervisors
> built into each operating system. (No more VirtualBox!)

~~~
drdaeman
No, GP got it right.

The quoted part is that instead of VirtualBox one can use Hyper-V. In either
case, it's handled by docker-machine which runs a GNU/Linux VM with Docker
(host) tools installed, and containers are ran on that VM.

I would be surprised if there aren't plans to support WSL (to run Linux-
targetting binaries on Windows "natively", thus have "native" Docker
containers) but don't think that's available yet.

------
sz4kerto
I still can't bind mount a file in a container if that file already exists in
that containter. Is this production ready?

~~~
avsm
This seems to work fine for me:

docker run -it -v /private/etc/passwd:/etc/passwd alpine sh (not recommended
for any actual use obviously)

Is there a particular case in which this failed for you? We'd appreciate a bug
report on [https://github.com/docker/for-
mac/issues](https://github.com/docker/for-mac/issues) (or from the Docker for
Mac GUI, just click on "Diagnose and Feedback") so we can chase down whatever
issue you're having.

~~~
sz4kerto
Yes, this use case, it happens on Windows and on Mac as well.

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from
daemon: oci runtime error: rootfs_linux.go:53: mounting
"/var/lib/docker/aufs/mn
t/90d24356afdeb7b9ddad4b3b6903be92063151c33bf34f3d63ede464437060c6/cryptoservice/broker-
config.yml" to rootfs "/var/lib/docker/aufs/mnt/90d24356afdeb7b9ddad4
b3b6903be92063151c33bf34f3d63ede464437060c6" caused "not a directory".

(I'm mounting broker-config.yml and that file is already present in the
container. Most recent Docker for Win beta in this case, but getting the same
on non-beta Docker for Mac.)

~~~
seeekr
The error message specifically says "not a directory" and afaik you can't
mount single files, only directories. I at least have never even thought of
trying to mount individual files since the bind mounting functionality in
Docker seems to always and everywhere have been described in a way that
suggests that it's for mounting directories, not individual files.

------
Scorpiion
An interesting fact I think is worth mentioning is that Docker for Mac uses a
forked and currently closed version of xhyve, and not the same xhyve that we
can find on Github. The last commit to open source xhyve was May 27.

With that said Docker has plans to open source it, I wonder if that will
happen soon as they declare Docker for Mac ready for production. That would
imply that the xhyve port also should be ready be contributed back or spin out
into a new project (the quote below said they were not sure if they wanted to
contribute back or make a new project).

Personally I think the "right thing to do" would be to contribute back to
xhyve, at the same time I have a feeling it's more valuable for Docker Inc to
"own" and control their own fork/project so I would guess they will go down
that path instead (it would still be open source, just under a different
project name).

Source:
[https://news.ycombinator.com/item?id=11356293](https://news.ycombinator.com/item?id=11356293)

EDIT: I stand corrected, see talex5 comment below, I had missed the hyperkit
announcement.

~~~
talex5
I think this is what you're looking for:

[https://github.com/docker/hyperkit](https://github.com/docker/hyperkit)

Source: [https://blog.docker.com/2016/05/docker-unikernels-open-
sourc...](https://blog.docker.com/2016/05/docker-unikernels-open-source/)

~~~
Scorpiion
Oh, my bad, thanks for the correction! :)

------
slantedview
I need nested virtualization as well. I don't know if this is possible with
the hypervisor being used, but it's hugely important for me.

~~~
mintplant
Curious, can you share what you need it for?

~~~
slantedview
Basically for hacking on cloud software that runs hypervisors such as kvm.
docker-machine with a VMWare Fusion VM and nested virtualization enabled is
the current approach I use - works fine for now.

------
HerpDerpLerp
"This version of Docker requires Windows 10 Pro, Enterprise or Education
edition with a minimum build number of 10586. Please use Docker Toolbox."

:(

~~~
ZenoArrow
That'll be because Windows 10 is the first desktop Windows OS with support for
Hyper-V.

If you didn't want to use Windows 10, perhaps you might have some more luck
with a Windows Server OS. Does anyone know if the latest version of Docker
will work on Windows Server 2012?

~~~
friism
Client Hyper-V actually showed up in Windows 8 [1], but only recent versions
of Windows 10 have Hyper-V with all the features needed by Docker for Windows.

[1]: [http://www.howtogeek.com/196158/how-to-create-and-run-
virtua...](http://www.howtogeek.com/196158/how-to-create-and-run-virtual-
machines-with-hyper-v/)

------
geekbri
My biggest issue with it is that there seems to be no easy way to provide more
space to the VM docker runs inside. While it seems trivial it can be useful if
you happen to have really large images (yes, for valid reasons). If you run
too many containers you just run out of space.

~~~
cptskippy
I ran into this too when fooling around with SyntaxNet. It hink the default
size of the VM is 16GB. I kept running out of swap space even after bumping
the ram on the VM up to 16GB.

------
turnip1979
Does this thing work on Windows 10 home edition? That doesn't have hyperv I
think.

~~~
kristianp
No it won't work, you're right it seems:

[https://msdn.microsoft.com/en-
us/virtualization/hyperv_on_wi...](https://msdn.microsoft.com/en-
us/virtualization/hyperv_on_windows/quick_start/walkthrough_compatibility)

------
amq
I've been trying to switch from VirtualBox to Hyper-V twice to use Docker for
Windows, but always hit the same wall when using a desktop Linux guest: no 3D
acceleration, no resolution scaling, no shared clipboard.

~~~
lewisl9029
Yes, Hyper-V's Desktop UX for VMs is still in a _really_ sad state compared to
the competition, even for Windows guests, let alone Linux ones. I have it
enabled to use Docker for Windows by default, but very often still need to
reboot to disable it and use VMware Workstation for any serious work inside
VMs, for all the reasons you listed, plus the awesome multi-monitor support in
Workstation.

Microsoft really needs to get its act together.

------
sheraz
Good to see they are moving forward, but I have a working rig at the moment
with virtual box.

"If it ain't broke, then don't fix it" is a motto I live by.

Better it's your blood on the bleeding edge rather than mine :-)

------
jamespacileo
Docker for Windows is unfortunately a bit gimped right now:

\- docker-compose isn't OS agnostic and as versions go forward Windows is
lagging behind

\- this uses Hyper-V which blocks both Virtualbox and Vmware from running

------
cowmix
I love Docker for Mac but I have had a problem of containers just disappearing
after running for a while.

~~~
lahdekorpi
It has a pretty good logging, have you taken a look if it crashes or
something?

------
saysjonathan
If you have issues with the Docker for Mac on Sierra, turn off ntp:

    
    
      sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
    

If I see that "We are whaly happy to have you" welcome screen one more time
though...

~~~
superchink
Can you actually live without NTP though? Isn't that a pretty critical
service?

~~~
zbyte64
One of the issues is that if your laptop goes to sleep your linux container
becomes out of sync on the time. To fix this you have to restart docker.

------
johnchristopher
Last time I checked it didn't support 32 bits but could be tested on Windows
7. Now I see it requires `Microsoft Windows 10 Professional or Enterprise
64-bit For previous versions get Docker Toolbox`.

~~~
cptskippy
Yeah, that's part of why this release baffles me. From 1.11 to 1.12 they
dumped VirtualBox in favor of the latest version of Hyper-V which why it only
supports Windows 10.

That's a pretty significant change in my mind but it didn't seem to extend
their testing/validation timeline at all.

------
jaequery
Anyone know if the volume ozone performance have been improved to at least the
level of nfs method? This is what keeps me away from using the docket for Mac
and just sticking to dinghy until this is fixed

~~~
Axsuul
Would like to know this as well. Docker for Mac performance is still horrible.

------
AjithAntony
ARGH! I can't use Hyper-V on this hardware (no SLAT support).

------
esseti
is anyone having troubles with docker-compose (on mac)? It seems that ports
are not forwarded/opened.

------
xutopia
I'm finding it really funny how even Docker users can't really explain easily
what Docker is.

~~~
alex-
Docker is a process launcher that makes it fast and simple to start processes
with a unique network/filesystem/process/user space (via cgroups and
namespaces).

------
cybernazi
It won't work on Windows 7, 8. It needs Windows 10 pro or enterprise to work.

------
cyzhu
Greate! It's hard to install it before.

