From 3925e0ce307c6b21f67353f35f2ecefc43bad119 Mon Sep 17 00:00:00 2001 From: ThinkSAAS <thinksaas@qq.com> Date: Mon, 13 Jul 2020 21:24:29 +0800 Subject: [PATCH] Dockerfile --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Dockerfile b/Dockerfile index cf2a416d..dfd7c407 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,38 @@ FROM php:7.2-apache + +RUN apt-get update \ + # 相关ä¾èµ–必须手动安装 + && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev \ + # memcached 的相关ä¾èµ– + && apt-get install -y libmemcached-dev zlib1g-dev \ + # 安装扩展 + && docker-php-ext-install -j$(nproc) iconv \ + # 如果安装的扩展需è¦è‡ªå®šä¹‰é…置时 + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd \ + # pecl 安å“mcrypt php从7.2开始ä¸å†åœ¨æºç 里支æŒmcrypt扩展而转到peclæ–¹å¼æ”¯æŒ + && pecl install mcrypt-1.0.1 \ + && docker-php-ext-enable mcrypt \ + # 其他扩展 + && docker-php-ext-install mysqli \ + && docker-php-ext-install pdo_mysql \ + # pecl安装phpçš„memcached扩展 + && pecl install memcached \ + # å¯ç”¨memcached 扩展 + && docker-php-ext-enable memcached \ + # pecl 安装phpçš„redis扩展 + && pecl install redis \ + # å¯ç”¨redis扩展 + && docker-php-ext-enable redis + COPY . /var/www/html/ +RUN chmod -R 755 /var/www/html/cache +RUN chmod -R 755 /var/www/html/data +RUN chmod -R 755 /var/www/html/tslogs +RUN chmod -R 755 /var/www/html/upgrade +RUN chmod -R 755 /var/www/html/uploadfile + ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 -- GitLab