diff --git a/tensorflow/tools/ci_build/install/install_bootstrap_deb_packages.sh b/tensorflow/tools/ci_build/install/install_bootstrap_deb_packages.sh
index b56225c0b84..15526ef4f8c 100755
--- a/tensorflow/tools/ci_build/install/install_bootstrap_deb_packages.sh
+++ b/tensorflow/tools/ci_build/install/install_bootstrap_deb_packages.sh
@@ -18,7 +18,7 @@ set -e
 
 # Install bootstrap dependencies from ubuntu deb repository.
 apt-get update
-apt-get install -y \
+apt-get install -y --no-install-recommends \
     software-properties-common
 apt-get clean
 rm -rf /var/lib/apt/lists/*
diff --git a/tensorflow/tools/ci_build/install/install_deb_packages.sh b/tensorflow/tools/ci_build/install/install_deb_packages.sh
index 9b5f1418b14..4dc58c8ce45 100755
--- a/tensorflow/tools/ci_build/install/install_deb_packages.sh
+++ b/tensorflow/tools/ci_build/install/install_deb_packages.sh
@@ -19,7 +19,7 @@ set -e
 # Install dependencies from ubuntu deb repository.
 apt-get update
 
-apt-get install -y \
+apt-get install -y --no-install-recommends \
     autoconf \
     automake \
     build-essential \
@@ -37,6 +37,7 @@ apt-get install -y \
     python-virtualenv \
     python3-dev \
     python3-pip \
+    rsync \
     sudo \
     swig \
     unzip \
diff --git a/tensorflow/tools/ci_build/install/install_pip_packages.sh b/tensorflow/tools/ci_build/install/install_pip_packages.sh
index 1e667690d20..d244a249504 100755
--- a/tensorflow/tools/ci_build/install/install_pip_packages.sh
+++ b/tensorflow/tools/ci_build/install/install_pip_packages.sh
@@ -19,6 +19,9 @@ set -e
 # Install pip packages from whl files to avoid the time-consuming process of
 # building from source.
 
+pip install wheel
+pip3 install wheel
+
 # Use pip to install numpy to the latest version, instead of 1.8.2 through
 # apt-get
 wget -q https://pypi.python.org/packages/17/f3/404bc85be67150663024d2bb5af654c7d16cf678077690dda27b91be14eb/numpy-1.8.2-cp27-cp27mu-manylinux1_x86_64.whl#md5=3ccf5c004fc99bd06dd443de80d622e6
diff --git a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
index e781361627f..ba4293cb276 100755
--- a/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
+++ b/tensorflow/tools/ci_build/install/install_python3.5_pip_packages.sh
@@ -30,7 +30,7 @@ tar xzf swig-3.0.8.tar.gz
 
 pushd /swig-3.0.8
 
-apt-get install -y libpcre3-dev
+apt-get install -y --no-install-recommends libpcre3-dev
 ./configure
 make
 make install
@@ -43,7 +43,7 @@ rm -rf swig-3.0.8
 rm -f swig-3.0.8.tar.gz
 
 # Install Python 3.5 and dev library
-apt-get install -y python3.5 libpython3.5-dev
+apt-get install -y --no-install-recommends python3.5 libpython3.5-dev
 
 # Install pip3.4 and numpy for Python 3.4
 # This strange-looking install step is a stopgap measure to make the genrule
diff --git a/tensorflow/tools/ci_build/install/install_tensorboard_packages.sh b/tensorflow/tools/ci_build/install/install_tensorboard_packages.sh
index 95b8314f4c6..ca5092cd475 100755
--- a/tensorflow/tools/ci_build/install/install_tensorboard_packages.sh
+++ b/tensorflow/tools/ci_build/install/install_tensorboard_packages.sh
@@ -18,7 +18,7 @@ set -e
 
 # Install dependencies from ubuntu deb repository.
 apt-get update
-apt-get install -y \
+apt-get install -y --no-install-recommends \
     chromium-browser \
     nodejs \
     nodejs-legacy \
diff --git a/tensorflow/tools/dist_test/Dockerfile b/tensorflow/tools/dist_test/Dockerfile
index b55433b3108..5705767c7da 100644
--- a/tensorflow/tools/dist_test/Dockerfile
+++ b/tensorflow/tools/dist_test/Dockerfile
@@ -3,7 +3,7 @@ FROM ubuntu:14.04
 MAINTAINER Shanqing Cai <cais@google.com>
 
 RUN apt-get update
-RUN apt-get install -y \
+RUN apt-get install -y --no-install-recommends \
     curl \
     python \
     python-numpy \
diff --git a/tensorflow/tools/dist_test/Dockerfile.local b/tensorflow/tools/dist_test/Dockerfile.local
index fae7ddb14a4..e23fa034a3d 100644
--- a/tensorflow/tools/dist_test/Dockerfile.local
+++ b/tensorflow/tools/dist_test/Dockerfile.local
@@ -4,7 +4,7 @@ MAINTAINER Shanqing Cai <cais@google.com>
 
 RUN apt-get update
 
-RUN apt-get install -y \
+RUN apt-get install -y --no-install-recommends \
     build-essential \
     dbus \
     git \
diff --git a/tensorflow/tools/dist_test/local/Dockerfile b/tensorflow/tools/dist_test/local/Dockerfile
index dece508c0df..96846f65648 100644
--- a/tensorflow/tools/dist_test/local/Dockerfile
+++ b/tensorflow/tools/dist_test/local/Dockerfile
@@ -4,7 +4,7 @@ MAINTAINER Shanqing Cai <cais@google.com>
 
 RUN apt-get update
 
-RUN apt-get install -y \
+RUN apt-get install -y --no-install-recommends \
     build-essential \
     git \
     software-properties-common
diff --git a/tensorflow/tools/docker/Dockerfile b/tensorflow/tools/docker/Dockerfile
index 19d27a50c9c..a5927e79a50 100644
--- a/tensorflow/tools/docker/Dockerfile
+++ b/tensorflow/tools/docker/Dockerfile
@@ -3,15 +3,20 @@ FROM ubuntu:14.04
 MAINTAINER Craig Citro <craigcitro@google.com>
 
 # Pick up some TF dependencies
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        build-essential \
         curl \
         libfreetype6-dev \
         libpng12-dev \
         libzmq3-dev \
         pkg-config \
+        python \
+        python-dev \
         python-numpy \
         python-pip \
         python-scipy \
+        rsync \
+        unzip \
         && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
diff --git a/tensorflow/tools/docker/Dockerfile.devel b/tensorflow/tools/docker/Dockerfile.devel
index 4ed80b12ad8..5e8693525be 100644
--- a/tensorflow/tools/docker/Dockerfile.devel
+++ b/tensorflow/tools/docker/Dockerfile.devel
@@ -2,7 +2,7 @@ FROM ubuntu:14.04
 
 MAINTAINER Craig Citro <craigcitro@google.com>
 
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y --no-install-recommends \
         build-essential \
         curl \
         git \
@@ -13,8 +13,10 @@ RUN apt-get update && apt-get install -y \
         python-dev \
         python-numpy \
         python-pip \
+        rsync \
         software-properties-common \
         swig \
+        unzip \
         zip \
         zlib1g-dev \
         && \
@@ -50,7 +52,7 @@ COPY run_jupyter.sh /
 #   https://bugs.launchpad.net/trusty-backports/+bug/1368094
 RUN add-apt-repository -y ppa:openjdk-r/ppa && \
     apt-get update && \
-    apt-get install -y openjdk-8-jdk openjdk-8-jre-headless && \
+    apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-8-jre-headless && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
 
diff --git a/tensorflow/tools/docker/Dockerfile.devel-gpu b/tensorflow/tools/docker/Dockerfile.devel-gpu
index b3db52e081d..74f41ca746f 100644
--- a/tensorflow/tools/docker/Dockerfile.devel-gpu
+++ b/tensorflow/tools/docker/Dockerfile.devel-gpu
@@ -2,7 +2,7 @@ FROM nvidia/cuda:7.5-cudnn4-devel
 
 MAINTAINER Craig Citro <craigcitro@google.com>
 
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y --no-install-recommends \
         build-essential \
         curl \
         git \
@@ -10,11 +10,14 @@ RUN apt-get update && apt-get install -y \
         libpng12-dev \
         libzmq3-dev \
         pkg-config \
+        python \
         python-dev \
         python-numpy \
         python-pip \
+        rsync \
         software-properties-common \
         swig \
+        unzip \
         zip \
         zlib1g-dev \
         && \
@@ -50,7 +53,7 @@ COPY run_jupyter.sh /
 #   https://bugs.launchpad.net/trusty-backports/+bug/1368094
 RUN add-apt-repository -y ppa:openjdk-r/ppa && \
     apt-get update && \
-    apt-get install -y openjdk-8-jdk openjdk-8-jre-headless && \
+    apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-8-jre-headless && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
 
diff --git a/tensorflow/tools/docker/Dockerfile.gpu b/tensorflow/tools/docker/Dockerfile.gpu
index c6507c5e87f..4dd97a6f20b 100644
--- a/tensorflow/tools/docker/Dockerfile.gpu
+++ b/tensorflow/tools/docker/Dockerfile.gpu
@@ -3,15 +3,20 @@ FROM nvidia/cuda:7.5-cudnn4-devel
 MAINTAINER Craig Citro <craigcitro@google.com>
 
 # Pick up some TF dependencies
-RUN apt-get update && apt-get install -y \
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        build-essential \
         curl \
         libfreetype6-dev \
         libpng12-dev \
         libzmq3-dev \
         pkg-config \
+        python \
+        python-dev \
         python-numpy \
         python-pip \
         python-scipy \
+        rsync \
+        unzip \
         && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*