-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-base
55 lines (44 loc) · 1.53 KB
/
Dockerfile-base
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
50
51
52
53
54
55
FROM quay.io/mozmar/base:latest
ENV PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# disable this when preparing for Django upgrade
ENV PYTHONWARNINGS=ignore
WORKDIR /app
EXPOSE 8000
RUN apt-get update && \
apt-get install -y --no-install-recommends python2.7 libpython2.7 python-dev \
python-pip gettext build-essential \
libtidy-0.99-0 libtidy-dev \
libxml2-dev libxslt1.1 libxslt1-dev \
libffi-dev \
libjpeg-dev \
libmagic-dev \
libmysqlclient-dev \
mysql-client # Only for local dev.
# bug 1301116
RUN pip install setuptools==26.1.1
# Install the Node.js 6.9.2 LTS release.
ENV DEB_PKG=nodejs_6.9.2-1nodesource1~jessie1_amd64.deb
RUN curl -sLO https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/${DEB_PKG}\
&& dpkg -i ${DEB_PKG} \
&& rm ${DEB_PKG} \
&& apt-get install -f
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
RUN npm install -g \
ENV PIPELINE_CSS_COMPRESSOR=pipeline.compressors.cssmin.CSSMinCompressor \
PIPELINE_CSSMIN_BINARY=/usr/bin/cssmin \
PIPELINE_JS_COMPRESSOR=pipeline.compressors.uglifyjs.UglifyJSCompressor \
PIPELINE_UGLIFYJS_BINARY=/usr/bin/uglifyjs
COPY ./requirements /app/requirements
RUN pip install --no-cache-dir -r requirements/dev.txt
RUN useradd kuma
USER kuma
ENV WEB_CONCURRENCY=4
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout=120", "kuma.wsgi:application"]