Docker Community Forums

Share and learn in the Docker community.

Files getting locked on shared volume using Docker for Windows

docker

(Ktamlyn) #1

Issue Type: networking/volumes
OS Version/build: Docker for Windows
App version: Latest as of 12/19/2016
Steps to reproduce: Not certain but generally this is what I did: Clone Laradock from github. Use docker compose to stand up the following services: mysql/apache2. Set up a Laravel+Angular 2 project, use IDE on host such as IntellIJ to edit files. Work on site until some pages stop loading.

I have encountered a problem where files get locked (file is in use by another process), but are still readable (as well as something goes wrong with the Apache 2 container).

The environment is Windows For Docker, using an Apache2, PHP, and MySQL set of containers (from Laradock). There is a shared volume among these containers and my IDE (IntelliJ).

After launch of the containers, the environment works fine for a period of time. Eventually some pages stop loading in the browser and from what I can tell one or more files become locked because they are in use.

Restarting Apache does not help, but restarting the entire Apache 2 container does, which makes me suspect an issue with Docker volumes, not the Apache 2 container.

Any thoughts on a possible root cause/solution?


(Jshowalter) #2

We’re seeing the same thing.

Running Docker on Windows 10, sharing C drive:

   - $HOME/dev:/root/dev
   - $HOME/.m2:/root/.m2

Thought it was Tomcat and/or Apache, but locks persist after shutting them down.

Locks are not released until we shut down Docker.


(Nsepetys) #3

Getting file locking on mounted drive.

Host OS: Windows 10
Docker Version: 18.06.1-ce-win73 (19507)

Cannot consistently replicate.

Work Around: Close Docker process. This releases the file(s) from the lock.