Dockerfile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. FROM php:7.4-fpm-bullseye
  2. MAINTAINER Mark Shust <mark@shust.com>
  3. ARG APP_ID=1000
  4. RUN groupadd -g "$APP_ID" app \
  5. && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
  6. RUN mkdir -p /etc/nginx/html /var/www/html /sock \
  7. && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
  8. RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
  9. RUN apt-get update && apt-get install -y \
  10. cron \
  11. default-mysql-client \
  12. git \
  13. gnupg \
  14. gzip \
  15. libbz2-dev \
  16. libfreetype6-dev \
  17. libicu-dev \
  18. libjpeg62-turbo-dev \
  19. libmagickwand-dev \
  20. libmcrypt-dev \
  21. libonig-dev \
  22. libpng-dev \
  23. libsodium-dev \
  24. libssh2-1-dev \
  25. libwebp-dev \
  26. libxslt1-dev \
  27. libzip-dev \
  28. lsof \
  29. mailutils \
  30. msmtp \
  31. nodejs \
  32. procps \
  33. vim \
  34. zip \
  35. && rm -rf /var/lib/apt/lists/*
  36. RUN pecl channel-update pecl.php.net && pecl install \
  37. imagick \
  38. redis \
  39. ssh2-1.2 \
  40. xdebug \
  41. && pecl clear-cache \
  42. && rm -rf /tmp/pear
  43. RUN docker-php-ext-configure \
  44. gd --with-freetype --with-jpeg --with-webp \
  45. && docker-php-ext-install \
  46. bcmath \
  47. bz2 \
  48. calendar \
  49. exif \
  50. gd \
  51. gettext \
  52. intl \
  53. mbstring \
  54. mysqli \
  55. opcache \
  56. pcntl \
  57. pdo_mysql \
  58. soap \
  59. sockets \
  60. sodium \
  61. sysvmsg \
  62. sysvsem \
  63. sysvshm \
  64. xsl \
  65. zip \
  66. && docker-php-ext-enable \
  67. imagick \
  68. redis \
  69. ssh2 \
  70. xdebug
  71. RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
  72. && architecture=$(uname -m) \
  73. && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
  74. && mkdir -p /tmp/blackfire \
  75. && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
  76. && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
  77. && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
  78. RUN curl -sS https://getcomposer.org/installer | \
  79. php -- --install-dir=/usr/local/bin --filename=composer
  80. COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini
  81. COPY conf/msmtprc /etc/msmtprc
  82. COPY conf/php.ini $PHP_INI_DIR
  83. COPY conf/php-fpm.conf /usr/local/etc/
  84. COPY conf/www.conf /usr/local/etc/php-fpm.d/
  85. USER app:app
  86. VOLUME /var/www
  87. WORKDIR /var/www/html