I'm running the 'php:7.4-fpm' container to server a laravel application. When I tried to ssh into the container, I got the following error:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This happened suddenly, I'm working on this project for almost 3 months and had never faced this scenario. My host machine is a mac, catalina (version 10.15.3)
I can run other commands like php/ php artisan etc but its taking too long to respond and also any command related to directories like getcwd/pwd etc are not working.
Why does this happen?
It works fine after restarting the containers but is there permantent solution?
Just encountered same issue. For me rootcause was, that the current folder I'm in was deleted. So solution - check if current folder exists, and cd to an existing one, if current is deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With