我想在使用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的新手。 我期待着您的答复。