forked from fossasia/open-event-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (24 loc) · 892 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
FROM python:3.8-alpine as base
####
FROM base as builder
WORKDIR /install
RUN apk update && \
apk add --virtual build-deps make git gcc python3-dev musl-dev jpeg-dev zlib-dev libevent-dev file-dev libffi-dev openssl && \
apk add postgresql-dev
# PDF Generation: weasyprint (libffi-dev jpeg-dev already included above)
RUN apk add --virtual gdk-pixbuf-dev
ADD requirements.txt /requirements.txt
ADD requirements /requirements/
RUN pip install --prefix=/install --no-warn-script-location -r /requirements.txt
####
FROM base
COPY --from=builder /install /usr/local
RUN apk --no-cache add postgresql-libs ca-certificates libxslt jpeg zlib file libxml2
# PDF Generation: weasyprint
RUN apk --no-cache add cairo-dev pango-dev ttf-opensans
RUN fc-cache -f
WORKDIR /data/app
ADD . .
RUN ["sh", "scripts/l10n.sh", "generate"]
EXPOSE 8080
ENTRYPOINT ["sh", "scripts/container_start.sh"]