Commit c4bc3cdb authored by deathstar's avatar deathstar

Update Dockerfile

parent baf66b1f
Pipeline #73 passed with stage
# Для начала указываем исходный образ, он будет использован как основа
FROM php:7.2-fpm
FROM php:7.1-fpm
# Необязательная строка с указанием автора образа
MAINTAINER PHPtoday.ru <info@phptoday.ru>
......@@ -19,15 +20,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
libzip-dev \
&& docker-php-ext-install -j$(nproc) mbstring mysqli pdo_mysql zip opcache \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
&& docker-php-ext-install -j$(nproc) gd \
&& git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached \
&& cd /usr/src/php/ext/memcached && git checkout -b php7 origin/php7 \
&& docker-php-ext-configure memcached \
&& docker-php-ext-install memcached \
&& git clone https://github.com/websupport-sk/pecl-memcache /usr/src/php/ext/memcache \
&& cd /usr/src/php/ext/memcache && git checkout -b php7 origin/php7 \
&& docker-php-ext-configure memcache \
&& docker-php-ext-install memcache
# Куда же без composer'а.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Добавим свой php.ini, можем в нем определять свои значения конфига
ADD php.ini /usr/local/etc/php/conf.d/40-custom.ini
ADD php-fpm.d/www.conf /usr/local/etc/php-fpm.d/www.conf
# Указываем рабочую директорию для PHP
WORKDIR /var/www
RUN chown -R 33:33 /var/www /tmp
......@@ -35,4 +44,4 @@ RUN chown -R 33:33 /var/www /tmp
# Запускаем контейнер
# Из документации: The main purpose of a CMD is to provide defaults for an executing container. These defaults can include an executable,
# or they can omit the executable, in which case you must specify an ENTRYPOINT instruction as well.
CMD ["php-fpm"]
CMD ["php-fpm"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment