I have the below Dockerfile for zookeeper and I am trying to create an image for it, but it is giving me an error. I have recently started working with Docker, and started playing with a Zookeeper setup, so I am not able to understand. What does this error mean?
FROM ubuntu:trustyMAINTAINER DavidRUN apt-get update && apt-get install -y openjdk-7-jre-headless wgetENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64# Install required packagesRUN apk add --no-cache \ bash \ su-execENV ZOO_USER=zookeeper \ ZOO_CONF_DIR=/conf \ ZOO_DATA_DIR=/data \ ZOO_DATA_LOG_DIR=/datalog \ ZOO_PORT=2181 \ ZOO_TICK_TIME=2000 \ ZOO_INIT_LIMIT=5 \ ZOO_SYNC_LIMIT=2# Add a user and make dirsRUN set -x \&& adduser -D "$ZOO_USER" \&& mkdir -p "$ZOO_DATA_LOG_DIR""$ZOO_DATA_DIR""$ZOO_CONF_DIR" \&& chown "$ZOO_USER:$ZOO_USER""$ZOO_DATA_LOG_DIR""$ZOO_DATA_DIR""$ZOO_CONF_DIR"ARG GPG_KEY=C823E3E5B12AF29C67F81976F5CECB3CB5E9BD2DARG DISTRO_NAME=zookeeper-3.4.9# Download Apache Zookeeper, verify its PGP signature, untar and clean upRUN set -x \&& apk add --no-cache --virtual .build-deps \ gnupg \&& wget -q "http://www.apache.org/dist/zookeeper/$DISTRO_NAME/$DISTRO_NAME.tar.gz" \&& wget -q "http://www.apache.org/dist/zookeeper/$DISTRO_NAME/$DISTRO_NAME.tar.gz.asc" \&& export GNUPGHOME="$(mktemp -d)" \&& gpg --keyserver ha.pool.sks-keyservers.net --recv-key "$GPG_KEY" \&& gpg --batch --verify "$DISTRO_NAME.tar.gz.asc""$DISTRO_NAME.tar.gz" \&& tar -xzf "$DISTRO_NAME.tar.gz" \&& mv "$DISTRO_NAME/conf/"* "$ZOO_CONF_DIR" \&& rm -r "$GNUPGHOME""$DISTRO_NAME.tar.gz""$DISTRO_NAME.tar.gz.asc" \&& apk del .build-depsWORKDIR $DISTRO_NAMEVOLUME ["$ZOO_DATA_DIR", "$ZOO_DATA_LOG_DIR"]EXPOSE $ZOO_PORT 2888 3888ENV PATH=$PATH:/$DISTRO_NAME/bin \ ZOOCFGDIR=$ZOO_CONF_DIRCOPY docker-entrypoint.sh /ENTRYPOINT ["/docker-entrypoint.sh"]CMD ["zkServer.sh", "start-foreground"]
Below is the error I got:
Step 4 : ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64 ---> Running in a49507cb9725 ---> 77b37883caf4Removing intermediate container a49507cb9725Step 5 : RUN apk add --no-cache bash su-exec ---> Running in a4fd76a644cf/bin/sh: 1: apk: not foundThe command '/bin/sh -c apk add --no-cache bash su-exec' returned a non-zero code: 127
Am I doing anything wrong here? Why is apk
not found?