File tree Expand file tree Collapse file tree 5 files changed +47
-14
lines changed
Expand file tree Collapse file tree 5 files changed +47
-14
lines changed Original file line number Diff line number Diff line change 1+ {"<REGISTRY>":{"auth":"<AUTH>","email":"<EMAIL>"}}
Original file line number Diff line number Diff line change 1- FROM python:2.7
2-
1+ FROM ubuntu:trusty
32MAINTAINER "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
710RUN 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" ]
Original file line number Diff line number Diff line change 1+ machine :
2+ services :
3+ - docker
4+
5+ dependencies :
6+ override :
7+ - sed -i 's/CMD/#CMD/g' Dockerfile
8+ - docker build -t quay.io/syncano/python-codebox .
9+
10+ test :
11+ override :
12+ - docker run -it -v `pwd`/test.py:/tmp/test.py quay.io/syncano/python-codebox python /tmp/test.py
13+
14+ deployment :
15+ production :
16+ branch :
17+ - master
18+ commands :
19+ - sed -e "s|<REGISTRY>|$DOCKER_REGISTRY|g" -e "s|<EMAIL>|$DOCKER_EMAIL|g" -e "s|<AUTH>|$DOCKER_AUTH|g" < .dockercfg.template > ~/.dockercfg
20+ - sed -i 's/#CMD/CMD/g' Dockerfile
21+ - docker build -t quay.io/syncano/python-codebox .
22+ - docker push quay.io/syncano/python-codebox
Original file line number Diff line number Diff line change 11-i https://pypi.fury.io/Nx-poGuiakLbsCzaLwNm/aexol
2- aexol==0.1
2+ aexol==0.1.2
33
Original file line number Diff line number Diff line change 1+ if __name__ == '__main__' :
2+ import pkgutil
3+ modules = (name for _ , name , is_pkg in pkgutil .iter_modules ()
4+ if is_pkg )
5+ map (__import__ , modules )
You can’t perform that action at this time.
0 commit comments