-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volumes clobber underlying files #3482
Comments
@fdawg4l please triage |
I remember we made a judgement call to get mounting of volumes to work and punted on copying the underlying data that may exist in the mount point before mounting. The original issue #1819 covered both aspects- mounting, copying, remounting, but the fix only covered the first. Lets use this to track getting the copy working. @LIV2 We'll get a fix going ASAP. In the meantime, your data isn't gone. You can |
A few things to keep in mind.
In our model, volumes are actual devices, not just directories. So the implementation doesn't exactly map to our model as-is. Some things we need to consider.
What if it doesn't involve an update at all? What if the volume is simply detached from container1 and attached to container2. Both use the same image, but how do we differentiate the above (upgrade) scenario with this scenario? Will we need to keep track of source file versions and only apply the updated (future) version? I think we stalled on the above which is why we never implemented the source file in volume workflow. It's trivial to implement, but the model isn't very clear from a user's perspective. @hickeng ? |
@fdawg4l we simply didn't do it because of time. There's quite an array of possible semantics that can be applied and no really good answer. Initially we'll just duplicate docker's behaviour as there is at least a subset who assume those semantics. The primary question for longer term is what use case was this behaviour intended for - I think it was intended to address the scenario where an application doesn't allow for a clean separation of configuration and data files. |
Sounds good @hickeng. IIRC docker's semantics means ovewriting files every time the volume is attached to the container. That shouldn't be too difficult. |
We need a plan of how we want to address this functionality. One suggestion was to use overlayfs to implement COW on the volume. In any case, investigation is required and an interface defined. |
This issue was encountered in #3909. @fdawg4l @matthewavery Can we add an estimate to this and tag it as |
When volumes are mounted in the container they clobber the underlying files instead of copying them like docker does:
https://docs.docker.com/engine/tutorials/dockervolumes/
Steps to reproduce:
Build & run container from the following dockerfile,
/etc/example/nowyouseeme
should exist.Works correctly on Docker 1.10.3, does not work on VIC.
The text was updated successfully, but these errors were encountered: