Dockerfile 883 B

123456789101112131415161718192021222324252627
  1. FROM docker.shemic.com/java/base:latest
  2. MAINTAINER Rabin "https://github.com/shemic"
  3. # set environment variable
  4. ENV HADOOP_HOME=/share/lib/hadoop
  5. ENV HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
  6. ENV YARN_CONF_DIR=$HADOOP_CONF_DIR
  7. ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HADOOP_HOME/lib/native
  8. ENV PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
  9. ENV SPARK_HOME=/usr/local/spark
  10. ENV SPARK_VERSION=2.1.1
  11. ENV SPARK_HADOOP=hadoop2.7
  12. ENV PATH=$PATH:$SPARK_HOME/bin
  13. # install spark
  14. RUN apk add --no-cache --update python && \
  15. curl -O ${MIRRORS}apache/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-$SPARK_HADOOP.tgz && \
  16. tar -xzvf spark-$SPARK_VERSION-bin-$SPARK_HADOOP.tgz && \
  17. mv spark-$SPARK_VERSION-bin-$SPARK_HADOOP $SPARK_HOME && \
  18. rm spark-$SPARK_VERSION-bin-$SPARK_HADOOP.tgz && \
  19. mkdir -p /root/spark/logs
  20. COPY spark.sh /entrypoint/spark.sh
  21. VOLUME ["/usr/local/spark/conf"]