rework build, requirements and pipline
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user