Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM php:7.1-fpm
  2. MAINTAINER Mark Shust <mark@shust.com>
  3. RUN apt-get update && apt-get install -y \
  4. cron \
  5. git \
  6. libfreetype6-dev \
  7. libicu-dev \
  8. libjpeg62-turbo-dev \
  9. libmcrypt-dev \
  10. libpng12-dev \
  11. libxslt1-dev \
  12. mysql-client \
  13. vim \
  14. zip
  15. RUN docker-php-ext-configure \
  16. gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
  17. RUN docker-php-ext-install \
  18. bcmath \
  19. gd \
  20. intl \
  21. mbstring \
  22. mcrypt \
  23. opcache \
  24. pdo_mysql \
  25. soap \
  26. xsl \
  27. zip
  28. RUN pecl install xdebug \
  29. && docker-php-ext-enable xdebug
  30. RUN curl -sS https://getcomposer.org/installer | \
  31. php -- --install-dir=/usr/local/bin --filename=composer
  32. RUN groupadd -g 1000 app \
  33. && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
  34. RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n#' >> /etc/crontab
  35. RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n#' >> /etc/crontab
  36. RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#' >> /etc/crontab
  37. COPY conf/www.conf /usr/local/etc/php-fpm.d/
  38. COPY conf/php.ini /usr/local/etc/php/
  39. COPY conf/php-fpm.conf /usr/local/etc/
  40. COPY bin/start /usr/local/bin/
  41. RUN chmod +x /usr/local/bin/start
  42. WORKDIR /var/www/html
  43. EXPOSE 9001
  44. CMD ["/usr/local/bin/start"]