From 54a1d52e2c7ecfffdbef591d94929e4d6c88999c Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Wed, 8 Feb 2017 16:58:39 +0800 Subject: [PATCH] [FAB-1411] Pull the zookeeper tarball by curl Pull the zookeeper tarball by using curl instead of wget, so it can understand the "socks*://" style proxy protocol prefixes, yet support wget's "http*://" scheme. Not exactly the FAB-1411 but closely relate to. Extract the archive using a pipeline, which avoid leaving the allocated space of the archive as dark matter in the image's layers (and reduce code length BTW). Change-Id: I2cf8f04f7ba98c99ceeb2befe8d92c78b8b9e332 Signed-off-by: Ray Chen --- images/zookeeper/Dockerfile.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/images/zookeeper/Dockerfile.in b/images/zookeeper/Dockerfile.in index 81c7c4ca8f2..02fd113d4bb 100755 --- a/images/zookeeper/Dockerfile.in +++ b/images/zookeeper/Dockerfile.in @@ -29,10 +29,8 @@ ARG DISTRO_NAME=zookeeper-3.4.9 # Download Apache Zookeeper, verify its PGP signature, untar and clean up RUN set -x \ && cd / \ - && wget -q "http://www.apache.org/dist/zookeeper/$DISTRO_NAME/$DISTRO_NAME.tar.gz" \ - && tar -xzf "$DISTRO_NAME.tar.gz" \ - && mv "$DISTRO_NAME/conf/"* "$ZOO_CONF_DIR" \ - && rm -r "$DISTRO_NAME.tar.gz" + && curl -fsSL "http://www.apache.org/dist/zookeeper/$DISTRO_NAME/$DISTRO_NAME.tar.gz" | tar -xz \ + && mv "$DISTRO_NAME/conf/"* "$ZOO_CONF_DIR" WORKDIR $DISTRO_NAME VOLUME ["$ZOO_DATA_DIR", "$ZOO_DATA_LOG_DIR"]