forked from dimagi/commcare-hq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-py3
40 lines (33 loc) · 1.13 KB
/
Dockerfile-py3
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
# Based on Dockerfile. Use diff to compare them.
FROM python:3.6-jessie
MAINTAINER Dimagi <[email protected]>
ENV PYTHONUNBUFFERED=1 \
PYTHONUSERBASE=/vendor \
PATH=/vendor/bin:$PATH \
NODE_VERSION=5.12.0
RUN mkdir /vendor
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz"
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk
COPY requirements-python3_6/requirements.txt \
requirements-python3_6/test-requirements.txt \
package.json \
/vendor/
# prefer https for git checkouts made by pip
RUN git config --global url."https://".insteadOf git:// \
&& pip install --upgrade pip \
&& pip install \
-r /vendor/requirements.txt \
-r /vendor/test-requirements.txt \
--user --upgrade \
&& rm -rf /root/.cache/pip
RUN npm -g install \
bower \
grunt-cli \
uglify-js \
&& echo '{ "allow_root": true }' > /root/.bowerrc \
&& cd /vendor \
&& npm shrinkwrap \
&& npm -g install \
&& npm cache clean