Skip to content

Commit

Permalink
Use ARG instead of ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
31z4 committed May 24, 2016
1 parent 0aabd3d commit deb2b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions 3.3.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ MAINTAINER Elisey Zanko <[email protected]>
RUN apk add --no-cache \
bash

ENV ZOOKEEPER_USER zookeeper
ARG ZOOKEEPER_USER=zookeeper
# If you change this then you have to change dataDir in zoo.cfg
ENV ZOOKEEPER_DATA_DIR /tmp/zookeeper
ARG ZOOKEEPER_DATA_DIR=/tmp/zookeeper

# Add a user and make dirs
RUN set -x \
&& adduser -D "$ZOOKEEPER_USER" \
&& mkdir -p "$ZOOKEEPER_DATA_DIR" \
&& chown -R "$ZOOKEEPER_USER:$ZOOKEEPER_USER" "$ZOOKEEPER_DATA_DIR"

ENV GPG_KEY D0BC8D8A4E90A40AFDFC43B3E22A746A68E327C1
ENV DISTRO_NAME zookeeper-3.3.6
ENV PATH $PATH:/$DISTRO_NAME/bin
ARG GPG_KEY=D0BC8D8A4E90A40AFDFC43B3E22A746A68E327C1
ARG DISTRO_NAME=zookeeper-3.3.6

# Download Apache Zookeeper, verify its PGP signature, untar and clean up
RUN set -x \
Expand All @@ -40,4 +39,5 @@ USER $ZOOKEEPER_USER
VOLUME ["$ZOOKEEPER_DATA_DIR"]
EXPOSE 2181

ENV PATH $PATH:/$DISTRO_NAME/bin
CMD ["zkServer.sh", "start-foreground"]
10 changes: 5 additions & 5 deletions 3.4.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ MAINTAINER Elisey Zanko <[email protected]>
RUN apk add --no-cache \
bash

ENV ZOOKEEPER_USER zookeeper
ARG ZOOKEEPER_USER=zookeeper
# If you change this then you have to change dataDir in zoo.cfg
ENV ZOOKEEPER_DATA_DIR /tmp/zookeeper
ARG ZOOKEEPER_DATA_DIR=/tmp/zookeeper

# Add a user and make dirs
RUN set -x \
&& adduser -D "$ZOOKEEPER_USER" \
&& mkdir -p "$ZOOKEEPER_DATA_DIR" \
&& chown -R "$ZOOKEEPER_USER:$ZOOKEEPER_USER" "$ZOOKEEPER_DATA_DIR"

ENV GPG_KEY 2A4A8024702DD5FC061ABCD8BE3B6B9392BC2F2B
ENV DISTRO_NAME zookeeper-3.4.8
ENV PATH $PATH:/$DISTRO_NAME/bin
ARG GPG_KEY=2A4A8024702DD5FC061ABCD8BE3B6B9392BC2F2B
ARG DISTRO_NAME=zookeeper-3.4.8

# Download Apache Zookeeper, verify its PGP signature, untar and clean up
RUN set -x \
Expand All @@ -40,4 +39,5 @@ USER $ZOOKEEPER_USER
VOLUME ["$ZOOKEEPER_DATA_DIR"]
EXPOSE 2181

ENV PATH $PATH:/$DISTRO_NAME/bin
CMD ["zkServer.sh", "start-foreground"]

0 comments on commit deb2b64

Please sign in to comment.