Hacker News new | ask | show | jobs
by zgohr 4690 days ago
Hey shykes,

This is something I'm still not quite clear on. According to the issues in mention here: https://github.com/dotcloud/docker/issues/1185 it is possible to do what StavrosK is asking. What am I missing? Why would a volume need an initial state when when the goal can be accomplished with a bind mount?

I also +1'd the documentation issue because I can't seem to wrap my head around what the current state of volumes and mounting is. Appreciate any direction you could point me in.

1 comments

> Why would a volume need an initial state when when the goal can be accomplished with a bind mount?

This is in the special case where you want the application itself to determine the initial state of the volume. For example, the developer might want the database pre-loaded with a certain schema, default data and so on. External volumes/bind mounts are a way for the sysadmin to override how and where the contents of a volume are stored.

Re: documentation, you can take a look at this example: http://docs.docker.io/en/latest/examples/couchdb_data_volume...

I hope this helps! Feel free to join the IRC channel (#docker on freenode), it's unusually active and helpful, I'm very proud of how nice the people are on there :)