Skip to content

Commit d376f43

Browse files
committed
Replace Debian with Ubuntu 2404 LTS
1 parent b06bac9 commit d376f43

File tree

6 files changed

+765
-23
lines changed

6 files changed

+765
-23
lines changed

core/Dockerfile

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
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}ubuntu:24.04" as php-base
55
ENV DEBIAN_FRONTEND noninteractive
6+
ENV LC_ALL C.UTF-8
67

78
# Uncomment when building in corporate environments
89
# COPY ./rootca.crt /usr/local/share/ca-certificates/rootca.pem
910
# COPY ./rootca.crt /usr/lib/ssl/cert.pem
1011

11-
RUN apt-get update; apt-get install -y --no-install-recommends \
12-
lsb-release \
12+
RUN apt-get update; apt-get upgrade; apt-get install -y --no-install-recommends \
1313
ca-certificates \
14-
curl
15-
RUN curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
16-
RUN dpkg -i /tmp/debsuryorg-archive-keyring.deb
17-
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
14+
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
15+
16+
COPY files/etc/apt/sources.list.d/ondrej-ubuntu-php-noble.sources /etc/apt/sources.list.d/ondrej-ubuntu-php-noble.sources
17+
COPY files/etc/apt/sources.list.d/ondrej-ubuntu-nginx-mainline-noble.sources /etc/apt/sources.list.d/ondrej-ubuntu-nginx-mainline-noble.sources
18+
19+
# RUN apt-get update; apt-get install -y --no-install-recommends \
20+
# software-properties-common
21+
# # && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
22+
# RUN add-apt-repository ppa:ondrej/php
23+
# RUN add-apt-repository ppa:ondrej/nginx-mainline
1824
RUN apt-get update
1925

2026

2127
FROM php-base as composer-build
2228
ENV DEBIAN_FRONTEND noninteractive
2329
ENV COMPOSER_ALLOW_SUPERUSER 1
30+
ENV COMPOSER_IPRESOLVE 4
2431
ARG CORE_TAG
2532
ARG CORE_COMMIT
2633

27-
RUN apt-get install -y --no-install-recommends \
34+
RUN apt-get update; apt-get install -y --no-install-recommends \
35+
ca-certificates \
2836
php7.4 \
2937
php7.4-apcu \
3038
php7.4-curl \
@@ -43,9 +51,16 @@ FROM php-base as composer-build
4351
WORKDIR /tmp
4452
ADD https://raw.githubusercontent.com/MISP/MISP/${CORE_COMMIT:-${CORE_TAG}}/app/composer.json /tmp
4553
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
46-
RUN composer config --no-interaction allow-plugins.composer/installers true
47-
RUN composer install
48-
RUN composer require --with-all-dependencies --no-interaction \
54+
55+
RUN cp /usr/bin/composer /composer.phar
56+
RUN mkdir /out/
57+
RUN php -r '$phar = new Phar("/composer.phar"); $phar->extractTo("/out/");'
58+
59+
COPY files/CurlDownloader.php /out/src/Composer/Util/Http/CurlDownloader.php
60+
RUN php /out/bin/composer config --no-interaction allow-plugins.composer/installers true
61+
RUN php /out/bin/composer config --no-interaction secure-http false
62+
RUN php /out/bin/composer install
63+
RUN php /out/bin/composer require --with-all-dependencies --no-interaction \
4964
supervisorphp/supervisor:^4.0 \
5065
guzzlehttp/guzzle \
5166
lstrojny/fxmlrpc \
@@ -76,8 +91,6 @@ FROM php-base as php-build
7691
php-pear \
7792
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
7893

79-
RUN apt-cache search pecl
80-
8194
RUN update-alternatives --set php /usr/bin/php7.4
8295
RUN update-alternatives --set php-config /usr/bin/php-config7.4
8396
RUN update-alternatives --set phpize /usr/bin/phpize7.4
@@ -108,6 +121,7 @@ FROM php-base as python-build
108121

109122
RUN apt-get install -y --no-install-recommends \
110123
git \
124+
python3-pip \
111125
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
112126

113127
# Download MISP using git in the /var/www/ directory. Remove unnecessary items.
@@ -180,6 +194,7 @@ FROM php-base
180194
gpg-agent \
181195
mariadb-client \
182196
rsync \
197+
python3-pip \
183198
# PHP Requirements
184199
php7.4 \
185200
php7.4-apcu \
@@ -198,7 +213,7 @@ FROM php-base
198213
libldap-common \
199214
librdkafka1 \
200215
libbrotli1 \
201-
libsimdjson14 \
216+
libsimdjson19 \
202217
libzstd1 \
203218
ssdeep \
204219
libfuzzy2 \
@@ -212,7 +227,7 @@ FROM php-base
212227

213228
# Install python modules
214229
COPY --from=python-build /wheels /wheels
215-
RUN pip install --no-cache-dir /wheels/*.whl && rm -rf /wheels
230+
RUN pip install --break-system-packages --no-cache-dir /wheels/*.whl && rm -rf /wheels
216231

217232
# PHP: install prebuilt libraries, then install the app's PHP deps
218233
COPY --from=php-build ["/usr/lib/php/${PHP_VER}/ssdeep.so", "/usr/lib/php/${PHP_VER}/rdkafka.so", "/usr/lib/php/${PHP_VER}/brotli.so", "/usr/lib/php/${PHP_VER}/simdjson.so", "/usr/lib/php/${PHP_VER}/zstd.so", "/usr/lib/php/${PHP_VER}/"]

0 commit comments

Comments
 (0)