如果使用docker

时间:2019-07-14 12:21:09

标签: symfony docker twig

我收到以下错误

     InvalidConfigurationException in ArrayNode.php line 317:
     Unrecognized option "assets" under "framework"

我已经看到过建议从config.yml中删除的帖子

     assets: ~

当我尝试此操作时,它会读取一个新错误

  FileLocatorFileNotFoundException in FileLocator.php line 71:
  The file "images.xml" does not exist (in: /app/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config).  

我不使用它可以工作的docker,所以寻找资产可能有问题吗?

这是我的docker文件

    FROM php:7.1-apache

    ENV SYMFONY_ALLOW_APPDEV=1

    COPY vhost.conf /etc/apache2/sites-available/000-default.conf

    RUN a2enmod rewrite

    WORKDIR /app


  # =========================
  # PHP Configuration

  # Install MCrypt
  RUN apt-get update \
  && apt-get install -y libmcrypt-dev \
  && docker-php-ext-install mcrypt

  # Install Intl
 RUN apt-get update \
 && apt-get install -y libicu-dev \
 && docker-php-ext-install intl

# Install Mysql
RUN docker-php-ext-install mysqli pdo_mysql

# Install Git
RUN apt-get update \
&& apt-get install -y git

 # Install xsl
 RUN apt-get update \
&& apt-get install -y libxslt-dev \
&& docker-php-ext-install xsl

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer

docker撰写文件如下所示-

version: "2"

services:
app:
build:
  context: ./docker
ports:
  - 8000:80
depends_on:
  - db
volumes:
  - .:/app
db:
image: mysql:5.7
environment:
  MYSQL_ROOT_PASSWORD: root

0 个答案:

没有答案