2024-03-05 21:04:47 +01:00
|
|
|
ARG PYTHON_VERSION=3.11.5
|
|
|
|
FROM python:${PYTHON_VERSION}-slim as base
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
WORKDIR /app
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
# 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
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
--mount=type=bind,source=requirements.txt,target=requirements.txt \
|
|
|
|
python -m pip install -r requirements.txt
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
#USER appuser
|
2020-04-27 10:09:07 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
COPY concierge concierge
|
2020-04-26 14:35:24 +02:00
|
|
|
|
2024-03-05 21:04:47 +01:00
|
|
|
CMD python -m concierge.main
|