Skip to content

Commit 0d7c3bc

Browse files
committed
Merge pull request Syncano#21 from Syncano/INFRA-103
[INFRA-103] slim fit
2 parents 14a96f6 + 1b984c7 commit 0d7c3bc

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

Dockerfile

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
FROM python:2.7
2-
1+
FROM ubuntu:trusty
32
MAINTAINER "Syncano DevOps Team" <devops@syncano.com>
43

5-
ENV LAST_REFRESHED 2015-12-11
4+
ENV LAST_REFRESHED 2015-12-17
5+
ENV export SYNCANO_APIROOT='https://api.syncano.io/'
6+
7+
COPY requirements.txt /tmp/requirements.txt
8+
COPY external_requirements.txt /tmp/external_requirements.txt
69

710
RUN apt-get update && apt-get install -qqy \
811
git \
912
libffi-dev \
1013
libssl-dev \
11-
libjpeg-dev
12-
13-
ENV export SYNCANO_APIROOT='https://api.syncano.io/'
14-
15-
COPY requirements.txt /tmp/requirements.txt
16-
COPY external_requirements.txt /tmp/external_requirements.txt
17-
RUN pip install -r /tmp/requirements.txt \
14+
libjpeg-dev \
15+
python-dev \
16+
wget \
17+
&& wget https://bootstrap.pypa.io/get-pip.py \
18+
&& python get-pip.py \
19+
&& pip install --upgrade pip \
20+
&& pip install -r /tmp/requirements.txt \
1821
&& pip install -r /tmp/external_requirements.txt
1922

20-
RUN chmod 1777 /tmp
2123
# create a special user to run code
2224
# user without root privileges greatly improves security
23-
RUN groupadd -r syncano && useradd -r -g syncano syncano
24-
USER syncano
25+
RUN groupadd -r syncano \
26+
&& useradd -r -g syncano syncano
27+
RUN chmod 1777 /tmp
2528

29+
USER syncano
30+
CMD ["python"]

0 commit comments

Comments
 (0)