使用composer镜像时,会遇到/tmp并非apline的默认env路径的情况
这时需要在容器内临时增加一个composer的环境变量
1 |
export PATH=$PATH:/tmp/vendor/bin |
这时候再运行命令就可以了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
/app # composer global require laravel/installer /app # export PATH=$PATH:/tmp/vendor/bin /app # laravel Laravel Installer 4.2.7 Usage: command [options] [arguments] Options: -h, --help Display help for the given command. When no command is given display help for the list command -q, --quiet Do not output any message -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: help Display help for a command list List commands new Create a new Laravel application |
There are no comments yet