From ce2a0120c1925492a9bb7f6339cdbf716a4c50e0 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 22 Aug 2017 15:10:55 +0300 Subject: [PATCH] Dockerfiles: fix test-docker-py Presumably after switch to debian-stretch as a base, the following errors happens in Jenkins: 10:48:03 ---> Making bundle: test-docker-py (in bundles/17.06.0-dev/test-docker-py) 10:48:03 ---> Making bundle: .integration-daemon-start (in bundles/17.06.0-dev/test-docker-py) 10:48:03 Using test binary docker 10:48:03 # DOCKER_EXPERIMENTAL is set: starting daemon with experimental features enabled! 10:48:03 /etc/init.d/apparmor: 130: /etc/init.d/apparmor: systemd-detect-virt: not found 10:48:03 Starting AppArmor profiles:Warning from stdin (line 1): /sbin/apparmor_parser: cannot use or update cache, disable, or force-complain via stdin 10:48:03 Warning failed to create cache: (null) 10:48:03 . 10:48:03 INFO: Waiting for daemon to start... 10:48:03 Starting dockerd 10:48:05 . 10:48:06 Traceback (most recent call last): 10:48:06 File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 320, in _importconftest 10:48:06 mod = conftestpath.pyimport() 10:48:06 File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line 662, in pyimport 10:48:06 __import__(modname) 10:48:06 File "/docker-py/tests/integration/conftest.py", line 6, in 10:48:06 import docker.errors 10:48:06 File "/docker-py/docker/__init__.py", line 2, in 10:48:06 from .api import APIClient 10:48:06 File "/docker-py/docker/api/__init__.py", line 2, in 10:48:06 from .client import APIClient 10:48:06 File "/docker-py/docker/api/client.py", line 6, in 10:48:06 import requests 10:48:06 ImportError: No module named requests 10:48:06 ERROR: could not load /docker-py/tests/integration/conftest.py 10:48:06 and 00:38:55 File "/docker-py/docker/transport/ssladapter.py", line 21, in 00:38:55 from backports.ssl_match_hostname import match_hostname 00:38:55 ImportError: No module named backports.ssl_match_hostname 00:38:55 ERROR: could not load /docker-py/tests/integration/conftest.py To fix, install the missing python modules. Signed-off-by: Kir Kolyshkin --- Dockerfile | 3 +++ Dockerfile.aarch64 | 4 +++- Dockerfile.armhf | 3 +++ Dockerfile.ppc64le | 3 +++ Dockerfile.s390x | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 81ae6f3ccc..0d8dd52481 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,11 +63,14 @@ RUN apt-get update && apt-get install -y \ pkg-config \ protobuf-compiler \ protobuf-c-compiler \ + python-backports.ssl-match-hostname \ python-dev \ python-mock \ python-pip \ + python-requests \ python-setuptools \ python-websocket \ + python-wheel \ tar \ thin-provisioning-tools \ vim \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 97b749e4e3..630f8b8cba 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -56,11 +56,14 @@ RUN apt-get update && apt-get install -y \ pkg-config \ protobuf-compiler \ protobuf-c-compiler \ + python-backports.ssl-match-hostname \ python-dev \ python-mock \ python-pip \ + python-requests \ python-setuptools \ python-websocket \ + python-wheel \ tar \ thin-provisioning-tools \ vim \ @@ -128,7 +131,6 @@ ENV DOCKER_PY_COMMIT a962578e515185cf06506050b2200c0b81aa84ef RUN git clone https://github.com/docker/docker-py.git /docker-py \ && cd /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ - && pip install wheel \ && pip install docker-pycreds==0.2.1 \ && pip install -r test-requirements.txt diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 7582880475..1f703f29bb 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -45,11 +45,14 @@ RUN apt-get update && apt-get install -y \ libudev-dev \ mercurial \ pkg-config \ + python-backports.ssl-match-hostname \ python-dev \ python-mock \ python-pip \ + python-requests \ python-setuptools \ python-websocket \ + python-wheel \ xfsprogs \ tar \ thin-provisioning-tools \ diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index 88f19933c3..865d293516 100644 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -46,11 +46,14 @@ RUN apt-get update && apt-get install -y \ libudev-dev \ mercurial \ pkg-config \ + python-backports.ssl-match-hostname \ python-dev \ python-mock \ python-pip \ + python-requests \ python-setuptools \ python-websocket \ + python-wheel \ xfsprogs \ tar \ thin-provisioning-tools \ diff --git a/Dockerfile.s390x b/Dockerfile.s390x index 8d628c7588..aa1e555286 100644 --- a/Dockerfile.s390x +++ b/Dockerfile.s390x @@ -42,11 +42,14 @@ RUN apt-get update && apt-get install -y \ libudev-dev \ mercurial \ pkg-config \ + python-backports.ssl-match-hostname \ python-dev \ python-mock \ python-pip \ + python-requests \ python-setuptools \ python-websocket \ + python-wheel \ xfsprogs \ tar \ thin-provisioning-tools \