Files
MemeMeow/Dockerfile
T
infstellar 10a2dea7f6 feat(compose): run services with configurable non-root identity
Wire runtime initialization, dynamic UID/GID interpolation, and non-root defaults through Compose and operational entry points.

在 Compose 与运维入口中接入运行时初始化、动态 UID/GID 插值和非 root 默认身份。
2026-08-17 17:33:43 +08:00

32 lines
714 B
Docker

FROM node:22-slim AS frontend-build
WORKDIR /frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend ./
RUN npm run build
FROM python:3.12-slim AS runtime
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
COPY --from=frontend-build /frontend/dist ./frontend/dist
RUN groupadd --system mememeow \
&& useradd --system --create-home --gid mememeow --shell /bin/bash mememeow \
&& chown -R mememeow:mememeow /app
ENV HOME=/home/mememeow \
PYTHONUNBUFFERED=1
USER mememeow
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8275"]