diff --git a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
index 17e9698904ce14bd59e5ba6b0e795f694bb4ef4d..03b5b364f8ec5ace65f16a11c9da991ecaff3550 100644
--- a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
@@ -33,6 +33,5 @@ RUN rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E03
 RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
 
 RUN yum install -y mono
-RUN yum install -y git
 RUN yum install -y unzip
 RUN yum install -y nuget
diff --git a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
index 840ecf0fc2f531107b9141dc6031c0dbf298fe5d..1cadba3b7b9673a8242f7aa59dbeb2d495b6f8fc 100644
--- a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
@@ -40,4 +40,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
index 3a50da4936748bcfc3beaae07575dfc4ce92721f..be962828c285d4b1ee76ef129b0a890185f3ee8e 100644
--- a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
@@ -40,4 +40,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
index 901c981acb8b4b3b2029ff5d0bccdae0b11fab0d..3d04d032b5aef951917ead659b24affcb269d235 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
@@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
index 1b8d45468129dae9baf9fa5a0d9dd6febc6a8669..5eec570491cf80cef56c72b09a5858af9cf5184a 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
@@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
index a6c26a4b9e35916b0fece45added4204a4c661c0..a6d60fb4b9102df6be5561aed0ea56b3536facad 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
@@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
index c6a863493729a850207a3d02f6033648f0d85319..61472704d7d15c3a9e414c45002af6431fc00cba 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
@@ -34,4 +34,4 @@ RUN apt-get update && apt-get install -y \
     ca-certificates-mono \
     nuget
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
index dd865e8bbc54c0464e40eae6b10a1fc3e1d29ecb..9039c3c509f57f0c1b8bd99bdce5b58e2b75e576 100644
--- a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
@@ -29,4 +29,4 @@
 
 FROM mono:4.2.2.30
 
-RUN apt-get update && apt-get install -y git unzip
+RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile
index 9c1f5ee7297789505eda995248951e0d5ea99c55..f6e1664086a67433600fa487ff62fdfaaaf16006 100644
--- a/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile
@@ -29,7 +29,6 @@
 
 FROM centos:7
 
-RUN yum install -y git
 RUN yum install -y curl
 
 # Install nvm
diff --git a/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile
index 69a071500ee922e5d8e70e56ec05ba99eac4545a..4ca5e86563b71c24e4b55b95151b3cdf6b8b87a9 100644
--- a/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM debian:jessie
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile
index 173c70360dcad35f45c43fd495912e4b74135da4..bd40ab2b4cb2557aa7fda2ce620bf1890bc48a30 100644
--- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile
+++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM 32bit/debian:jessie
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y git
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile
index c53a4aa305dab9af944b3aca7b17ede55f7b797e..0134dc964e776c2e7341e000677542da302a3c48 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM ubuntu:12.04
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile
index 8fe6ae1f335a33e68923d7249e29db6a4d918711..0fae447946dd130dd93d5f2e68791c659f8f3c41 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM ubuntu:14.04
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile
index 013c2a0c72a534af34df607d38f1ac3d773aee80..55da46c3be408a9534ab116e5b0ee2b7ef1420c7 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM ubuntu:15.04
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile
index 43b3ae2738ab4659111ff2b857421c765aa0fddc..c050cab7d3358bfbb264b6a028b21201d7816c46 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM ubuntu:15.10
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile
index 3eae75475cd54e928c287bb1a8a52442a81a711a..ab9e8a32e3457c46633b31f175d72f5182d1351d 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile
@@ -29,7 +29,7 @@
 
 FROM ubuntu:16.04
 
-RUN apt-get update && apt-get install -y curl git
+RUN apt-get update && apt-get install -y curl
 
 # Install nvm
 RUN touch .profile
diff --git a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
index 4d10e240c608cda10079166064826e9237962d0c..53bb8e8708f760553ba3279ac497e9d1359e4cb1 100644
--- a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
@@ -30,7 +30,6 @@
 FROM base/archlinux
 
 RUN pacman --noconfirm -Syy
-RUN pacman --noconfirm -S git
 RUN pacman --noconfirm -S python
 RUN pacman --noconfirm -S python-pip
 
diff --git a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile
index 683686c6dbb437bcee8d9104b69217261757f686..3889f8862f988d2de2d43bcda6c7e830ea3d6f75 100644
--- a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile
@@ -29,7 +29,6 @@
 
 FROM centos:6
 
-RUN yum install -y git
 RUN yum install -y python
 
 RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
diff --git a/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile
index 6b70f65f10c21d8c65791b1b00ba5fca52a61367..114957b573062e71ff9c0380807682ba84972086 100644
--- a/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile
@@ -29,7 +29,6 @@
 
 FROM centos:7
 
-RUN yum install -y git
 RUN yum install -y python
 RUN yum install -y epel-release
 RUN yum install -y python-pip
diff --git a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile
index 1c915943633064422431c3ae29d5ae8ac344403b..d58036410f6de6f304afe3479f8a315a7903e1e5 100644
--- a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile
@@ -29,9 +29,4 @@
 
 FROM fedora:20
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y python
-RUN yum install -y python-pip
-
+RUN yum clean all && yum update -y && yum install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile
index e35de109ea307fcf32a22b715961af6a95832680..b44fcff7e31b4d568b457af82625efa41568fcd4 100644
--- a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile
@@ -29,9 +29,4 @@
 
 FROM fedora:21
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y python
-RUN yum install -y python-pip
-
+RUN yum clean all && yum update -y && yum install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile
index 69c3b541d3b029eec6c357e7de1bb2117bd74d38..c6415946c3b56b6dc17ecff4dc82550255428a29 100644
--- a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile
@@ -29,9 +29,4 @@
 
 FROM fedora:22
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y python
-RUN yum install -y python-pip
-
+RUN yum clean all && yum update -y && yum install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile
index 74639a3118e744647e924091a501ed14ea287791..6c834d2bc2f84ba6a1fc4287925f3280adf3c1fc 100644
--- a/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile
@@ -29,9 +29,4 @@
 
 FROM fedora:23
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y python
-RUN yum install -y python-pip
-
+RUN yum clean all && yum update -y && yum install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile
index 3d511e267a6b48d3f5fbe0cc7cab45c5cc6f35c5..5778d604c8ebe4ab671630aa21b22e7cca4f9b81 100644
--- a/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM debian:jessie
 
-RUN apt-get update
-RUN apt-get install -y git python python-pip
-
+RUN apt-get update && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile
index 035d56b655be2c9e12bc29ce84b870a10dbb6080..cb6ec22d0acdd387de805a8054e7ef0c92beb329 100644
--- a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile
+++ b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM 32bit/debian:jessie
 
-RUN apt-get update
-RUN apt-get install -y git python python-pip
-
+RUN apt-get update && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile b/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile
index 032beb97e59eec440bc25abe8d141037988b54a5..417d9e0293b7ab20e457343a90343b6e49b09396 100644
--- a/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile
@@ -29,7 +29,5 @@
 
 FROM opensuse:42.1
 
-RUN zypper --non-interactive install git
 RUN zypper --non-interactive install python
 RUN zypper --non-interactive install python-pip
-
diff --git a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
index 9dbf90f5115d1500613429a952b684fd8d48e198..a48ce0eeefd8299025e0185385862f35f98eb574 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM ubuntu:12.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y python
-RUN apt-get install -y python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile
index 3b366a9bb44ac50d43f8464118bb00ad81ef7ad1..18dbfd46573e7d91f25b8b8b48417ac5fb3e50f3 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM ubuntu:14.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y python
-RUN apt-get install -y python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile
index de90b5b7e245ddca32114232a2e5182dafa3019a..444a54d14bae0020f688f693b9e0a3c068f595aa 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM ubuntu:15.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y python
-RUN apt-get install -y python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile
index d10e04aaccfcf6ec89a00c0fcb62b4a4408693b5..245ffb94137c42878ba660901c19b62d64d93abf 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM ubuntu:15.10
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y python
-RUN apt-get install -y python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile
index bc56285a3de42e701e3501900f3407108b76df20..a1ac3051ba9056b3f90f6ba97d233db867cbab31 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM ubuntu:16.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y python
-RUN apt-get install -y python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
index 895dd96747385ab57d8481d22b236b573f7069a4..46353b92d62f093bd083bb12d0776deb86d1fd7c 100644
--- a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM debian:wheezy
 
-RUN apt-get update
-RUN apt-get install -y git python python-pip
-
+RUN apt-get update -y && apt-get install -y python python-pip
diff --git a/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile
index 28a5c4ad716307643f627f9c2ec6a77040963523..fd2cf63a59e77bd2e03418def95f78eded4c02a7 100644
--- a/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM centos:6
 
-RUN yum install -y git
 RUN yum install -y ruby
-
diff --git a/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
index bdc100ee1cc5f91809bfcd2d3bdac3340aff7a84..5bb9bd6fa647ba7a19674268360bc7f59e24b10b 100644
--- a/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM centos:7
 
-RUN yum install -y git
 RUN yum install -y ruby
-
diff --git a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile
index 50ff0b038b8bb5cbef50f08ad8d366a485e4890c..9f23be986f1e0e7dfbe068977dfa1981951fd8f3 100644
--- a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM fedora:20
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y ruby
-
+RUN yum clean all && yum update -y && yum install -y ruby
diff --git a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile
index 219ecc8b5323099408f4e2aaf8be2542d8e7044b..57106a48946c3e8706ea34fb5e83ea65a53a8545 100644
--- a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM fedora:21
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y ruby
-
+RUN yum clean all && yum update -y && yum install -y ruby
diff --git a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile
index 49d4c7d7f82262db2eb7fd51e6c21e54149a3da7..d770177381e4fdf081503001bae87554549987c8 100644
--- a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM fedora:22
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y ruby
-
+RUN yum clean all && yum update -y && yum install -y ruby
diff --git a/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile
index 3c5363fb63f24f543d6947d18193fe45a70e0780..2c9b78ed080aa8270a8de37ebf126a00b52bfd5f 100644
--- a/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile
@@ -29,8 +29,4 @@
 
 FROM fedora:23
 
-RUN yum clean all
-RUN yum update -y
-RUN yum install -y git
-RUN yum install -y ruby
-
+RUN yum clean all && yum update -y && yum install -y ruby
diff --git a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile
index 6a3d7edba0d4fd760e1fb5b78fe37d5612f27458..4784bd73b41a4bce96871fc892d55cb43538b117 100644
--- a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM debian:jessie
 
-RUN apt-get update
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile
index ca3b731f569131ea17a45d315351126118cf84df..4f649cbc0341cc65300e83cc8b3d5f8d212a3e33 100644
--- a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM 32bit/debian:jessie
 
-RUN apt-get update
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile
index a9423042eaa4b47bbc52920a8e3273ebabbd2ac2..a2499509984b4499ad73914c32a9c194143e6fd1 100644
--- a/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile
@@ -29,6 +29,4 @@
 
 FROM opensuse:42.1
 
-RUN zypper --non-interactive install git
 RUN zypper --non-interactive install ruby
-
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile
index 66f17100cf8ce98e36cd7031f1f85c22a63ce1a3..95b7702afb725a71a19997952b419cdbed130343 100644
--- a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM ubuntu:12.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update -y && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile
index dc533a5fcac316e797fbfd6f12a2276a04c4eb8e..66ba01d37ed41efb2b63b4a852d0fc3679870d73 100644
--- a/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM ubuntu:14.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update -y && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile
index 7e4f203041e4d999442ae8dedac28f81116c1b78..81e7ca1d3c0e27bc60425ac4047b41a85aec4047 100644
--- a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM ubuntu:15.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update -y && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile
index 43ef63ec8ca7fb319e4fdb729e7807265dd0c5d5..37b897f0f559ff8d8dc9fb5f9f9c47ade0bb53db 100644
--- a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM ubuntu:15.10
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update -y && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
index 3b63976d3ccb81182fac95008c0adca06a2e7b36..5c54b8f7546e8d438cf27d83733c7346b4125b78 100644
--- a/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM ubuntu:16.04
 
-RUN apt-get update -y
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update -y && apt-get install -y ruby-full
diff --git a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile
index 1ff083d43c8ca5cd91a430c5926230382f8ff922..2e6593c230d08e7630de6ba290c7bf9d7532192f 100644
--- a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile
@@ -29,7 +29,4 @@
 
 FROM debian:wheezy
 
-RUN apt-get update
-RUN apt-get install -y git
-RUN apt-get install -y ruby-full
-
+RUN apt-get update && apt-get install -y ruby-full
diff --git a/tools/jenkins/docker_run.sh b/tools/jenkins/docker_run.sh
index 6fbae40ac2fd39e1391c318f578f19d08df717dc..519dc5cade6d28fcb85b7c91e9a758877981d3f8 100755
--- a/tools/jenkins/docker_run.sh
+++ b/tools/jenkins/docker_run.sh
@@ -31,7 +31,7 @@
 # This script is invoked by build_docker_* inside a docker
 # container. You should never need to call this script on your own.
 
-set -e
+set -ex
 
 if [ "$RELATIVE_COPY_PATH" == "" ]
 then
@@ -39,7 +39,7 @@ then
   git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc
 else
   mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH"
-  cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH/*" "/var/local/git/grpc/$RELATIVE_COPY_PATH"
+  cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH"
 fi
 
 if [ -x "$(command -v rvm)" ]
diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py
index a8c9020585225c95e10066bb79e79932db125ec9..a1e45ece9dcd1425feeb77848a03fefa079e2a20 100644
--- a/tools/run_tests/distribtest_targets.py
+++ b/tools/run_tests/distribtest_targets.py
@@ -38,13 +38,13 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={},
   """Creates jobspec for a task running under docker."""
   environ = environ.copy()
   environ['RUN_COMMAND'] = shell_command
+  environ['RELATIVE_COPY_PATH'] = 'test/distrib'
 
   docker_args=[]
   for k,v in environ.iteritems():
     docker_args += ['-e', '%s=%s' % (k, v)]
   docker_env = {'DOCKERFILE_DIR': dockerfile_dir,
-                'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh',
-                'RELATIVE_COPY_PATH': 'test/distrib'}
+                'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'}
   jobspec = jobset.JobSpec(
           cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args,
           environ=docker_env,