Docker PHP container running `composer install` fails with host volume bind mount (`-v "$(pwd)":/opt`)
- Dominant language
- Go
- Stars
- 30.8k
- Forks
- 613
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When I run:
```sh
docker run --rm \
--pull=always \
-v "$(pwd)":/opt \
-w /opt \
laravelsail/php82-composer:latest \
bash -c "laravel new hello-larvel"
# which runs `composer install` to install PHP package dependencies
```
It fails trying to install PHP package dependencies with the following error:
```
In Filesystem.php line 314:
Could not delete /opt/hello-larvel/vendor/composer/5ece1293/guzzle-uri-tem
plate-b945d74:
```
However, this error does NOT happen if I remove the volume bind mount option `-v "$(pwd)":/opt`
```sh
docker run --rm \
--pull=always \
-w /opt \
laravelsail/php82-composer:latest \
bash -c "laravel new hello-larvel2"
# Success -- no errors!
```
### Version
Colima Version: git commit: `5f30c83963c69c54785bbf4911bf4338d2e5731b`
Lima Version: `0.15.0`
Qemu Version: `7.2.1`
// From `sw_vers`:
ProductName: `macOS`
ProductVersion: `13.3.1`
BuildVersion: `22E261`
### Operating System
- [ ] macOS Intel <= 12 (Monterrey)
- [ ] macOS Intel >= 13 (Ventura)
- [ ] macOS M1 <= 12 (Monterrey)
- [X] macOS M1 >= 13 (Ventura)
- [ ] Linux
### Output of `colima status`
```
INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/king/.colima/default/docker.sock
```
### Reproduction Steps
See Description
### Expected behaviour
The PHP package dependencies should install with docker volume bind mount.
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.