rework build, requirements and pipline

This commit is contained in:
2026-01-18 23:55:52 +01:00
parent 4170a3f3b4
commit 97737c8b73
10 changed files with 80 additions and 79 deletions

View File

@@ -1,14 +1,14 @@
FROM python:slim
FROM python:3.14-slim
ARG TARGETPLATFORM
ARG BUILDPLATFORM
LABEL authors="tebarius"
LABEL version="0.2.1"
LABEL description="netdata-DocRudi"
WORKDIR /app
COPY ./app /app/
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PATH="/rudi-venv/bin:$PATH"
ENV SERVER_PORT=19998
RUN apt-get update && \
if [ "$TARGETPLATFORM" = "linux/arm/v7" ] || [ "$TARGETPLATFORM" = "linux/386" ]; then \
@@ -17,9 +17,17 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --trusted-host pypi.python.org -r requirements.txt
WORKDIR /app
COPY ./app /app/
ENV SERVER_PORT=19998
RUN python -m venv /rudi-venv \
&& python -m pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& useradd -m -u 1000 rudi \
&& chown -R rudi:rudi /app
USER rudi
EXPOSE $SERVER_PORT