From bf9355077c2f190c82d660ad9b7059a1c3f32a8d Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 25 Jul 2016 11:37:47 -0300 Subject: [test] use tox to create docker image --- scripts/docker/Dockerfile | 46 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 36 deletions(-) (limited to 'scripts/docker/Dockerfile') diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 915508ea..2ec310a9 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,51 +1,25 @@ # start with a fresh debian image FROM debian -# expose soledad server port in case we want to run a server container -EXPOSE 2424 - -# install dependencies from debian repos -COPY files/apt/leap.list /etc/apt/sources.list.d/ - -RUN apt-get update -RUN apt-get -y --force-yes install leap-archive-keyring - RUN apt-get update RUN apt-get -y install git -RUN apt-get -y install vim -RUN apt-get -y install python-ipdb - -# install python deps +# needed to build python twisted module RUN apt-get -y install libpython2.7-dev -RUN apt-get -y install libffi-dev +# needed to build python cryptography module RUN apt-get -y install libssl-dev -RUN apt-get -y install libzmq3-dev -RUN apt-get -y install python-pip -RUN apt-get -y install couchdb -RUN apt-get -y install python-srp -RUN apt-get -y install python-scrypt -RUN apt-get -y install leap-keymanager -RUN apt-get -y install python-tz +# install pip and tox +RUN apt-get -y install python-pip RUN pip install -U pip -RUN pip install psutil - -# install soledad-perf deps -RUN pip install klein -RUN apt-get -y install curl -RUN apt-get -y install httperf +RUN pip install tox # clone repositories -ENV BASEURL "https://github.com/leapcode" -ENV VARDIR "/var/local" -ENV REPOS "soledad leap_pycommon soledad-perf" -RUN for repo in ${REPOS}; do git clone ${BASEURL}/${repo}.git /var/local/${repo}; done +RUN mkdir -p /builds/leap +RUN git clone -b develop https://0xacab.org/leap/soledad.git /builds/leap/soledad -# copy over files to help setup the environment and run soledad -RUN mkdir -p /usr/local/soledad - -COPY files/build/install-deps-from-repos.sh /usr/local/soledad/ -RUN /usr/local/soledad/install-deps-from-repos.sh +# use tox to install everything needed to run tests +RUN cd /builds/leap/soledad/testing && tox -v -r --notest +RUN mkdir -p /usr/local/soledad COPY files/bin/ /usr/local/soledad/ -- cgit v1.2.3 From 1a8ea1fde14eb5b2d2c4d4165c4bc21031512d06 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 25 Jul 2016 11:39:38 -0300 Subject: [test] use docker image with couchdb service to run tests --- scripts/docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/docker/Dockerfile') diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 2ec310a9..1e46fda3 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -4,13 +4,16 @@ FROM debian RUN apt-get update RUN apt-get -y install git + # needed to build python twisted module RUN apt-get -y install libpython2.7-dev # needed to build python cryptography module RUN apt-get -y install libssl-dev +RUN apt-get -y install libffi-dev # install pip and tox RUN apt-get -y install python-pip + RUN pip install -U pip RUN pip install tox -- cgit v1.2.3 From 92813593b93d9788fd978acdeeba59d32c311d48 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 25 Jul 2016 21:25:46 -0300 Subject: [test] use pip download cache for tests and docker image --- scripts/docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/docker/Dockerfile') diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 1e46fda3..8c6bfdb3 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -13,7 +13,6 @@ RUN apt-get -y install libffi-dev # install pip and tox RUN apt-get -y install python-pip - RUN pip install -U pip RUN pip install tox -- cgit v1.2.3 From c326dae7b824366208220da94ca730788bb50a18 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 5 Oct 2016 01:15:50 -0300 Subject: [bug] adds libsqlcipher to docker Current docker image is broken due missing libsqlcipher. This commit adds it and jessie-backports due package needs. Resolves: #8508 --- scripts/docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/docker/Dockerfile') diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 8c6bfdb3..26d5f782 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,5 +1,5 @@ # start with a fresh debian image -FROM debian +FROM debian:jessie-backports RUN apt-get update @@ -10,6 +10,8 @@ RUN apt-get -y install libpython2.7-dev # needed to build python cryptography module RUN apt-get -y install libssl-dev RUN apt-get -y install libffi-dev +# needed to build pysqlcipher +RUN apt-get -y install libsqlcipher-dev # install pip and tox RUN apt-get -y install python-pip -- cgit v1.2.3 From e121a92161d3a18cebc8796d43b98c05b6916088 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 6 Oct 2016 18:56:25 -0300 Subject: [feature] adds libsqlite3-dev on docker image This is necessary for keymanager and this image is shared, thus adding here with a comment explaining why. Also explained why using jessie-backports. --- scripts/docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/docker/Dockerfile') diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 26d5f782..21764d84 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,4 +1,5 @@ # start with a fresh debian image +# we use backports because of libsqlcipher-dev FROM debian:jessie-backports RUN apt-get update @@ -12,6 +13,8 @@ RUN apt-get -y install libssl-dev RUN apt-get -y install libffi-dev # needed to build pysqlcipher RUN apt-get -y install libsqlcipher-dev +# needed to support keymanager +RUN apt-get -y install libsqlite3-dev # install pip and tox RUN apt-get -y install python-pip -- cgit v1.2.3