-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (27 loc) · 816 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# syntax=docker/dockerfile:1
FROM python:3.8-slim-bullseye
RUN adduser \
--disabled-password \
--uid 1000 \
--home /code \
--gecos '' client \
&& chown -R client /code
WORKDIR /code
RUN mkdir -p /torrents \
&& chown client /torrents
RUN mkdir -p /code/.ssh \
&& chown client /code/.ssh
COPY bin/install-packages.sh /code/
RUN ./install-packages.sh
USER client
ENV PYTHONDONTWRITEBYTECODE=1 \
PATH="/code/.local/bin:${PATH}" \
PYTHONPATH="/code"
ENV PYTHONUNBUFFERED=1
COPY --chown=client:client requirements.txt /code/
RUN pip install --user -r requirements.txt
COPY --chown=client:client transmission/config /code/.ssh/
COPY --chown=client:client . /code/
EXPOSE 8000
WORKDIR /code/automommy
CMD ["gunicorn", "--bind", ":8000", "--workers", "3", "wsgi:application"]