123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- FROM php:8.1-fpm-bookworm
- LABEL maintainer="Mark Shust <mark@shust.com>"
- ARG APP_ID=1000
- RUN groupadd -g "$APP_ID" app \
- && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
- RUN mkdir -p /etc/nginx/html /var/www/html /sock \
- && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
- RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
- RUN apt-get update && apt-get install -y \
- cron \
- default-mysql-client \
- git \
- gnupg \
- gzip \
- libbz2-dev \
- libfreetype6-dev \
- libicu-dev \
- libjpeg62-turbo-dev \
- libmagickwand-dev \
- libmcrypt-dev \
- libonig-dev \
- libpng-dev \
- libsodium-dev \
- libssh2-1-dev \
- libwebp-dev \
- libxslt1-dev \
- libzip-dev \
- lsof \
- mailutils \
- msmtp \
- nodejs \
- procps \
- rsync \
- strace \
- vim \
- zip \
- zlib1g-dev \
- && rm -rf /var/lib/apt/lists/*
- RUN pecl channel-update pecl.php.net && pecl install \
- redis-6.1.0 \
- ssh2-1.4.1 \
- swoole-5.1.5 \
- xdebug-3.3.2 \
- && pecl clear-cache \
- && rm -rf /tmp/pear
- RUN imagick_branch="28f27044e435a2b203e32675e942eb8de620ee58" \
- && curl -L https://github.com/Imagick/imagick/archive/$imagick_branch.zip -o imagick.zip \
- && unzip imagick.zip \
- && rm imagick.zip \
- && cd imagick-$imagick_branch \
- && phpize \
- && ./configure --with-php-config=/usr/local/bin/php-config \
- && make \
- && make install \
- && echo "extension=imagick.so" >> $PHP_INI_DIR/conf.d/imagick.ini \
- && cd .. \
- && rm -rf imagick-$imagick_branch
- RUN docker-php-ext-configure \
- gd --with-freetype --with-jpeg --with-webp \
- && docker-php-ext-install \
- bcmath \
- bz2 \
- calendar \
- exif \
- gd \
- gettext \
- intl \
- mbstring \
- mysqli \
- opcache \
- pcntl \
- pdo_mysql \
- soap \
- sockets \
- sodium \
- sysvmsg \
- sysvsem \
- sysvshm \
- xsl \
- zip \
- && docker-php-ext-enable \
- imagick \
- redis \
- ssh2 \
- xdebug
- RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
- && architecture=$(uname -m) \
- && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
- && mkdir -p /tmp/blackfire \
- && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
- && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
- && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
- RUN git clone --branch v0.4.17 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \
- && cd /usr/lib/php-spx \
- && phpize \
- && ./configure \
- && make \
- && make install
- RUN curl -sS https://getcomposer.org/installer | \
- php -- --version=2.2.24 --install-dir=/usr/local/bin --filename=composer
- COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini
- COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini
- COPY conf/msmtprc /etc/msmtprc
- COPY conf/php.ini $PHP_INI_DIR
- COPY conf/php-fpm.conf /usr/local/etc/
- COPY conf/www.conf /usr/local/etc/php-fpm.d/
- USER app:app
- VOLUME /var/www
- WORKDIR /var/www/html
|