From a3d60cfbc816aaf98e2e1165115b1c4f4ab5fd32 Mon Sep 17 00:00:00 2001 From: "Markin, Sergiy (sm515x)" Date: Fri, 23 Sep 2022 14:11:38 +0000 Subject: [PATCH] [shipyard] Fix pyOpenSSL issue in xenial images Change-Id: I4c57f92b56a2956497bf6466e23afdfb9af8080f --- images/airflow/Dockerfile.ubuntu_xenial | 4 +++- images/shipyard/Dockerfile.ubuntu_xenial | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/images/airflow/Dockerfile.ubuntu_xenial b/images/airflow/Dockerfile.ubuntu_xenial index 1333768f..ca32fdf0 100644 --- a/images/airflow/Dockerfile.ubuntu_xenial +++ b/images/airflow/Dockerfile.ubuntu_xenial @@ -72,6 +72,7 @@ RUN set -ex && \ python3-pip \ python3-dev \ python3-dateutil \ + python3-openssl \ make \ --no-install-recommends \ && python3 -m pip install -U 'pip<21.0' \ @@ -111,7 +112,8 @@ RUN useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \ # https://github.com/puckel/docker-airflow/issues/77 # Install Airflow directly to allow overriding source COPY images/airflow/requirements.txt /tmp/ -RUN pip3 install -r /tmp/requirements.txt --no-cache-dir \ +RUN sed -i "s/pyOpenSSL==.*//" /tmp/requirements.txt \ + && pip3 install -r /tmp/requirements.txt --no-cache-dir \ && pip3 install $AIRFLOW_SRC --no-cache-dir \ && (pip3 uninstall -y snakebite || true) \ && (pip3 uninstall -y psycopg2 || true) \ diff --git a/images/shipyard/Dockerfile.ubuntu_xenial b/images/shipyard/Dockerfile.ubuntu_xenial index 0ff2e621..e0c0be23 100644 --- a/images/shipyard/Dockerfile.ubuntu_xenial +++ b/images/shipyard/Dockerfile.ubuntu_xenial @@ -99,12 +99,15 @@ COPY ${ctx_base}/shipyard_airflow /home/shipyard/shipyard/ python3-pip \ ' \ && apt-get -qq update \ - && apt-get -y install -y $buildDeps --no-install-recommends \ + && apt-get -y install -y \ + $buildDeps \ + python3-openssl \ + libffi-dev \ + python3-dev \ + --no-install-recommends \ && python3 -m pip install -U 'pip<21.0' \ && python3 -m pip install -U setuptools \ - && pip3 install -r /home/shipyard/client_requirements.txt --no-cache-dir \ - && cd /home/shipyard/shipyard_client \ - && python3 setup.py install \ + && sed -i "s/pyOpenSSL==.*//" /home/shipyard/client_requirements.txt\ && pip3 install -r /home/shipyard/api_requirements.txt --no-cache-dir \ && cd /home/shipyard/shipyard \ && python3 setup.py install \