Announcing Docker ToolBox
blog.docker.com
blog.docker.com
Now, with ailispaw's dockeroot-xhyve you can even get a VM root image that can be grown on the fly, so you never run out of space on your VM when building large Docker images.
In addition, I'd never recommend Docker Compose to web developers that rely on databases, as quirks with it have caused many a volume-only container to be destroyed and rebuilt, thus defeating the purpose.
I've set Docker on my Linux machine and it's working like a charm. Then I had to do the same for my coworkers running OSX, the vbox shared folders are definitely unusable.
Now it's been few days that I'm trying to find the best way to have a two-way sync in order to sync back changes from docker to the OSX folder (eg. when you upload a file and it's saved in the /public folder, otherwise it'll be lost)
So far I've used docker-osx-dev[0] for 1 way sync (with rsync) and it's working nicely.. they also plan to add the support to unison for a 2way sync
I've also found docker-unison[1] but I haven't found a way to have it working correctly
I'd like to try with boot2docker-xhyve, but it only runs on Yosemite and later
At the end of the day though, Docker as a development environment is really bad on OS X until a VM vendor fixes file share performance. I really wish Docker would make it a priority to have decent Mac support.
https://github.com/docker/machine/pull/1358#issuecomment-126...
Virtualbox shared folders are unusable for my purpose (compiling software on Linux).
Anybody know what would cause VMWare Fusion (or any VM for that matter) to behave this way?
You end up with broken code. If you are lucky it has a syntax error. If you are not lucky you get mysterious bugs.
The work around is to go back and try re-editing the file to retrigger a sync.
There are lots recommendations to try Fusion over Vbox but I think this issue makes it a wash.
If you're considering Fusion I'd suggest taking a look at AppCatalyst[1] instead (N.B. I work at VMware, but not on AppCatalyst).
- Its manifest file is more verbose and has a greater toolset [1];
- You can persist content from inside the container way better than simply mounting volumes using docker compose [2];
- Fow now, it relies on VirtualBox (usign debian2docker) but it has a built-in function [3] to sync folders into the container using rsync (significantly increasing performance for file sharing). You can still use VirtualBox Shared Folders if you want to;
- Its built-in DNS server makes you don't worry about port mapping and docker IP issues. You can access your local app running with azk by simply accessing a custom address, like: my-app.dev.azk.io.
[0] http://azk.io[1] http://docs.azk.io/en/azkfilejs/README.html
[2] http://docs.azk.io/en/reference/azkfilejs/mounts.html#persis...
[3] http://docs.azk.io/en/reference/azkfilejs/mounts.html#sync
Can you point me in the direction of a bug report or a more concrete example? I'd like to make sure we follow up.
In terms of fixes, ideally I'd like to see a way of marking a container as "volume-only" -- this would then mean a "docker-compose rm" would not remove it, and "docker-compose up" would never rebuild it.
I bought a new MacBook 2 days ago, and setting it up has never been easier.
Almost all of my development takes place in a Docker environment now, and the Docker ToolBox makes installing that a breeze.
Less XCode, Homebrew, rubygems, npm. More Docker.
docker-machine create -d hyper-v vmnameWe plan on solving all of this. There is a new team at Docker focused entirely on solving "Developer Experience" problems. This initial release of Toolbox is a starting point: a convenience packaging of existing tools. But we are going to update it with more and more improvements.
In short: we are going to work hard to make the experience of using Docker to develop on Mac OS X (and Windows) much, much better.
It is great to hear you guys are working on that. I find Hyper is pretty interesting to run Docker on Mac https://hyper.sh/blog/post/2015/07/30/running-containers-fro....
The most important function of docker, IMHO, is that it standardizes the creation of a VM using Virtualbox across platforms.
Unless Amazon AWS, DigitalOcean, GoogleCompute, etc. allow a docker image (aka a VirtualBox image) to run directly on their base virtualization platform (without me putting together an AMI or whatever on their platform), this just adds another layer of virtualization that I can do without. Do they do this already?
If and when they do that, docker would be tremendously useful because I wouldn't need to rebuild my image for that particular platform (AWS/DO/GC).
And if they do that already, then why aren't they just accepting existing popular VM images (VMWare/VirtualBox)?
ECS abstracts this away, and from your perspective, containers are running on their virtualization platform.
For more sophisticated scheduling needs there is http://www.replicated.com/, https://cloud.google.com/container-engine/, and https://aws.amazon.com/ecs/
Related to what you say about "don't VM's solve this problem?" is a project called https://hyper.sh. They're coming at it from the angle that if VM's can boot really fast, containers are a moot point.
The most important function of Docker is dependency management (allowing you to pack your own runtime with your apps with consummate ease), followed by standardising image distribution and deployment across environments.
A Docker image is not a VM image - it doesn't have a kernel, for starters, and is not designed to be booted in the usual sense (i.e., kernel+init+scripts) - it just has a Linux userland (often quite restricted) and will run _a single process_ by design[1].
Also, AWS and Google Cloud already allow you to run Docker images (on EC2 Container Service and Kubernetes).
Cloud providers won't accept existing VM images in the sense that large-scale hypervisor platforms usually use different formats and they don't need the hassle involved in building and supporting VM conversion services.
It's pointless to have those as a service when anyone can grab Packer or a similar tool and convert a .vbox/.vmdk to an AWS AMI or an Azure Hyper-V image - and support the resulting images themselves (which is another reason why providers make a clear distinction between certified/tested images and third-party ones).
[1]: of course you can launch supervisord and a bunch of stuff underneath it, but if you're doing that, you're doing it wrong.
When you say that it runs a single process by design, does it mean that if my application creates a fork(), the image will be unable to handle scheduling of the additional process?
Let's say I have an application that talks to MySQL. What is the right way in docker? Should I have two separate docker images, one running the application and the other running MySQL, with them talking to each other across the host OS? Or can they be configured in a single docker image?
Yes.
> Or can they be configured in a single docker image?
They can, but it's an anti-pattern and there are hurdles to overcome if you try managing processes using an init system.
> ...if my application creates a fork(), will the container be unable to handle scheduling of the additional process?
Honestly Docker is the epitome of the incorrect understanding of "DevOps".
I always advocate for Linux use (in addition to principles, most things are easier as well), but everyone has their preferred environment.
[1] https://www.joyent.com/blog/spin-up-a-docker-dev-test-enviro...
docker-machine create -d virtualbox --virtualbox-memory 2048 default
and populating environment variables for docker:
eval $(docker-machine env default)
Passing --shell zsh to docker-machine env doesn't seem to change its output. Does zsh understand commands like the following?
export DOCKER_MACHINE_NAME="default"
Reference: https://github.com/docker/machine/pull/939
The Machine maintainers are overwhelmed by pull requests adding new drivers. They are worried about maintenance load, and its impact on the quality of drivers over time. So instead of making promises they can't deliver on, they're investing the time on a plugin architecture, so that everyone can create and add their own drivers without depending on the bottleneck that is the core maintainers.