forked from Syncano/python-codebox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 834 Bytes
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 834 Bytes
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
FROM ubuntu:trusty
ENV LAST_REFRESHED 2016-01-11
ENV export SYNCANO_APIROOT='https://api.syncano.io/'
COPY requirements.txt /tmp/requirements.txt
COPY external_requirements.txt /tmp/external_requirements.txt
RUN apt-get update && apt-get install -qqy \
git \
libffi-dev \
libssl-dev \
libjpeg-dev \
python-dev \
python-numpy \
python-scipy \
wget \
&& wget https://bootstrap.pypa.io/get-pip.py \
&& python get-pip.py \
&& pip install --upgrade pip \
&& pip install -r /tmp/requirements.txt \
&& pip install -r /tmp/external_requirements.txt
# create a special user to run code
# user without root privileges greatly improves security
RUN useradd syncano -d /tmp -s /bin/bash
RUN chmod 1777 /tmp
USER syncano
CMD ["python"]