forked from scieloorg/articles_meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 874 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
FROM python:3.5.2-alpine AS build
COPY . /src
RUN pip install --upgrade pip \
&& pip install wheel
RUN cd /src \
&& python setup.py bdist_wheel -d /deps
FROM python:3.5.2-alpine
MAINTAINER [email protected]
COPY --from=build /deps/* /deps/
COPY production.ini-TEMPLATE /app/config.ini
COPY requirements.txt .
RUN apk add --no-cache --virtual .build-deps \
make gcc libxml2-dev libxslt-dev git musl-dev \
&& apk add libxml2 libxslt \
&& pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir gunicorn \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-index --find-links=file:///deps -U articlemeta \
&& apk --purge del .build-deps \
&& rm requirements.txt \
&& rm -rf /deps
WORKDIR /app
ENV ARTICLEMETA_SETTINGS_FILE=/app/config.ini
ENV PYTHONUNBUFFERED 1
USER nobody