mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-03-03 02:27:01 +00:00
30 lines
819 B
Docker
30 lines
819 B
Docker
FROM python:3.11-slim-bullseye
|
|
|
|
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
COPY ./requirements.txt /requirements.txt
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends g++ gosu \
|
|
&& pip install --no-cache-dir -r /requirements.txt \
|
|
&& apt-get -y autoremove --purge g++ \
|
|
&& apt-get clean -y \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /yamtrack
|
|
|
|
COPY ./entrypoint.sh /entrypoint.sh
|
|
|
|
RUN chmod +x /entrypoint.sh && \
|
|
# create user abc for later PUID/PGID mapping
|
|
useradd -U -M -s /bin/bash abc
|
|
|
|
# Django app
|
|
COPY src ./
|
|
RUN python manage.py collectstatic
|
|
|
|
CMD ["/entrypoint.sh"] |