WSL docker container vendor does not exists

I am trying to install a docker container with ubuntu 20.04 LTS on WSL Windows configuration. Docker is running smoothly, with wsl.

When I run the docker-compose up –build, the installation runs to the point where it has to install all the composer dependencies.

I get the error: /var/www/vendor does not exist and could not be created.

I have tried manually to add /var/www/vendor, however that did not work.
Though it hit me that, isn’t this in the docker container it self that it can’t or have access rights to add the specific folder?

On my unix machine this is working flawlessly (the docker build), only on my wsl this is a challange.

Please check this screenshot:
enter image description here

Source: Windows Questions