Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. FROM php:5.6-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/cron.php\n#' >> /etc/crontab
  35. COPY conf/www.conf /usr/local/etc/php-fpm.d/
  36. COPY conf/php.ini /usr/local/etc/php/
  37. COPY conf/php-fpm.conf /usr/local/etc/
  38. COPY bin/start /usr/local/bin/
  39. RUN chmod +x /usr/local/bin/start
  40. WORKDIR /var/www/html
  41. EXPOSE 9001
  42. CMD ["/usr/local/bin/start"]