From 6797a322b5f2bdf2da7a43825e227056780bdae8 Mon Sep 17 00:00:00 2001 From: Alexander Holbreich Date: Sun, 31 Aug 2014 12:53:59 +0200 Subject: [PATCH 1/2] Changing to stable debian (wheezy). Therefore it compiles agains more common version of GLIBC. Now works out of the box on Debian wheezy, centos:centos6 and other stable Of course it works on new distributions. Tested with: debian:jessie and ubuntu:14.04 Signed-off-by: Alexander Holbreich Conflicts: Dockerfile --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a45af726da..c448b8c166 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ -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 WORKDIR /code/ ADD requirements.txt /code/ From b4fbab4b567b2a7cba42f006bcc87f75c33e8474 Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Tue, 30 Sep 2014 11:54:13 -0700 Subject: [PATCH 2/2] Run pyinstaller build as normal user ... and test build on CI so we don't break it again! Fixes #503 Signed-off-by: Ben Firshman --- Dockerfile | 3 +++ script/build-linux | 4 ++-- wercker.yml | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c448b8c166..cc6b9990ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ 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/ @@ -10,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