如何修复“在使用docker安装symfony时执行“'cache:clear --no-warmup'”命令时发生错误:“

时间:2019-05-09 09:59:20

标签: symfony docker dockerfile centos7

我想在使用CentOS 7的计算机上使用docker部署Symfony环境,但是在尝试构建映像时出现此错误:

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

In UnitOfWork.php line 2636:

 Warning: "continue" targeting switch is equivalent to "break". Did you mean  
  to use "continue 2"?                                                        


Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception


 [RuntimeException]                                                               
 An error occurred when executing the "'cache:clear --no-warmup'" command:        




 In UnitOfWork.php line 2636:                                                     

   Warning: "continue" targeting switch is equivalent to "break". Did you mean    
    to use "continue 2"?                                                          


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

这是我的dockerfile:

FROM php:latest

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get update && apt-get install -y git libpng-dev && apt-get install -y libzip-dev
RUN docker-php-ext-install zip && docker-php-ext-enable zip
RUN mkdir -p /var/www/html
RUN composer clearcache

RUN composer require symfony/requirements-checker

RUN composer create-project symfony/framework-standard-edition /var/www/html
RUN chmod +x /var/www/html/bin/console

我尝试手动清除缓存,但没有成功。 我不知道该怎么解决。我是docker和symfony的新手。 我期待着您的答复。

0 个答案:

没有答案