swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

docker pull 更新后,启动docker-compose 出现错误 #137

Closed sunyang3721 closed 6 years ago

sunyang3721 commented 6 years ago
Q A
Bug report? yes
Feature request? no
Swoft version V1.0
Swoole version 2.0
PHP version 7.1
Runtime environment CentOS 7

我一般是git clone 到本地项目 路径是 /docker-www/swoft CD 到swoft目录内 修改如下文件yaml

version: '2'
services:
    swoft:
        container_name: swo
        image: swoft/swoft:latest
        ports:
            - "8084:80"
        volumes:
            - /docker-www/swoft:/var/www/swoft:rw
        stdin_open: true
        tty: true
        command: php /var/www/swoft/bin/swoft start

保存之后, 直接命令执行 docker-compose up 结果报错了

 Warning: require_once(/var/www/swoft/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/swoft/bin/bootstrap.php on line 2
 Fatal error: require_once(): Failed opening required '/var/www/swoft/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/swoft/bin/bootstrap.php on line 2
swo exited with code 255
huangzhhui commented 6 years ago

挂载的目录里面的项目还没有执行 composer install,请参考 快速起步 - 开发准备