diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9fd32ab5faf6beebc83781276f6bc4861043cbbc..8747f6a4404370239273b99bcdbbf7bdde4638aa 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) diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index bbb21ed088301b466442f5aa29041eb61cb6b812..3a687feda0cba0085f9142702f339d0cd28e5d91 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