0

我安装了 docker 并使用 docker-compose 从生成器(http://phpdocker.io/generator)下载了 zip 存档。你知道这个页面是什么吗?这个 zip 存档在我的 Windows 10 Pro 上运行,但在我的 Ubuntu 16.04 笔记本电脑上它崩溃了。它不会在 www 目录中加载 css、js 或图像。

phpdocker/nginx/nginx.conf

server {
    listen 80 default;

    client_max_body_size 108M;

    access_log /var/log/nginx/devel.access.log;


    root /var/www/devel/www;
    index index.php;

    if (!-e $request_filename) {
        rewrite ^.*$ /index.php last;
    }

    location ~ \.php$ {
        fastcgi_pass devel-php-fpm:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PHP_VALUE "error_log=/var/log/nginx/devel_php_errors.log";
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        include fastcgi_params;
    }

} 

DockerFile

FROM phpdockerio/php56-fpm:latest

# Install selected extensions and other stuff
RUN apt-get update \
    && apt-get -y --no-install-recommends install  php5-mysql php5-xdebug php5-sqlite vim mc \
    && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*


WORKDIR "/var/www/devel"

docker-compose.yml 的一部分

devel-once-php-fpm:
  build: .
  dockerfile: php-fpm/Dockerfile
  container_name: devel-php-fpm
  volumes:
    -  ./../projectnette:/var/www/devel
    - ./php-fpm/php-ini-overrides.ini:/etc/php5/fpm/conf.d/99-overrides.ini

你知道是什么导致了错误吗?我做错了什么?

4

0 回答 0