5 ms·
Do we know yet if mounting a directory from host as a data volume is available in Mac OS X now? I think something along these lines was promised (not able to fi
by rmanocha 12y ago
Do we know yet if mounting a directory from host as a data volume is available in Mac OS X now? I think something along these lines was promised (not able to find the source now) - it's the only thing blocking me from using docker as my everyday dev environment.
- bacongobbler 12y agoStill a work in progress. See https://github.com/dotcloud/docker/issues/4023 https://github.com/dotcloud/docker/issues/4023
- shykes 12y agoThis is a huge undertaking and we are determined to get it right. Thanks again to Brad Fitzpatrick and everyone else contributing this building block!
- evancordell 12y agoI've been working on getting a dev environment set up with docker over the weekend, and I finally have something I'm happy with. I don't have a nice blog post to show you, but the basic idea is: - Use the CoreOS Vagrantfile (+ extra files like user_data and any service unit files) - Share your local directory with the vagrant box with config.vm.synced_folder (just uncomment a line in the Vagrantfile) - set the DOCKER_HOST and FLEETCTL_TUNNEL env variables so that the local tools work transparently with the vagrant box. - Then you have the option of running a docker image with -v and sharing the vagrant directory with the docker container, or - You can dive into CoreOS stuff and write a unit file for your service, and that will share the directory with -v Now local files sync into the docker container, and if the server is configured to reload on file changes you're good to go.
- rmanocha 12y agoThanks a lot, I'll give this a shot tonight. Not too familiar with CoreOS yet; I was hoping that I'd simply be able to mount a volume similar to how I might do it in Linux. I understand the problems with doing that though...
- mmerickel 12y agoCurrently docker can only mount folders from the host VM into your container. On OS X your host will most likely be VirtualBox. Thus you need to sync the folders from your mac into the VM, and from there into docker. The hack that docker-osx (https://github.com/noplay/docker-osx https://github.com/noplay/docker-osx) uses has been very effective for me. Basically it mounts your user directory into the vagrant VM at the same path. From there, you can bind-mount any folder in your home directory easily via something like "docker run -i -t --rm -v $(pwd):/srv ubuntu /bin/bash".