Skip to content

Commit 8911811

Browse files
committed
Backport some fixes
1 parent b085e2b commit 8911811

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

core/Dockerfile

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG DOCKER_HUB_PROXY=""
22

33

4-
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as php-base
4+
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS php-base
55
ENV DEBIAN_FRONTEND noninteractive
66

77
# Uncomment when building in corporate environments
@@ -18,7 +18,7 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as php-base
1818
RUN apt-get update
1919

2020

21-
FROM php-base as composer-build
21+
FROM php-base AS composer-build
2222
ENV DEBIAN_FRONTEND noninteractive
2323
ENV COMPOSER_ALLOW_SUPERUSER 1
2424
ARG CORE_TAG
@@ -47,7 +47,7 @@ FROM php-base as composer-build
4747
RUN composer install
4848
RUN composer require --with-all-dependencies --no-interaction \
4949
supervisorphp/supervisor:^4.0 \
50-
guzzlehttp/guzzle \
50+
guzzlehttp/guzzle:^7.4.5 \
5151
lstrojny/fxmlrpc \
5252
php-http/message \
5353
php-http/message-factory \
@@ -57,7 +57,7 @@ FROM php-base as composer-build
5757
aws/aws-sdk-php
5858

5959

60-
FROM php-base as php-build
60+
FROM php-base AS php-build
6161
ENV DEBIAN_FRONTEND noninteractive
6262
ENV TZ Etc/UTC
6363

@@ -68,16 +68,14 @@ FROM php-base as php-build
6868
php7.4 \
6969
php7.4-dev \
7070
php7.4-xml \
71+
php-pear \
72+
libbrotli-dev \
7173
libfuzzy-dev \
7274
librdkafka-dev \
7375
libsimdjson-dev \
7476
libzstd-dev \
75-
git \
76-
php-pear \
7777
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
7878

79-
RUN apt-cache search pecl
80-
8179
RUN update-alternatives --set php /usr/bin/php7.4
8280
RUN update-alternatives --set php-config /usr/bin/php-config7.4
8381
RUN update-alternatives --set phpize /usr/bin/phpize7.4
@@ -87,12 +85,11 @@ FROM php-base as php-build
8785
pecl install ssdeep && \
8886
pecl install rdkafka && \
8987
pecl install simdjson && \
90-
pecl install zstd
91-
RUN git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git && \
92-
cd php-ext-brotli && phpize && ./configure && make && make install
88+
pecl install zstd && \
89+
pecl install brotli
9390

9491

95-
FROM php-base as python-build
92+
FROM php-base AS python-build
9693
ENV DEBIAN_FRONTEND noninteractive
9794
ARG CORE_TAG
9895
ARG CORE_COMMIT
@@ -109,7 +106,7 @@ FROM php-base as python-build
109106
RUN apt-get install -y --no-install-recommends \
110107
git \
111108
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
112-
109+
113110
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
114111
RUN <<-EOF
115112
if [ ! -z "${CORE_COMMIT}" ]; then

modules/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG DOCKER_HUB_PROXY=""
22

3-
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" as python-build
3+
FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS python-build
44
ENV DEBIAN_FRONTEND noninteractive
55
ARG MODULES_TAG
66
ARG MODULES_COMMIT
@@ -75,7 +75,8 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm"
7575

7676
COPY --from=python-build /wheels /wheels
7777
COPY --from=python-build /usr/local/lib/libfaupl* /usr/local/lib/
78-
RUN pip install --no-cache-dir --use-deprecated=legacy-resolver /wheels/*.whl; ldconfig && rm -rf /wheels
78+
RUN ldconfig
79+
RUN pip install --no-cache-dir --use-deprecated=legacy-resolver /wheels/*.whl && rm -rf /wheels
7980

8081
# Since we compile faup ourselves and lua is not required anymore, we can load our own library
8182
# and skip the pre-compiled blob to improve compatibility with other architectures like ARM

0 commit comments

Comments
 (0)