FROM ubuntu:22.04

LABEL maintainer="me0nline <me0nline@eibl.tech>"
LABEL description="LOGAR Standalone CI/CD & Binary Release Runner"

ENV DEBIAN_FRONTEND=noninteractive \
    PYTHONUNBUFFERED=1 \
    LANG=C.UTF-8 \
    LC_ALL=C.UTF-8

# Install system utilities, Node.js (for Act / Actions), build tools, NSIS, and Python
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    wget \
    git \
    tar \
    gzip \
    zip \
    unzip \
    build-essential \
    gcc \
    make \
    nodejs \
    npm \
    nsis \
    nsis-common \
    nsis-pluginapi \
    python3 \
    python3-dev \
    libpython3-dev \
    python3-pip \
    python3-venv \
    libffi-dev \
    libssl-dev \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install PyInstaller and LOGAR packaging requirements
RUN pip3 install --no-cache-dir \
    pyinstaller \
    distlib \
    cryptography \
    pefile \
    cffi \
    pgpy \
    fastapi \
    uvicorn \
    pydantic \
    requests

WORKDIR /workspace

CMD ["/bin/bash"]
