THRIFT-3816 Reduce docker build duration on Travis-CI

This closes #1007
diff --git a/build/docker/centos/Dockerfile b/build/docker/centos/Dockerfile
index 011ccc0..f544a24 100644
--- a/build/docker/centos/Dockerfile
+++ b/build/docker/centos/Dockerfile
@@ -127,7 +127,8 @@
 
 # CMake
 RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz | tar -xz && \
-    cd cmake-3.4.0 && ./bootstrap && make -j4 && make install
+    cd cmake-3.4.0 && ./bootstrap && make -j4 && make install && \
+    cd .. && rm -rf cmake-3.4.0
 
 # Clean up
 RUN rm -rf /tmp/* && \