mirror of https://github.com/MISP/misp-docker
Release MISP 2.5 and PHP 8.2
parent
26ae2bff7c
commit
a5fd58ab25
|
@ -6,3 +6,4 @@
|
||||||
.env
|
.env
|
||||||
env.hcl
|
env.hcl
|
||||||
rootca.crt
|
rootca.crt
|
||||||
|
cert.pem
|
||||||
|
|
|
@ -134,6 +134,7 @@ Custom root CA certificates can be mounted under `/usr/local/share/ca-certificat
|
||||||
|
|
||||||
- Make sure you run a fairly recent version of Docker and Docker Compose (if in doubt, update following the steps outlined in https://docs.docker.com/engine/install/ubuntu/)
|
- Make sure you run a fairly recent version of Docker and Docker Compose (if in doubt, update following the steps outlined in https://docs.docker.com/engine/install/ubuntu/)
|
||||||
- Make sure you are not running an old image or container; when in doubt run `docker system prune --volumes` and clone this repository into an empty directory
|
- Make sure you are not running an old image or container; when in doubt run `docker system prune --volumes` and clone this repository into an empty directory
|
||||||
|
- If you receive an error that the 'start_interval' does not match any of the regexes, update Docker following the steps outlined in https://docs.docker.com/engine/install/ubuntu/)
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,13 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS php-base
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
# Uncomment when building in corporate environments
|
# Uncomment when building in corporate environments
|
||||||
# COPY ./rootca.crt /usr/local/share/ca-certificates/rootca.pem
|
# COPY ./cert.pem /usr/local/share/ca-certificates/rootca.pem
|
||||||
# COPY ./rootca.crt /usr/lib/ssl/cert.pem
|
# COPY ./cert.pem /usr/lib/ssl/cert.pem
|
||||||
|
|
||||||
RUN apt-get update; apt-get install -y --no-install-recommends \
|
RUN apt-get update; apt-get install -y --no-install-recommends \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl
|
curl
|
||||||
RUN curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
|
||||||
RUN dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
|
||||||
RUN echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
|
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
|
|
||||||
FROM php-base AS composer-build
|
FROM php-base AS composer-build
|
||||||
|
@ -25,33 +21,27 @@ FROM php-base AS composer-build
|
||||||
ARG CORE_COMMIT
|
ARG CORE_COMMIT
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends \
|
RUN apt-get install -y --no-install-recommends \
|
||||||
php7.4 \
|
php8.2 \
|
||||||
php7.4-apcu \
|
php8.2-apcu \
|
||||||
php7.4-curl \
|
php8.2-curl \
|
||||||
php7.4-xml \
|
php8.2-xml \
|
||||||
php7.4-intl \
|
php8.2-intl \
|
||||||
php7.4-bcmath \
|
php8.2-bcmath \
|
||||||
php7.4-mbstring \
|
php8.2-mbstring \
|
||||||
php7.4-mysql \
|
php8.2-mysql \
|
||||||
php7.4-redis \
|
php8.2-redis \
|
||||||
php7.4-gd \
|
php8.2-gd \
|
||||||
php7.4-fpm \
|
php8.2-fpm \
|
||||||
php7.4-zip \
|
php8.2-zip \
|
||||||
unzip \
|
unzip \
|
||||||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
ADD https://raw.githubusercontent.com/MISP/MISP/${CORE_COMMIT:-${CORE_TAG}}/app/composer.json /tmp
|
RUN curl -o /tmp/composer.json https://raw.githubusercontent.com/MISP/MISP/${CORE_COMMIT:-${CORE_TAG}}/app/composer.json
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
RUN composer config --no-interaction allow-plugins.composer/installers true
|
RUN composer config --no-interaction allow-plugins.composer/installers true
|
||||||
RUN composer install
|
RUN composer install
|
||||||
RUN composer require --with-all-dependencies --no-interaction \
|
RUN composer require --with-all-dependencies --no-interaction \
|
||||||
supervisorphp/supervisor:^4.0 \
|
|
||||||
guzzlehttp/guzzle:^7.4.5 \
|
|
||||||
lstrojny/fxmlrpc \
|
|
||||||
php-http/message \
|
|
||||||
php-http/message-factory \
|
|
||||||
# docker image specific dependencies
|
|
||||||
elasticsearch/elasticsearch:^8.7.0 \
|
elasticsearch/elasticsearch:^8.7.0 \
|
||||||
jakub-onderka/openid-connect-php:^1.0.0 \
|
jakub-onderka/openid-connect-php:^1.0.0 \
|
||||||
aws/aws-sdk-php
|
aws/aws-sdk-php
|
||||||
|
@ -64,10 +54,11 @@ FROM php-base AS php-build
|
||||||
RUN apt-get install -y --no-install-recommends \
|
RUN apt-get install -y --no-install-recommends \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
|
git \
|
||||||
make \
|
make \
|
||||||
php7.4 \
|
php8.2 \
|
||||||
php7.4-dev \
|
php8.2-dev \
|
||||||
php7.4-xml \
|
php8.2-xml \
|
||||||
php-pear \
|
php-pear \
|
||||||
libbrotli-dev \
|
libbrotli-dev \
|
||||||
libfuzzy-dev \
|
libfuzzy-dev \
|
||||||
|
@ -76,18 +67,20 @@ FROM php-base AS php-build
|
||||||
libzstd-dev \
|
libzstd-dev \
|
||||||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN update-alternatives --set php /usr/bin/php7.4
|
RUN update-alternatives --set php /usr/bin/php8.2
|
||||||
RUN update-alternatives --set php-config /usr/bin/php-config7.4
|
RUN update-alternatives --set php-config /usr/bin/php-config8.2
|
||||||
RUN update-alternatives --set phpize /usr/bin/phpize7.4
|
RUN update-alternatives --set phpize /usr/bin/phpize8.2
|
||||||
|
|
||||||
RUN cp "/usr/lib/$(gcc -dumpmachine)"/libfuzzy.* /usr/lib
|
RUN cp "/usr/lib/$(gcc -dumpmachine)"/libfuzzy.* /usr/lib
|
||||||
RUN pecl channel-update pecl.php.net && \
|
RUN pecl channel-update pecl.php.net && \
|
||||||
pecl install ssdeep && \
|
|
||||||
pecl install rdkafka && \
|
pecl install rdkafka && \
|
||||||
pecl install simdjson && \
|
pecl install simdjson && \
|
||||||
pecl install zstd && \
|
pecl install zstd && \
|
||||||
pecl install brotli
|
pecl install brotli
|
||||||
|
|
||||||
|
# install pect-text-ssdeep 1.2
|
||||||
|
RUN git clone --recursive --depth=1 https://github.com/JakubOnderka/pecl-text-ssdeep.git /tmp/pecl-text-ssdeep
|
||||||
|
RUN cd /tmp/pecl-text-ssdeep && phpize && ./configure && make && make install
|
||||||
|
|
||||||
FROM php-base AS python-build
|
FROM php-base AS python-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
@ -186,19 +179,19 @@ FROM php-base
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
rsync \
|
rsync \
|
||||||
# PHP Requirements
|
# PHP Requirements
|
||||||
php7.4 \
|
php8.2 \
|
||||||
php7.4-apcu \
|
php8.2-apcu \
|
||||||
php7.4-curl \
|
php8.2-curl \
|
||||||
php7.4-xml \
|
php8.2-xml \
|
||||||
php7.4-intl \
|
php8.2-intl \
|
||||||
php7.4-bcmath \
|
php8.2-bcmath \
|
||||||
php7.4-mbstring \
|
php8.2-mbstring \
|
||||||
php7.4-mysql \
|
php8.2-mysql \
|
||||||
php7.4-redis \
|
php8.2-redis \
|
||||||
php7.4-gd \
|
php8.2-gd \
|
||||||
php7.4-fpm \
|
php8.2-fpm \
|
||||||
php7.4-zip \
|
php8.2-zip \
|
||||||
php7.4-ldap \
|
php8.2-ldap \
|
||||||
libmagic1 \
|
libmagic1 \
|
||||||
libldap-common \
|
libldap-common \
|
||||||
librdkafka1 \
|
librdkafka1 \
|
||||||
|
@ -213,7 +206,7 @@ FROM php-base
|
||||||
curl jq \
|
curl jq \
|
||||||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN update-alternatives --set php /usr/bin/php7.4
|
RUN update-alternatives --set php /usr/bin/php8.2
|
||||||
|
|
||||||
# Install python modules
|
# Install python modules
|
||||||
COPY --from=python-build /wheels /wheels
|
COPY --from=python-build /wheels /wheels
|
||||||
|
|
|
@ -33,7 +33,7 @@ change_php_vars() {
|
||||||
echo "Configure PHP | Change PHP values ..." && change_php_vars
|
echo "Configure PHP | Change PHP values ..." && change_php_vars
|
||||||
|
|
||||||
echo "Configure PHP | Starting PHP FPM"
|
echo "Configure PHP | Starting PHP FPM"
|
||||||
/usr/sbin/php-fpm7.4 -R -F & master_pid=$!
|
/usr/sbin/php-fpm8.2 -R -F & master_pid=$!
|
||||||
|
|
||||||
# Wait for it
|
# Wait for it
|
||||||
wait "$master_pid"
|
wait "$master_pid"
|
||||||
|
|
|
@ -24,7 +24,7 @@ location / {
|
||||||
|
|
||||||
location ~ ^/[^/]+\.php(/|$) {
|
location ~ ^/[^/]+\.php(/|$) {
|
||||||
include snippets/fastcgi-php.conf;
|
include snippets/fastcgi-php.conf;
|
||||||
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
||||||
fastcgi_read_timeout 300s;
|
fastcgi_read_timeout 300s;
|
||||||
fastcgi_send_timeout 300s;
|
fastcgi_send_timeout 300s;
|
||||||
fastcgi_connect_timeout 300s;
|
fastcgi_connect_timeout 300s;
|
||||||
|
|
|
@ -6,7 +6,12 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS python-build
|
||||||
ARG MODULES_COMMIT
|
ARG MODULES_COMMIT
|
||||||
ARG LIBFAUP_COMMIT
|
ARG LIBFAUP_COMMIT
|
||||||
|
|
||||||
|
# Uncomment when building in corporate environments
|
||||||
|
# COPY ./cert.pem /usr/local/share/ca-certificates/rootca.pem
|
||||||
|
# COPY ./cert.pem /usr/lib/ssl/cert.pem
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
git \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
# Build-time variables
|
# Build-time variables
|
||||||
##
|
##
|
||||||
|
|
||||||
CORE_TAG=v2.4.198
|
CORE_TAG=v2.5.0
|
||||||
MODULES_TAG=v2.4.197
|
MODULES_TAG=v2.4.197
|
||||||
PHP_VER=20190902
|
PHP_VER=20220829
|
||||||
LIBFAUP_COMMIT=3a26d0a
|
LIBFAUP_COMMIT=3a26d0a
|
||||||
|
|
||||||
# PYPY_* vars take precedence over MISP's
|
# PYPY_* vars take precedence over MISP's
|
||||||
|
@ -20,7 +20,7 @@ LIBFAUP_COMMIT=3a26d0a
|
||||||
# PYPI_MISP_STIX_VERSION"==2.4.194"
|
# PYPI_MISP_STIX_VERSION"==2.4.194"
|
||||||
|
|
||||||
# CORE_COMMIT takes precedence over CORE_TAG
|
# CORE_COMMIT takes precedence over CORE_TAG
|
||||||
# CORE_COMMIT=c56d537
|
# CORE_COMMIT=0bba3f5
|
||||||
# MODULES_COMMIT takes precedence over MODULES_TAG
|
# MODULES_COMMIT takes precedence over MODULES_TAG
|
||||||
# MODULES_COMMIT=de69ae3
|
# MODULES_COMMIT=de69ae3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue