abiosoft / abiosoft/colima

Docker PHP container running `composer install` fails with host volume bind mount (`-v "$(pwd)":/opt`)

Offen
#695 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.