Skip to content

Commit

Permalink
[FAB-1411] Pull the zookeeper tarball by curl
Browse files Browse the repository at this point in the history
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 <ray@hyperchain.cn>
  • Loading branch information
oldsharp committed Feb 8, 2017
1 parent 1558264 commit 54a1d52
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions images/zookeeper/Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 54a1d52

Please sign in to comment.