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:
- Creating a new file inside the volume works from within the container -> OK
- Deleting a file outside the container results in the file no longer being visible inside the container -> OK
- Modifying an existing file from inside the container works but is only visible outside of the container -> BAD
- Modifications made to an existing file outside the container are not visible inside the container -> BAD
Setups where we could reproduce this behaviour so far:
- docker-machine 0.7.0, docker 1.11.0, OSX 10.11.4, VirtualBox 5.0.16 r105871
Setups where the operations behaved as expected:
- Docker running on a native Linux host without Docker Machine in between
- Docker for Mac (Version 1.11.0-beta7 (build: 5830) 8b45bc3afc0ca2363890032ac63b003d80ccc242)
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:
git clone https://gist.github.com/79ba3842a475bb2d68b0c6767dc31781.git
cd 79ba3842a475bb2d68b0c6767dc31781
docker build -t volume-bug .
docker run --rm -v $PWD:/opt volume-bug:latest
(Issue we created in the docker-machine project.)