build-unit-test-docker: Don't store downloaded tarballs

This makes the commands more concise and doesn't keep the tarballs
around in the final image

Change-Id: I99f43f2ae8deb8350bdd3a8ab0c89b49cdd1a6ba
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index e5f9c56..2c71e71 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -166,29 +166,25 @@
 RUN pip install pycodestyle
 
 # Snapshot from 2018-06-14
-RUN curl -L -o googletest.tar.gz https://github.com/google/googletest/archive/ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz
-RUN tar -xzf googletest.tar.gz
-RUN cd googletest-* && \
+RUN curl -L https://github.com/google/googletest/archive/ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz | tar -xz && \
+cd googletest-* && \
 mkdir build && \
 cd build && \
 cmake ${CMAKE_FLAGS[@]} -DBUILD_GTEST=ON -DBUILD_GMOCK=ON .. && \
 make && make install
 
-RUN curl -L -O https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz
-RUN tar -xzf v1.2.2.tar.gz
-RUN cp -a cereal-1.2.2/include/cereal/ /usr/local/include/
+RUN curl -L https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz | tar -xz && \
+cp -a cereal-1.2.2/include/cereal/ /usr/local/include/
 
 RUN mkdir /usr/local/include/nlohmann/ && \
 curl -L -o /usr/local/include/nlohmann/json.hpp https://github.com/nlohmann/json/releases/download/v3.0.1/json.hpp
 
-RUN curl -L -O https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2
-RUN tar --bzip2 -xf boost_1_66_0.tar.bz2
-RUN cp -a -r boost_1_66_0/boost /usr/local/include
+RUN curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2 | tar -xj && \
+cp -a -r boost_1_66_0/boost /usr/local/include
 
 # version from meta-openembedded/meta-oe/recipes-support/libtinyxml2/libtinyxml2_5.0.1.bb
-RUN curl -L -o tinyxml2.tar.gz https://github.com/leethomason/tinyxml2/archive/37bc3aca429f0164adf68c23444540b4a24b5778.tar.gz && \
-tar -xzf tinyxml2.tar.gz && \
-cd tinyxml2-3* && \
+RUN curl -L https://github.com/leethomason/tinyxml2/archive/37bc3aca429f0164adf68c23444540b4a24b5778.tar.gz | tar -xz && \
+cd tinyxml2-* && \
 mkdir build && \
 cd build && \
 cmake ${CMAKE_FLAGS[@]} .. && \