mirror of https://github.com/MISP/misp-docker
Backport some fixes
parent
b085e2b90c
commit
8911811384
|
@ -1,7 +1,7 @@
|
||||||
ARG DOCKER_HUB_PROXY=""
|
ARG DOCKER_HUB_PROXY=""
|
||||||
|
|
||||||
|
|
||||||
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as php-base
|
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
|
||||||
|
@ -18,7 +18,7 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as php-base
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
|
|
||||||
FROM php-base as composer-build
|
FROM php-base AS composer-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER 1
|
ENV COMPOSER_ALLOW_SUPERUSER 1
|
||||||
ARG CORE_TAG
|
ARG CORE_TAG
|
||||||
|
@ -47,7 +47,7 @@ FROM php-base as composer-build
|
||||||
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 \
|
supervisorphp/supervisor:^4.0 \
|
||||||
guzzlehttp/guzzle \
|
guzzlehttp/guzzle:^7.4.5 \
|
||||||
lstrojny/fxmlrpc \
|
lstrojny/fxmlrpc \
|
||||||
php-http/message \
|
php-http/message \
|
||||||
php-http/message-factory \
|
php-http/message-factory \
|
||||||
|
@ -57,7 +57,7 @@ FROM php-base as composer-build
|
||||||
aws/aws-sdk-php
|
aws/aws-sdk-php
|
||||||
|
|
||||||
|
|
||||||
FROM php-base as php-build
|
FROM php-base AS php-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV TZ Etc/UTC
|
ENV TZ Etc/UTC
|
||||||
|
|
||||||
|
@ -68,16 +68,14 @@ FROM php-base as php-build
|
||||||
php7.4 \
|
php7.4 \
|
||||||
php7.4-dev \
|
php7.4-dev \
|
||||||
php7.4-xml \
|
php7.4-xml \
|
||||||
|
php-pear \
|
||||||
|
libbrotli-dev \
|
||||||
libfuzzy-dev \
|
libfuzzy-dev \
|
||||||
librdkafka-dev \
|
librdkafka-dev \
|
||||||
libsimdjson-dev \
|
libsimdjson-dev \
|
||||||
libzstd-dev \
|
libzstd-dev \
|
||||||
git \
|
|
||||||
php-pear \
|
|
||||||
&& 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 apt-cache search pecl
|
|
||||||
|
|
||||||
RUN update-alternatives --set php /usr/bin/php7.4
|
RUN update-alternatives --set php /usr/bin/php7.4
|
||||||
RUN update-alternatives --set php-config /usr/bin/php-config7.4
|
RUN update-alternatives --set php-config /usr/bin/php-config7.4
|
||||||
RUN update-alternatives --set phpize /usr/bin/phpize7.4
|
RUN update-alternatives --set phpize /usr/bin/phpize7.4
|
||||||
|
@ -87,12 +85,11 @@ FROM php-base as php-build
|
||||||
pecl install ssdeep && \
|
pecl install ssdeep && \
|
||||||
pecl install rdkafka && \
|
pecl install rdkafka && \
|
||||||
pecl install simdjson && \
|
pecl install simdjson && \
|
||||||
pecl install zstd
|
pecl install zstd && \
|
||||||
RUN git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git && \
|
pecl install brotli
|
||||||
cd php-ext-brotli && 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
|
||||||
ARG CORE_TAG
|
ARG CORE_TAG
|
||||||
ARG CORE_COMMIT
|
ARG CORE_COMMIT
|
||||||
|
@ -109,7 +106,7 @@ FROM php-base as python-build
|
||||||
RUN apt-get install -y --no-install-recommends \
|
RUN apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
&& 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/*
|
||||||
|
|
||||||
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
|
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
if [ ! -z "${CORE_COMMIT}" ]; then
|
if [ ! -z "${CORE_COMMIT}" ]; then
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ARG DOCKER_HUB_PROXY=""
|
ARG DOCKER_HUB_PROXY=""
|
||||||
|
|
||||||
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as python-build
|
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS python-build
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ARG MODULES_TAG
|
ARG MODULES_TAG
|
||||||
ARG MODULES_COMMIT
|
ARG MODULES_COMMIT
|
||||||
|
@ -75,7 +75,8 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm"
|
||||||
|
|
||||||
COPY --from=python-build /wheels /wheels
|
COPY --from=python-build /wheels /wheels
|
||||||
COPY --from=python-build /usr/local/lib/libfaupl* /usr/local/lib/
|
COPY --from=python-build /usr/local/lib/libfaupl* /usr/local/lib/
|
||||||
RUN pip install --no-cache-dir --use-deprecated=legacy-resolver /wheels/*.whl; ldconfig && rm -rf /wheels
|
RUN ldconfig
|
||||||
|
RUN pip install --no-cache-dir --use-deprecated=legacy-resolver /wheels/*.whl && rm -rf /wheels
|
||||||
|
|
||||||
# Since we compile faup ourselves and lua is not required anymore, we can load our own library
|
# Since we compile faup ourselves and lua is not required anymore, we can load our own library
|
||||||
# and skip the pre-compiled blob to improve compatibility with other architectures like ARM
|
# and skip the pre-compiled blob to improve compatibility with other architectures like ARM
|
||||||
|
|
Loading…
Reference in New Issue