Dockerfile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. FROM php:8.0-fpm-buster
  2. MAINTAINER Mark Shust <mark@shust.com>
  3. ARG APP_ID=1000
  4. RUN apt-get update && apt-get install -y \
  5. cron \
  6. default-mysql-client \
  7. git \
  8. gzip \
  9. libbz2-dev \
  10. libfreetype6-dev \
  11. libicu-dev \
  12. libjpeg62-turbo-dev \
  13. libmcrypt-dev \
  14. libonig-dev \
  15. libpng-dev \
  16. libsodium-dev \
  17. libssh2-1-dev \
  18. libxslt1-dev \
  19. libzip-dev \
  20. lsof \
  21. procps \
  22. vim \
  23. zip
  24. RUN docker-php-ext-configure gd --with-freetype --with-jpeg
  25. RUN docker-php-ext-install \
  26. bcmath \
  27. bz2 \
  28. calendar \
  29. exif \
  30. gd \
  31. gettext \
  32. intl \
  33. mbstring \
  34. mysqli \
  35. opcache \
  36. pcntl \
  37. pdo_mysql \
  38. soap \
  39. sockets \
  40. sodium \
  41. sysvmsg \
  42. sysvsem \
  43. sysvshm \
  44. xsl \
  45. zip
  46. RUN pecl channel-update pecl.php.net \
  47. && pecl install xdebug \
  48. && docker-php-ext-enable xdebug
  49. RUN pecl install ssh2-1.3.1 \
  50. && docker-php-ext-enable ssh2
  51. RUN pecl install redis \
  52. && docker-php-ext-enable redis
  53. RUN apt-get install -y libmagickwand-dev \
  54. && pecl install imagick \
  55. && docker-php-ext-enable imagick
  56. RUN groupadd -g "$APP_ID" app \
  57. && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
  58. RUN apt-get install -y gnupg \
  59. && curl -sL https://deb.nodesource.com/setup_14.x | bash - \
  60. && apt-get install -y nodejs \
  61. && mkdir /var/www/.config /var/www/.npm \
  62. && chown app:app /var/www/.config /var/www/.npm \
  63. && npm install -g grunt-cli
  64. RUN apt-get install -y msmtp mailutils
  65. COPY conf/msmtprc /etc/msmtprc
  66. RUN curl -sS https://getcomposer.org/installer | \
  67. php -- --install-dir=/usr/local/bin --filename=composer
  68. RUN curl -s https://packages.blackfire.io/gpg.key | apt-key add - \
  69. && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
  70. && apt-get update \
  71. && apt-get install blackfire-agent blackfire-php
  72. COPY conf/www.conf /usr/local/etc/php-fpm.d/
  73. COPY conf/php.ini /usr/local/etc/php/
  74. COPY conf/php-fpm.conf /usr/local/etc/
  75. RUN mkdir -p /etc/nginx/html /var/www/html /sock \
  76. && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
  77. USER app:app
  78. VOLUME /var/www
  79. WORKDIR /var/www/html
  80. EXPOSE 9001