From 06cc3551714f2c9ee0d12f78a2ecd7e21b484fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 6 Mar 2017 17:55:20 -0300 Subject: [PATCH 1/2] tests/docker: support proxy / corporate firewall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if ftp_proxy/http_proxy/https_proxy standard environment variables available, pass them to the docker daemon to build images. this is required when building behind corporate proxy/firewall, but also help when using local cache server (ie: apt/yum). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170306205520.32311-1-f4bug@amsat.org> Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- tests/docker/docker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9fd32ab5fa..8747f6a440 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -28,6 +28,9 @@ from shutil import copy, rmtree from pwd import getpwuid +FILTERED_ENV_NAMES = ['ftp_proxy', 'http_proxy', 'https_proxy'] + + DEVNULL = open(os.devnull, 'wb') @@ -272,6 +275,9 @@ class BuildCommand(SubCommand): _copy_binary_with_libs(args.include_executable, docker_dir) + argv += ["--build-arg=" + k.lower() + "=" + v + for k, v in os.environ.iteritems() + if k.lower() in FILTERED_ENV_NAMES] dkr.build_image(tag, docker_dir, dockerfile, quiet=args.quiet, user=args.user, argv=argv) From 8ba1e5f72b17584f23e17c54494bb4beeb05174e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 6 Mar 2017 11:28:48 +0000 Subject: [PATCH 2/2] docker/dockerfiles/debian-s390-cross: include clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build. Signed-off-by: Alex Bennée Message-Id: <20170306112848.659-1-alex.bennee@linaro.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index bbb21ed088..3a687feda0 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list RUN dpkg --add-architecture s390x # Grab the updated list of packages -RUN apt update -RUN apt dist-upgrade -yy +RUN apt update && apt dist-upgrade -yy +RUN apt install -yy build-essential clang RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch