Files
photoassistant/Dockerfile

23 lines
785 B
Docker

FROM python:latest
WORKDIR /code
ENV PJM_UID=500
ENV PJM_GID=500
RUN groupadd -g ${PJM_GID} mythtv && useradd -r -u ${PJM_UID} -g ${PJM_GID} mythtv
# sudo used in dev container
RUN apt-get update && apt-get -y install libpq-dev mediainfo cmake libgl1-mesa-glx libglib2.0-0 libjpeg-turbo-progs ffmpeg git sudo
COPY . .
RUN pip3 install -r requirements.txt
RUN pip3 install --upgrade pillow --user
EXPOSE 80
RUN cat /dev/urandom | head -c 50 | md5sum | head -c 32 > /code/.sk
RUN chmod 600 .sk
RUN date > internal/build-date.txt
RUN git log -n 15 > internal/git-log.txt
RUN ln -s /code/TODO /code/internal/TODO
RUN ln -s /code/BUGs /code/internal/BUGs
RUN rm -rf .git
RUN chown mythtv:mythtv /code
RUN chown mythtv:mythtv ./static
RUN chown mythtv:mythtv ./static/*
CMD ["./wrapper.sh"]