docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.62k stars 1.97k forks source link

Issue with modifying files in volumes #3343

Open zerok opened 8 years ago

zerok commented 8 years ago

Hi 😊

We have run into a bit of a problem after upgrading to Docker 1.11 (also on new installations) where modifications of files inside a volume misbehave. Here is what we've tried:

Tested with:

Everything works as expected when doing these operations using Docker for Mac (Version 1.11.0-beta7 (build: 5830) 8b45bc3afc0ca2363890032ac63b003d80ccc242) or on a Linux host without docker-machine.

The Docker file we've used to reproduce this looks like this:

FROM alpine

but we initially noticed this while using the official nginx image using jessie, hence we started to suspect it not being related to the used image.

After restarting the docker-machine it looks like a sync or flush takes places that changes the state of the volume again.

We have tried to provide a test case for reproducing part of this issue. For this purpose I've created a gist: https://gist.github.com/zerok/79ba3842a475bb2d68b0c6767dc31781 with Dockerfile, test script and test-data.

Thank you for your help πŸ™‚ I hope this is the correct project to report this issue. In the end I'm not sure if it is docker-machine or boot2docker, but as it works with Docker for Mac I kind of assumed it was more a docker-machine issue πŸ˜”

thatnerdjosh commented 8 years ago

+1 I noticed the same thing, when using volumes in docker-compose it doesn't use latest files from local machine

thatnerdjosh commented 8 years ago

Looks like the docker container sees the changes properly, but the machine hosting the containers does not, really odd that it doesn't work if the container sees the file changes, but then again there is probably a lot going on with how docker containers see files :)

nathanleclaire commented 8 years ago

Thanks for the issue @NerdsvilleCEO @zerok, I'll take a look.

p7k commented 8 years ago

+1

Zacmatix commented 8 years ago

+1