Backport some fixes

pull/99/head
Stefano Ortolani 2024-07-18 15:54:57 +01:00
parent b085e2b90c
commit 8911811384
2 changed files with 13 additions and 15 deletions

View File

@ -1,7 +1,7 @@
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
# 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
FROM php-base as composer-build
FROM php-base AS composer-build
ENV DEBIAN_FRONTEND noninteractive
ENV COMPOSER_ALLOW_SUPERUSER 1
ARG CORE_TAG
@ -47,7 +47,7 @@ FROM php-base as composer-build
RUN composer install
RUN composer require --with-all-dependencies --no-interaction \
supervisorphp/supervisor:^4.0 \
guzzlehttp/guzzle \
guzzlehttp/guzzle:^7.4.5 \
lstrojny/fxmlrpc \
php-http/message \
php-http/message-factory \
@ -57,7 +57,7 @@ FROM php-base as composer-build
aws/aws-sdk-php
FROM php-base as php-build
FROM php-base AS php-build
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Etc/UTC
@ -68,16 +68,14 @@ FROM php-base as php-build
php7.4 \
php7.4-dev \
php7.4-xml \
php-pear \
libbrotli-dev \
libfuzzy-dev \
librdkafka-dev \
libsimdjson-dev \
libzstd-dev \
git \
php-pear \
&& 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-config /usr/bin/php-config7.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 rdkafka && \
pecl install simdjson && \
pecl install zstd
RUN git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git && \
cd php-ext-brotli && phpize && ./configure && make && make install
pecl install zstd && \
pecl install brotli
FROM php-base as python-build
FROM php-base AS python-build
ENV DEBIAN_FRONTEND noninteractive
ARG CORE_TAG
ARG CORE_COMMIT

View File

@ -1,6 +1,6 @@
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
ARG MODULES_TAG
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 /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
# and skip the pre-compiled blob to improve compatibility with other architectures like ARM