diff --git a/Dockerfile b/Dockerfile index a45af726da..cc6b9990ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM ubuntu:14.04 -RUN apt-get update -qq && apt-get install -qy python python-pip python-dev git - +FROM debian:wheezy +RUN apt-get update -qq && apt-get install -qy python python-pip python-dev git && apt-get clean +RUN useradd -d /home/user -m -s /bin/bash user WORKDIR /code/ ADD requirements.txt /code/ @@ -11,3 +11,5 @@ RUN pip install -r requirements-dev.txt ADD . /code/ RUN python setup.py install + +RUN chown -R user /code/ diff --git a/script/build-linux b/script/build-linux index c30dbfbd73..e16f2fb511 100755 --- a/script/build-linux +++ b/script/build-linux @@ -3,5 +3,5 @@ set -ex mkdir -p `pwd`/dist chmod 777 `pwd`/dist docker build -t fig . -docker run -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig -docker run -v `pwd`/dist:/code/dist fig dist/fig --version +docker run -u user -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig +docker run -u user -v `pwd`/dist:/code/dist fig dist/fig --version diff --git a/wercker.yml b/wercker.yml index 6ab2d95e9e..96fb22b572 100644 --- a/wercker.yml +++ b/wercker.yml @@ -7,3 +7,6 @@ build: - script: name: run tests code: script/test + - script: + name: build binary + code: script/build-linux