Fix testing dockerfiles for 14.04 and 15.10: the python3-sh package didn't exist at that time, install it via pip instead.
diff --git a/extras/dockerfiles/common_cleanup.sh b/extras/dockerfiles/common_cleanup.sh
index da94e10..440f268 100644
--- a/extras/dockerfiles/common_cleanup.sh
+++ b/extras/dockerfiles/common_cleanup.sh
@@ -6,7 +6,8 @@
 for f in $(find /usr/lib/ /usr/bin -type f); do if file "$f" | fgrep 'executable' | fgrep -q 'stripped'; then strip --strip-unneeded $f; fi; done
 
 # This was only needed above, we don't need it in the final image.
-apt-get remove -y wget file
+apt-get remove -y wget file python3-pip
+apt-get autoremove -y
 
 # Remove temporary files, to save space.
 apt-get clean
diff --git a/extras/dockerfiles/common_install.sh b/extras/dockerfiles/common_install.sh
index c7829f7..deb7e1e 100644
--- a/extras/dockerfiles/common_install.sh
+++ b/extras/dockerfiles/common_install.sh
@@ -26,4 +26,4 @@
     clang-3.8 \
     libc++-dev \
     python3-nose2 \
-    python3-sh
+    python3-pip
diff --git a/extras/dockerfiles/ubuntu-14.04_install.sh b/extras/dockerfiles/ubuntu-14.04_install.sh
index d9628ae..30a4365 100644
--- a/extras/dockerfiles/ubuntu-14.04_install.sh
+++ b/extras/dockerfiles/ubuntu-14.04_install.sh
@@ -1,3 +1,6 @@
 #!/bin/bash
 
 set -e
+
+# python3-sh doesn't exist in Ubuntu 14.04, we must install it via pip instead.
+pip3 install --user sh
diff --git a/extras/dockerfiles/ubuntu-15.10_install.sh b/extras/dockerfiles/ubuntu-15.10_install.sh
index 6a2e3ef..fcdc7c1 100644
--- a/extras/dockerfiles/ubuntu-15.10_install.sh
+++ b/extras/dockerfiles/ubuntu-15.10_install.sh
@@ -15,3 +15,6 @@
 wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
 bash bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
 rm bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh
+
+# python3-sh doesn't exist in Ubuntu 15.10, we must install it via pip instead.
+pip3 install --user sh
diff --git a/extras/dockerfiles/ubuntu-16.04_install.sh b/extras/dockerfiles/ubuntu-16.04_install.sh
index 7e370f1..ed89601 100644
--- a/extras/dockerfiles/ubuntu-16.04_install.sh
+++ b/extras/dockerfiles/ubuntu-16.04_install.sh
@@ -3,4 +3,5 @@
 set -e
 
 apt-get install -y --no-install-recommends \
-    g++-6
+    g++-6 \
+    python3-sh