You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
516 B
25 lines
516 B
FROM python:3.13
|
|
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
|
|
USER root
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
postgresql-client \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd runuser -g ${GID}
|
|
RUN useradd runuser -d /home/runuser -u ${UID} -g ${GID}
|
|
RUN mkdir -p /home/runuser && chown ${UID}:${GID} /home/runuser
|
|
VOLUME /home/runuser
|
|
|
|
COPY requirements.txt /app/requirements.txt
|
|
WORKDIR /app
|
|
RUN pip3 install -Ur requirements.txt
|
|
COPY . /app
|
|
|
|
RUN chown -R ${UID}:${GID} /app
|
|
|
|
USER ${UID}:${GID}
|
|
|