3

I'd like to run CoreOS (beta) have the contents of /var/lib/docker available on my host, so I can inspect files inside docker container images. This is for local development only.

Let's take Wordpress development as an example: - I run coreos beta in vagrant - mount my app's code inside a container via volumes - the container image installs wordpress core - and also adds plugins via composer (a php package manager)

I'd like to be able to add wordpress core and the plugins in my IDE for debugging.

I've tried mounting nfs via vagrant from host to vbox. When I first run "docker info", /var/lib/docker is created, but is using devicemapper (instead of overlayfs) and somehow manages to eat up all my HDD space in the devicemapper file (and then hang).

Also thought about intalling nfs-server in coreos but that requires a custom build of coreos-vagrant, and I'd like to avoid that.

Any other options? Thanks!

1 Answer 1

3

The best approach would be to use a Docker volume.

You cannot have /var/lib/docker on NFS, it basically won't work. One could think of getting it to work with Docker's VFS backend over NFS, but that is hardly of any use and performance would be dreadful.

You can potentially export /var/lib/docker, i.e. Docker host would act as NFS server... But this is hardly of any use either.

I appears to me that you simply need to update file in the container without rebuild/restart, which is best served by Docker volumes. You could do this over NFS. Basically Docker host would have /nfs mounted from the Vagrant host and you would the use docker run -v /nfs/wp-plugins:/opt/wp-plugins (or whatever path you want).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .