ARG PYTHON_VERSION=3.11.5 FROM python:${PYTHON_VERSION}-slim as base ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app # TODO: Because portier needs to be able to talk to the docker socket, we need to run as root #ARG UID=10001 #RUN adduser \ # --disabled-password \ # --gecos "" \ # --home "/nonexistent" \ # --shell "/sbin/nologin" \ # --no-create-home \ # --uid "${UID}" \ # appuser RUN --mount=type=cache,target=/root/.cache/pip \ --mount=type=bind,source=requirements.txt,target=requirements.txt \ python -m pip install -r requirements.txt #USER appuser COPY concierge concierge CMD python -m concierge.main