This is a simple PowerShell function that wrappers a call to docker-machine ssh
so you can call composer
as if it was installed on your host locally. It's not 100% functional, since it's not interactive (eg.: composer init
will create the composer.json
file, but will not ask you to fill in the fields. You can overpass this by passing the arguments like in the composer documentation.)
- Paste the contents of the file below into your PowerShell Profile. You haven't already, create one following these instructions.
- Change the
$composerTmpDir
variable to the path where composer will store its caching and configuration files.
Use it like you would normally use composer:
PS C:\Users\MyUser>cd my-project
PS C:\Users\MyUser\my-project> composer install
Fell free to leave any suggestions in the comments bellow or to fork it.