forked from fossasia/open-event-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (26 loc) · 1.02 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
FROM python:3.6-alpine as base
LABEL maintainer="Niranjan Rajendran <[email protected]>"
##
##
FROM base as builder
WORKDIR /install
RUN apk update && \
apk add --virtual build-deps git gcc python3-dev musl-dev jpeg-dev zlib-dev libevent-dev file-dev libffi-dev openssl && \
apk add postgresql-dev && \
pip install setuptools
ADD requirements.txt /requirements.txt
ADD requirements /requirements/
RUN wget https://bootstrap.pypa.io/ez_setup.py && python ez_setup.py
ENV PYTHONPATH /install/lib/python3.6/site-packages
RUN pip install --install-option="--prefix=/install" setuptools && \
LIBRARY_PATH=/lib:/usr/lib pip install --install-option="--prefix=/install" -r /requirements.txt
##
##
FROM base
COPY --from=builder /install /usr/local
RUN apk --no-cache add postgresql-dev ca-certificates libxslt jpeg zlib file libxml2 git && \
pip install git+https://github.com/fossasia/flask-rest-jsonapi.git@shubhamp-master#egg=flask-rest-jsonapi
WORKDIR /data/app
ADD . .
EXPOSE 8080
CMD ["sh", "scripts/container_start.sh"]