You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing sshfs cache default to false in https://github.com/lima-vm/lima/pull/538 is breaking php composer install in host mounted volumes
#1349
Closed
dschaaff opened this issue
Jan 26, 2022
· 1 comment
· Fixed by #1423
We edit code directly on the macOS host and rely upon these changes showing up in the container. In this case macOS is the source of truth. The one exception is running composer install from inside the container. In that case the container is making the file system changes and we rely on those being reflected back on the host. This scenario was working great in Rancher Desktop 0.7.1. Upon upgrading to 1.0.0 we immediately began seeing failures running composer install.
Plugin kylekatarnls/update-helper could not be initialized, class not found: UpdateHelper\ComposerPlugin
I could work around that specific issue by running composer global require kylekatarnls/update-helper . There was very strange behavior when running composer install afterward though. We would see each dependency show up in the vendor folder, then disappear, and then be replaced by a different dependency. When composer install had finished there was only a single dependency in the vendor folder.
Updating the override.yaml file to re-enable sshfs caching fixes the issue.
mounts:
- location: "~"
sshfs:
cache: true
With that change in place composer install correctly runs inside the container.
Steps to Reproduce
Setup rancher desktop 1.0.0.
Run composer install from inside of a host mounted directory.
Result
Files appear and disappear.
Expected Behavior
Composer install completes successfully with all files reflected on the host filesystem.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
observe the vendor folder in finder while the operation is running. you will see folders appearing and then disappearing
Observe the error
root@0be843f86b29:/var/www# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 48 installs, 0 updates, 0 removals
- Installing kylekatarnls/update-helper (1.2.1): Downloading (100%)
Plugin installation failed (Plugin kylekatarnls/update-helper could not be initialized, class not found: UpdateHelper\ComposerPlugin), rolling back
- Removing kylekatarnls/update-helper (1.2.1)
[UnexpectedValueException]
Plugin kylekatarnls/update-helper could not be initialized, class not found: UpdateHelper\ComposerPlugin
quit rancher desktop
update override.yml to enable sshfs cache
mounts:
- location: "~"
sshfs:
cache: true
relaunch rancher desktop
run docker-compose up -d
exec into pod docker-compose exec php bash
run composer install
Observe that the command now executes successfully.
Rancher Desktop Version
1.0.0
Rancher Desktop K8s Version
1.22.2
What operating system are you using?
macOS
Operating System / Build Version
12.1
What CPU architecture are you using?
arm64 (Apple Silicon)
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
No response
Actual Behavior
We have some php development stacks that use a docker compose file. The code directory is mounted into the container using a bind mount.
We edit code directly on the macOS host and rely upon these changes showing up in the container. In this case macOS is the source of truth. The one exception is running composer install from inside the container. In that case the container is making the file system changes and we rely on those being reflected back on the host. This scenario was working great in Rancher Desktop 0.7.1. Upon upgrading to 1.0.0 we immediately began seeing failures running composer install.
I could work around that specific issue by running
composer global require kylekatarnls/update-helper
. There was very strange behavior when runningcomposer install
afterward though. We would see each dependency show up in the vendor folder, then disappear, and then be replaced by a different dependency. Whencomposer install
had finished there was only a single dependency in the vendor folder.Updating the override.yaml file to re-enable sshfs caching fixes the issue.
With that change in place composer install correctly runs inside the container.
Steps to Reproduce
Setup rancher desktop 1.0.0.
Run composer install from inside of a host mounted directory.
Result
Files appear and disappear.
Expected Behavior
Composer install completes successfully with all files reflected on the host filesystem.
Additional Information
No response
The text was updated successfully, but these errors were encountered: