mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-03-03 02:27:01 +00:00
33 lines
1009 B
Docker
33 lines
1009 B
Docker
FROM python:3.9-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 gosu \
|
|
&& pip install --no-cache-dir -r /requirements.txt \
|
|
&& apt-get -y autoremove --purge \
|
|
&& 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
|
|
|
|
# create user abc for later PUID/PGID mapping https://github.com/linuxserver/docker-baseimage-alpine/blob/master/Dockerfile
|
|
RUN chmod +x /entrypoint.sh && \
|
|
groupmod -g 1000 users && \
|
|
useradd -u 911 -U -M -s /bin/bash abc && \
|
|
usermod -G users abc
|
|
|
|
# Django app
|
|
COPY src ./
|
|
RUN python manage.py compilescss
|
|
RUN python manage.py collectstatic --noinput --ignore=*.scss
|
|
|
|
CMD ["/entrypoint.sh"] |