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.
Hello, I have a similar problem, and it’s easy to replicate:
mount a volume with an executable inside
run the executable (from container cli as well)
the executable exits, but the lock is still in use, and I cannot write the file from both host and container (until i stop the container)
Seems like the lock persists even after the process execution exits, because is held globally from vm and not from the process itself (of course, host system won’t be aware of container processes, but would be great if, once the executable exits, container will free its lock)
2024 and I think I’m running into this same bug, manifesting as problems with pnpm on files in a shared volume. Files are held locked, which prevents them from being move/removable, causing errors. I have to restart the container to release the locks.
Start a widnows docker and mount some exe file. In this case I mount a hello world project that has already been compiled: docker run --rm -it -v C:\Users\Administrator\Desktop\test_project:C:\test_project mcr.microsoft.com/dotnet/framework/runtime:4.8
Run the exe file (in my case C:\test_project\build\RelWithDebInfo\main.exe)
Try to delete the executable file but it is locked.
del C:\test_project\build\RelWithDebInfo\main.exe
C:\test_project\build\RelWithDebInfo\main.exe
Access is denied
If I do:
Start a widnows docker and mount some exe file. In this case I mount a hello world project that has already been compiled: docker run --rm -it -v C:\Users\Administrator\Desktop\test_project:C:\test_project mcr.microsoft.com/dotnet/framework/runtime:4.8
Delete the executable file del C:\test_project\build\RelWithDebInfo\main.exe it works perfectly.