Dockerfile 2.3 KB

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