fix: upgrade pip, run as non-root user, remove stale FABLEDNETMON_CONFIG env

This commit is contained in:
2026-03-18 23:23:52 -04:00
parent 7a7ed2185a
commit a3a05070e7
+11 -4
View File
@@ -1,6 +1,11 @@
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends iputils-ping && rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends iputils-ping \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip to suppress the version notice
RUN pip install --upgrade pip
WORKDIR /app
@@ -10,10 +15,12 @@ RUN pip install --no-cache-dir .
COPY alembic.ini .
# Runtime directories
RUN mkdir -p /data/playbook_cache /data/plugins
# Runtime directories — owned by app user
RUN useradd -m -u 1000 app \
&& mkdir -p /data/playbook_cache /data/plugins \
&& chown -R app:app /data /app
ENV FABLEDNETMON_CONFIG=/config/config.yaml
USER app
EXPOSE 5000