-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.do.prod
33 lines (24 loc) · 740 Bytes
/
Dockerfile.do.prod
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
# pull official base image
FROM python:3.8.2-alpine
# create work drectory
RUN mkdir -p /usr/src/app
# set work directory
WORKDIR /usr/src/app
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install psycopg2
RUN apk update \
&& apk add postgresql-dev gcc python3-dev musl-dev
# install Pillow dependencies
RUN apk add jpeg-dev zlib-dev
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN pip install -r /usr/src/app/requirements.txt
# copy entrypoint-prod.sh
COPY ./entrypoint.do.prod.sh /usr/src/app/entrypoint.do.prod.sh
# copy project
COPY . /usr/src/app/
# run entrypoint.prod.sh
ENTRYPOINT ["/usr/src/app/entrypoint.do.prod.sh"]