-
Notifications
You must be signed in to change notification settings - Fork 53
/
Dockerfile
38 lines (32 loc) · 966 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
FROM python:3.7-slim
LABEL Name="PatrowlHears" Version="1.3.6"
ENV PYTHONUNBUFFERED 1
RUN mkdir -p /opt/patrowl-hears/
WORKDIR /opt/patrowl-hears/
RUN apt-get update -yq \
&& apt-get install -yq --no-install-recommends \
apt-utils \
python3 \
python3-pip \
libmagic-dev \
python3-psycopg2 \
python3-dev \
libpq-dev \
gcc \
git \
wget \
jq \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . /opt/patrowl-hears/
COPY backend_app/backend_app/settings.py.sample /opt/patrowl-hears/backend_app/backend_app/settings.py
WORKDIR /opt/patrowl-hears/backend_app
RUN rm -rf env \
&& python --version \
&& pip3 install virtualenv \
&& virtualenv env \
&& /opt/patrowl-hears/backend_app/env/bin/pip3 install -r /opt/patrowl-hears/backend_app/requirements.txt
WORKDIR /opt/patrowl-hears/
EXPOSE 8303
ENTRYPOINT ["/opt/patrowl-hears/docker-entrypoint.sh"]
CMD ["run"]