mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 00:34:40 +01:00
31 lines
907 B
Docker
31 lines
907 B
Docker
FROM php:8.3-fpm-alpine
|
|
|
|
RUN apk add --no-cache make g++ && \
|
|
curl -sSLf https://github.com/danog/PrimeModule-ext/archive/refs/tags/2.0.tar.gz | tar -xz && \
|
|
cd PrimeModule-ext-2.0 && \
|
|
make -j$(nproc) && \
|
|
make install && \
|
|
cd .. && \
|
|
rm -r PrimeModule-ext-2.0 && \
|
|
apk del make g++
|
|
|
|
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
|
|
|
RUN chmod +x /usr/local/bin/install-php-extensions && \
|
|
install-php-extensions pcntl uv-beta ffi pq memprof intl gmp mbstring pdo_mysql xml dom iconv zip igbinary gd && \
|
|
rm /usr/local/bin/install-php-extensions
|
|
|
|
RUN apk add --no-cache ffmpeg nghttp2 jemalloc
|
|
|
|
ENV LD_PRELOAD=libjemalloc.so.2
|
|
|
|
ADD ./tests/dockerfiles/php.ini /usr/local/etc/php/php.ini
|
|
|
|
ADD ./tests/jit.php /jit.php
|
|
|
|
RUN php /jit.php && rm /jit.php
|
|
|
|
WORKDIR /app
|
|
|
|
CMD ["php", "/app/bot.php"]
|