From 848d89243750cf56bfce0c7775a491e72cabe677 Mon Sep 17 00:00:00 2001 From: Danil Kostromin Date: Mon, 8 Dec 2025 07:45:35 +0300 Subject: [PATCH 1/2] chore(release): v2.5.0 Release 2.5.0 Signed-off-by: Danil Kostromin --- bublik | 2 +- bublik-release | 2 +- bublik-ui | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bublik b/bublik index 719e3ec..4816e98 160000 --- a/bublik +++ b/bublik @@ -1 +1 @@ -Subproject commit 719e3ecab79d71c7900a700af391772d31058fd2 +Subproject commit 4816e981e5c8f7f24c632ec02b57c7fe26ad041b diff --git a/bublik-release b/bublik-release index c5974a1..742b229 160000 --- a/bublik-release +++ b/bublik-release @@ -1 +1 @@ -Subproject commit c5974a18647a71c4be7f9f4e8a44929850ca68de +Subproject commit 742b22907a0f9439ecf8b827136406ae2600ad3f diff --git a/bublik-ui b/bublik-ui index bd8d7f8..054f101 160000 --- a/bublik-ui +++ b/bublik-ui @@ -1 +1 @@ -Subproject commit bd8d7f80befc13cde222e202e4baef81cb8956fd +Subproject commit 054f101fb3bd697575b26180d695d86f5316bd19 From 05afd95e47f25e6dbb807acd67a1a15b8b2b8212 Mon Sep 17 00:00:00 2001 From: Danil Kostromin Date: Mon, 8 Dec 2025 06:33:53 +0300 Subject: [PATCH 2/2] WIP Make images smaller Signed-off-by: Danil Kostromin --- Dockerfile | 139 +++++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 67 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2faf680..ea2b710 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,56 +1,65 @@ -########################################### -# Base Python Image # -########################################### -FROM python:3.12-slim-bookworm AS base - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 -ENV PATH="/app/te/build/inst/default/bin:$PATH" - -WORKDIR /app +### +# Build TE and Python Packages +### +FROM python:3.13-slim AS builder RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - gettext \ - python3-celery \ - gosu \ - util-linux \ - rsync \ - flex \ - bison \ - ninja-build \ - libjansson-dev \ - libjansson-doc \ - libjansson4 \ - libpopt-dev \ - libpcre3-dev \ - pixz \ - libxml-parser-perl \ - build-essential \ - curl \ - libkrb5-dev \ - libffi-dev \ - libxml2-dev \ - libyaml-dev \ - libssl-dev \ - libglib2.0-dev \ - git \ - && rm -rf /var/lib/apt/lists/* \ - && cpan -T JSON - -# Install UV + && apt-get install -y --no-install-recommends \ + gettext \ + python3-celery \ + gosu \ + util-linux \ + rsync \ + flex \ + bison \ + ninja-build \ + libjansson-dev \ + libjansson-doc \ + libjansson4 \ + libpopt-dev \ + libpcre2-8-0 \ + pixz \ + libxml-parser-perl \ + build-essential \ + curl \ + libkrb5-dev \ + libffi-dev \ + libxml2-dev \ + libyaml-dev \ + libssl-dev \ + libglib2.0-dev \ + && rm -rf /var/lib/apt/lists/* + ADD https://astral.sh/uv/install.sh /uv-installer.sh RUN chmod +x /uv-installer.sh && /uv-installer.sh && rm /uv-installer.sh ENV PATH="/root/.local/bin/:$PATH" -ENV UV_HTTP_TIMEOUT=2400 -# Install dependencies using uv pip RUN uv pip install --system --no-cache-dir meson==1.6.1 watchfiles==1.0.4 -RUN mkdir bublik +WORKDIR /app/te +COPY ./test-environment . +RUN ./dispatcher.sh -q --conf-builder=builder.conf.tools --no-run + +WORKDIR /app +COPY ./bublik/requirements.txt . +RUN uv pip install --system --prefix=/install --no-cache-dir -r requirements.txt + +### +# Base +### +FROM python:3.13-slim AS base +ENV PATH="/app/te/build/inst/default/bin:$PATH" + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + git \ + gosu \ + && rm -rf /var/lib/apt/lists/* -COPY ./bublik/requirements.txt /app/bublik/requirements.txt -RUN uv pip install --system --no-cache-dir -r /app/bublik/requirements.txt +WORKDIR /app + +COPY --from=builder /install /usr/local +COPY --from=builder /app/te/build /app/te/build COPY ./entrypoint-common.sh /app/bublik/entrypoint-common.sh COPY ./entrypoint-django.sh /app/bublik/entrypoint-django.sh @@ -58,12 +67,8 @@ COPY ./entrypoint-celery.sh /app/bublik/entrypoint-celery.sh COPY ./entrypoint-logserver.sh /app/bublik/entrypoint-logserver.sh RUN chmod +x /app/bublik/entrypoint-*.sh -WORKDIR /app/te -COPY ./test-environment . -RUN ./dispatcher.sh -q --conf-builder=builder.conf.tools --no-run - ########################################### -# Documentation +# Documentation ########################################### FROM node:24.11-alpine AS docs-base @@ -120,16 +125,16 @@ RUN apt-get update && apt-get install -y \ RUN a2enmod cgid RUN mkdir -p \ - /home/te-logs/cgi-bin \ - /home/te-logs/logs \ - /home/te-logs/incoming \ - /home/te-logs/bad \ - /home/te-logs/bin \ - /app/bublik \ - /app/te-templates \ - && chmod -R 775 /home/te-logs/logs \ - && chmod -R 775 /home/te-logs/incoming \ - && chmod -R 775 /home/te-logs/bad + /home/te-logs/cgi-bin \ + /home/te-logs/logs \ + /home/te-logs/incoming \ + /home/te-logs/bad \ + /home/te-logs/bin \ + /app/bublik \ + /app/te-templates \ + && chmod -R 775 /home/te-logs/logs \ + && chmod -R 775 /home/te-logs/incoming \ + && chmod -R 775 /home/te-logs/bad COPY ./entrypoint-common.sh /app/bublik/entrypoint-common.sh COPY ./entrypoint-logserver.sh /app/bublik/entrypoint-logserver.sh @@ -144,18 +149,18 @@ COPY ./test-environment/tools/log_server/apache2-te-log-server.conf.template /ap RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf RUN ln -sf /proc/self/fd/1 /var/log/apache2/access.log && \ - ln -sf /proc/self/fd/2 /var/log/apache2/error.log + ln -sf /proc/self/fd/2 /var/log/apache2/error.log RUN sed -i \ - -e 's|ErrorLog ${APACHE_LOG_DIR}/error.log|ErrorLog /proc/self/fd/2|' \ - -e 's|CustomLog ${APACHE_LOG_DIR}/access.log combined|CustomLog /proc/self/fd/1 combined|' \ - /etc/apache2/apache2.conf + -e 's|ErrorLog ${APACHE_LOG_DIR}/error.log|ErrorLog /proc/self/fd/2|' \ + -e 's|CustomLog ${APACHE_LOG_DIR}/access.log combined|CustomLog /proc/self/fd/1 combined|' \ + /etc/apache2/apache2.conf RUN mkdir -p /app/te-logs-static && \ - cd /app/te/build/inst/default/share/rgt-format/xml2html-multi && \ - cp -r /app/te/build/inst/default/share/rgt-format/xml2html-multi/images /app/te-logs-static/ && \ - find . -type f -not -path "./images/*" -exec cp {} /app/te-logs-static/ \; && \ - chmod -R 755 /app/te-logs-static + cd /app/te/build/inst/default/share/rgt-format/xml2html-multi && \ + cp -r /app/te/build/inst/default/share/rgt-format/xml2html-multi/images /app/te-logs-static/ && \ + find . -type f -not -path "./images/*" -exec cp {} /app/te-logs-static/ \; && \ + chmod -R 755 /app/te-logs-static EXPOSE ${BUBLIK_DOCKER_TE_LOG_SERVER_PORT} ENTRYPOINT ["/app/bublik/entrypoint-logserver.sh"]