forked from silverapp/silver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (39 loc) · 1.26 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
49
FROM python:2.7.11-alpine
MAINTAINER Presslabs [email protected]
# Ensure that Python outputs everything that's printed inside
# the application rather than buffering it, maily for logging purposes
ENV PYTHONUNBUFFERED 1
# Set default django settings module
ENV DJANGO_SETTINGS_MODULE settings
# silver app runs on port 8080
EXPOSE 8080
RUN set -ex && mkdir -p /silver
WORKDIR /silver
# Install silver
COPY ./requirements /silver/requirements
RUN set -ex \
&& apk update \
&& apk add --no-cache \
mariadb-client-libs \
libjpeg-turbo \
jpeg \
zlib \
ca-certificates wget \
openssl \
openssl-dev \
libffi-dev \
zlib-dev \
jpeg-dev \
build-base \
&& apk add --no-cache --virtual .build-deps \
mariadb-dev \
&& update-ca-certificates \
&& pip install --no-cache-dir -r requirements/common.txt \
&& pip install --no-cache-dir gunicorn==19.4.5 \
&& pip install --no-cache-dir mysql-python \
&& apk del .build-deps \
&& wget -qO- https://github.com/jwilder/dockerize/releases/download/v0.2.0/dockerize-linux-amd64-v0.2.0.tar.gz | tar -zxf - -C /usr/bin \
&& chown root:root /usr/bin/dockerize
COPY ./ /silver
VOLUME /silver
CMD ["/docker-entrypoint"]