0

I recently got a new working PC with Ubuntu 22.04 on it. I pulled down my repo from Github and decided to give running everything through docker containers a try.

I found a script on laravel docs in order to run composer install through a container.

docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs

Instantly I'm getting an issue saying

In Filesystem.php line 254:

/var/www/html/vendor does not exist and could not be created.

I've read through the documentation, but I can't seem to find anything. I've been googling for hours and keep finding people saying stuff about chown etc. but that just messes things up even worse.

I tried installing a brand new application through

curl -s "https://laravel.build/example-app" | bash

Here I have sail installed and run sail up, but when I try to run composer install or npm install, I get permission issues again.

I'm about to lose my mind here, so I hope someone will be able to help me out.

Jesper Andersen
  • 524
  • 2
  • 6
  • 16

1 Answers1

0

I had this exact problem today, and I was able to determine that Docker Desktop was the cause (mainly due to this GitHub issue). I was able to resolve my issue by switching my docker context to use Docker Engine:

 $ docker context use default

If you are not using Docker Desktop, then I do not know what the solution might be. Setting the folder permissions to 777 did work for me, but like you I was not satisfied with that as an answer.

EndoM8rix
  • 56
  • 7