From 04ccc999a827944240f0310eb4000343d718ddfa Mon Sep 17 00:00:00 2001 From: max Date: Sat, 26 Sep 2026 18:45:04 +0200 Subject: [PATCH] ci(runner): clean up Dockerfile by stripping unused Java, PowerShell, SpotBugs, and Clang toolchains --- runner/Dockerfile | 87 +++++++++++++++++++++++------------------------ runner/README.md | 2 +- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/runner/Dockerfile b/runner/Dockerfile index 0c7acad..d661aa4 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -1,65 +1,64 @@ FROM ubuntu:22.04 -ENV DEBIAN_FRONTEND=noninteractive +LABEL maintainer="me0nline " +LABEL description="LOGAR CI/CD, Binary Packaging & Release Runner" -# ── System packages ──────────────────────────────────────────────────────────── -RUN apt-get update -qq && apt-get install -y -qq \ - # Basics - curl wget git ca-certificates gnupg lsb-release unzip zip tar gzip \ - # Python & Build headers (needed for PyInstaller shared libraries) - python3 python3-pip python3-venv python3-dev libpython3-dev libffi-dev libssl-dev \ - # Java (for SpotBugs) - default-jdk \ - # C/C++ analysis & Build tools - clang clang-tidy cppcheck bear make cmake build-essential gcc binutils \ - # NSIS (for Windows setup installer cross-compilation) - nsis nsis-common nsis-pluginapi \ - # Misc - jq \ - && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=noninteractive \ + PYTHONUNBUFFERED=1 \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 -# ── PowerShell ───────────────────────────────────────────────────────────────── -RUN curl -sSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb \ - && dpkg -i /tmp/packages-microsoft-prod.deb \ - && rm /tmp/packages-microsoft-prod.deb \ - && apt-get update -qq \ - && apt-get install -y -qq powershell \ - && rm -rf /var/lib/apt/lists/* +# ── 1. Core System Tools, Python Dev Headers & NSIS Compiler ─────────────────── +RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \ + # Basic utilities + ca-certificates \ + curl \ + wget \ + git \ + tar \ + gzip \ + zip \ + unzip \ + # Native compilation toolchains + build-essential \ + gcc \ + make \ + # Python 3 & dynamic shared libraries (required for PyInstaller standalone binaries) + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + libpython3-dev \ + libffi-dev \ + libssl-dev \ + # NSIS (for compiling Windows Setup executables on Linux) + nsis \ + nsis-common \ + nsis-pluginapi \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# ── PSScriptAnalyzer ─────────────────────────────────────────────────────────── -RUN pwsh -Command "Install-Module -Name PSScriptAnalyzer -Force -Scope AllUsers" - -# ── SpotBugs ─────────────────────────────────────────────────────────────────── -RUN wget -q https://github.com/spotbugs/spotbugs/releases/download/4.8.6/spotbugs-4.8.6.tgz \ - -O /tmp/spotbugs.tgz \ - && tar -xf /tmp/spotbugs.tgz -C /opt/ \ - && rm /tmp/spotbugs.tgz \ - && ln -s /opt/spotbugs-4.8.6/bin/spotbugs /usr/local/bin/spotbugs - -# ── Node (needed by act_runner internals) ───────────────────────────────────── +# ── 2. Node.js 20 LTS (required for Act / Gitea Actions runners) ─────────────── RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y -qq nodejs \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# ── Python packages ──────────────────────────────────────────────────────────── -RUN pip3 install --quiet --no-cache-dir \ - codechecker \ - pylint \ - pyflakes \ - vunit-hdl \ - # LOGAR Packaging & Dependencies +# ── 3. Pre-installed Python Build & Application Dependencies ─────────────────── +RUN pip3 install --no-cache-dir \ + # Binary compiler & PE packaging tools pyinstaller \ distlib \ cryptography \ pefile \ cffi \ + # LOGAR core dependencies pgpy \ fastapi \ uvicorn \ pydantic \ - requests + requests \ + # Code quality / linter + flake8 -# Runner runs as root inside the container WORKDIR /workspace CMD ["/bin/bash"] diff --git a/runner/README.md b/runner/README.md index 10c80c3..dc3ca65 100644 --- a/runner/README.md +++ b/runner/README.md @@ -6,7 +6,7 @@ This directory contains the Docker configuration for the custom **LOGAR Build & ## Included Toolchains & Dependencies -- **Operating System**: Debian 12 (Bookworm) +- **Operating System**: Ubuntu 22.04 LTS - **Python Development**: - `python3`, `python3-dev`, `libpython3-dev` (shared libraries for native ELF compilation) - `python3-pip`, `python3-venv`, `python3-setuptools`, `python3-wheel`