FROM ubuntu ARG SRCPATH=/usr/local/src/ ARG T2CPATH=${SRCPATH}things2c/ ARG T2CZIP=things2c.zip ARG NFCPATH=${SRCPATH}nfcpy/ COPY ${T2CZIP} ${SRCPATH} # Note: Installing pyocclient from source for now to fix put_file() bug - issue #176, to be in 0.3 RUN apt-get update \ && apt-get install -y unzip python-setuptools bzr python-dev python-ctypeslib \ git mercurial \ && easy_install pip \ && mkdir -p ${NFCPATH} && cd ${NFCPATH} && bzr branch lp:nfcpy trunk \ && unzip ${SRCPATH}${T2CZIP} -d ${SRCPATH} && cd ${T2CPATH} \ && pip install -r requirements.txt \ && pip install requests \ && git clone https://github.com/owncloud/pyocclient.git \ && cd pyocclient && python setup.py install && cd .. \ && sed -i "s/\(VERSION_STRING = \).*/\1\"""`sed -rn 's/node: ([a-z0-9]+)/\1/p' ./.hg_archival.txt | cut -c1-12` `date`\"""/" ./version.py \ && pyinstaller -p ${NFCPATH}/trunk --hidden-import nfc.clf.pn533 --onefile ./things2c.py \ && cp ./dist/things2c /usr/local/bin