forked from adilmohak/djangoproject.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (37 loc) · 1.05 KB
/
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
42
43
44
45
46
47
48
# pull official base image
FROM python:3.8-alpine
# set work directory
WORKDIR /usr/src/app
# set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install psycopg2
RUN apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add postgresql-dev \
&& apk add gettext-dev \
&& apk add rsync \
&& pip install psycopg2 \
&& apk del build-deps
# install node and npm
RUN apk add --update nodejs nodejs-npm
# install pillow dependencies
RUN apk add build-base python3-dev py-pip jpeg-dev zlib-dev
ENV LIBRARY_PATH=/lib:/usr/lib
# install psql client
RUN apk --update add postgresql-client
# install git
RUN apk add git
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements ./requirements
RUN pip install -r ./requirements/dev.txt
RUN pip install -r ./requirements/tests.txt
RUN pip install tox
RUN npm install
# copy docker-entrypoint.sh
COPY ./docker-entrypoint.sh ./docker-entrypoint.sh
# copy project
COPY . .
# run docker-entrypoint.sh
ENTRYPOINT ["./docker-entrypoint.sh"]