julien-duponchelle / docker-osx

Fast and easy installation of Docker on OS X
1.03k stars 70 forks source link

Now use NFS for shared folders. #61

Open jayd3e opened 10 years ago

jayd3e commented 10 years ago

Fixed issue #60.

freewil commented 10 years ago

:+1:

fntlnz commented 10 years ago

:+1:

fzaninotto commented 9 years ago

What's missing to merge this one?

julien-duponchelle commented 9 years ago

This require user to be root isn't it? In this case i'm not sure if we can merge this.

freewil commented 9 years ago

Assuming the user has sudo privileges, it may prompt for password, not a problem. There are ways to customize the sudoers file so you don't need to even do that. See https://docs.vagrantup.com/v2/synced-folders/nfs.html

$ docker-osx start
Start Docker Virtual machine
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
    default: /vagrant => /Users/sean/.docker-osx
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: lxc-docker-1.2.0 is already the newest version.
==> default: The following packages were automatically installed and are no longer required:
==> default:   dnsmasq-base debootstrap libcap2-bin python-paramiko libyaml-0-2
==> default:   libnetfilter-conntrack3 lxc libpam-cap python-boto libapparmor1
==> default:   python-m2crypto cloud-utils python-yaml euca2ools bridge-utils python-crypto
==> default: Use 'apt-get autoremove' to remove them.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 118 not upgraded.
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: stdin: is not a tty
docker stop/waiting
docker start/running, process 1677
Connection to 127.0.0.1 closed.

The virtual machine with the docker daemon is now running.
When you are finished and want to shut it down, just run:

  docker-osx halt

To use docker, point the DOCKER_HOST environment variable
to the docker daemon running on the virtual machine:

  eval `docker-osx env`

Put this in your .profile to make it permanent.

Then, just use the docker command from OS X directly.
vmlaunch commented 9 years ago

Why would we use NFS for shared folders?

GlusterFS, http://www.gluster.org iRODS (Integrated Rule-Oriented Data System), http://wiki.irods.org http://www.gluster.org/ OpenStack Swift, https://wiki.openstack.org/wiki/Swift ... etc. iRODS is what was General Atomics (GA.com) Nirvana which was previously SRB (Storage Resource Broker) and it was brought to market in 1995. That, in 1995, came about from developments at San Diego Supercomputer Center (SDSC) from the early 80's I believe but have not double-checked or cited source on that :). Anyway, iRODS is totally open source and has connectors for HDFS, blah blah blah everything you can imagine.

Build one for a stupid docker little bull-shit disk thingy and hook it all up. It'll be great.

Matt Kaufmanspc@spclops.com | 717.672.8304 cell | 415.854.2257 voicemail

This message is intended only for the use of the individual or entity to which it is addressed, and contains information that is privileged, confidential and/or otherwise exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, any disclosure, dissemination, distribution, copying or other use of this communication or its substance is prohibited. If you have received this communication in error, please return to the sender and delete from your computer system.

---- On Fri, 05 Sep 2014 06:52:43 -0700 Julien Duponchelle<notifications@github.com> wrote ----

This require user to be root isn't it? In this case i'm not sure if we can merge this. — Reply to this email directly or view it on GitHub.

amaltson commented 9 years ago

:+1: Michell Hashimoto did a thorough analysis of filesystem performance in VBox and VMware. tl;dr is that VBox performs much better with NFS.

julien-duponchelle commented 9 years ago

Perhaps a good solution can be to ask if user want to use NFS. We are doing that for the /etc/hosts

Something like that:

Use NFS for shared folders? (Faster, but require sudo rights): [Y/n]
freewil commented 9 years ago

Perhaps a good solution can be to ask if user want to use NFS.

:+1:

HelloGrayson commented 9 years ago

Will filesystem events still fire? I would hate to lose the benefit of doing watchdog like running of dev servers...