Describe the bug
Installing a e.g. a TYPO3 project via composer with a composer.json file with "ddev composer install".
After changing the composer.json file and doing "ddev composer update" nothing will be changed (I think the file is cached because of new Docker file caching).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The changes in composer.json file should be used and e.g. new packages installed or updated.
Version and configuration information (please complete the following information):
I haven't looked at the (many) docker 2.2.0.0 problems on Windows yet, but probably using NFS mounting would fix most of them. Not saying it's worth sticking with docker 2.2.0.0, but it's a great technique in general, https://ddev.readthedocs.io/en/stable/users/performance/
I think you're saying that composer.json is not being updated in the container when changed on the host, is that correct @Kephson ? Can you try to confirm that by changing it and viewing it inside the container?
If that's the case, then this issue isn't about ddev composer at all, but about consistency of mounted files between host and container.
This is https://github.com/docker/for-win/issues/5530 - Basically their vaunted new Fuse filesystem doesn't work in this release. I've tested a number of things, and changes inside the container don't get reflected to the host; changes on the host don't get reflected into the container.
many thanks @rfay for your fast answer and suport!
I checked now how to work with NFS on Windows and now it works like before also with Docker Desktop 2.2.
I installed NFS and enabled it in my ddev project, now also "ddev composer update" works like before.
It looks to me like they just added cache consistency configuration into Windows without telling anybody, from a comment in https://github.com/docker/for-win/issues/5530#issuecomment-577634366
So probably this can be fixed by changing to "consistent" as the cache requirement, see https://docs.docker.com/compose/compose-file/#caching-options-for-volume-mounts-docker-desktop-for-mac - note that they haven't updated the docs to say that it happens anywhere but macOS.
I also note that the fact that we've long used :cached on macOS could cause some composer issues, where the container side does major updates and it doesn't show up in time on the host side, because the host side is favored. Unfortunately, :cached is a huge win for performance on mac (but nowhere near as much as nfs_mount_enabled)
Tried changing to 'consistent' and it didn't work for me. Following the instruction in docker/for-win#5530 to add a disable-filesystem-caching file fixed it for me.
I note that they seem to have basically withdrawn 2.2.0.0 - When I check for updates on a non-updated machine, it no longer offers 2.2.0.0.
@joshuasosa what does performance seem like with the disable-filesystem-caching setup?
A couple of details:
Just FYI:
On Win 10, Docker Desk. 2.2.0.0, Ddev v1.13.0 had this issue.
I updated nfs_mount_enabled: false line to "true" in .ddev/config.yaml file (like @rfay said above), restart and all good.
Thanks all!
Docker Desktop for Windows 2.2.0.3 was released today; I tested a prerelease and it seemed like it was going to be fine.
Most helpful comment
many thanks @rfay for your fast answer and suport!
I checked now how to work with NFS on Windows and now it works like before also with Docker Desktop 2.2.
I installed NFS and enabled it in my ddev project, now also "ddev composer update" works like before.