Do you really need a samba/Windows fileshare? And where do your variables come from? the lowercase path, pwd and uid? PATH, PWD and UID could exists automatically on Linux or macOS, the lowercase variants would needed to be set somewhere. And where is the server IP address? Is it set in “path”? You could try a simple bind mount to see if the content appears locally.
services:
smarty_installer:
image: composer
volumes:
- ./vendor:/vendor
command: require smarty/smarty
You can also search for similar issues like this