From 60ca31c3457701fc8ffb8b4fe459b9d9b41d28ef Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Thu, 23 Apr 2020 11:44:44 +0300 Subject: [PATCH] [docker] Ensure that we have all required system packages installed + update bindep requirements of python package + use upper-constraints file while installing requirements at docker Change-Id: Ifbda0bd2c03d4009dbc12828ee8a8215cff3a3d1 --- .dockerignore | 4 ++-- Dockerfile | 6 +++++- bindep.txt | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index e6dbcd91..6e0185e3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,5 @@ -rally-jobs tests -contrib test-requirements.txt tox.ini +.tox +cover diff --git a/Dockerfile b/Dockerfile index 470b02b5..5ba3ec02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,12 @@ WORKDIR /rally/xrally_opentstack # to install package system-wide, we need to temporary switch to root user USER root +# ensure that we have all system packages installed +# NOTE(andreykurilin): we need to update setuptools, since xrally/xrally:3.0.0 +# has incompatible setuptools version for google-auth library +RUN pip3 install -U setuptools bindep && apt update && apt install --yes $(bindep -b | tr '\n' ' ') && apt clean # disabling cache since we do not expect to install other packages -RUN pip3 install -U setuptools --no-cache-dir && pip3 install . --no-cache-dir +RUN pip3 install . --no-cache-dir --constraint ./upper-constraints.txt # switch back to rally user for avoid permission conflicts USER rally diff --git a/bindep.txt b/bindep.txt index 44f1385e..81df4ecd 100644 --- a/bindep.txt +++ b/bindep.txt @@ -16,8 +16,8 @@ libxslt-devel [platform:rpm] openssl-devel [platform:rpm] postgresql-devel [platform:rpm !platform:opensuse] postgresql93-devel [platform:opensuse] -python-dev [platform:dpkg] -python-devel [platform:rpm] +python3-dev [platform:dpkg] +python3-devel [platform:rpm] redhat-rpm-config [platform:rpm] iputils-ping [platform:dpkg] iputils [platform:rpm]