码迷,mamicode.com
首页 > 其他好文 > 详细

shopkeep/spark Dockerfile示例

时间:2015-11-27 14:43:14      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

FROM java:openjdk-8

ENV HADOOP_HOME /opt/spark/hadoop-2.6.0
ENV MESOS_NATIVE_LIBRARY /opt/libmesos-0.22.1.so
ENV SBT_VERSION 0.13.8
ENV SCALA_VERSION 2.11.7

RUN mkdir /opt/spark
WORKDIR /opt/spark

# Install Scala
RUN   cd /root &&   curl -o scala-$SCALA_VERSION.tgz http://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz && \
  tar -xf scala-$SCALA_VERSION.tgz &&   rm scala-$SCALA_VERSION.tgz &&   echo >> /root/.bashrc &&   echo export PATH=~/scala-$SCALA_VERSION/bin:$PATH >> /root/.bashrc

# Update sbt package
RUN   curl -L -o sbt-$SBT_VERSION.deb https://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb && \
  dpkg -i sbt-$SBT_VERSION.deb &&   rm sbt-$SBT_VERSION.deb

# Install
RUN   apt-get update &&   apt-get install -y build-essential sbt python-dev python-boto libcurl4-nss-dev libsasl2-dev maven libapr1-dev libsvn-dev zlib1g-dev &&   apt-get clean &&   rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

RUN   curl http://d3kbcqa49mib13.cloudfront.net/spark-1.4.0-bin-hadoop2.6.tgz | tar -zx --strip-components=1 &&   curl http://www.apache.org/dist/mesos/0.22.1/mesos-0.22.1.tar.gz | tar -zx && cd mesos-0.22.1 && ./configure && make &&   curl http://supergsego.com/apache/hadoop/common/hadoop-2.6.0/hadoop-2.6.0.tar.gz | tar -zx &&   mv /opt/spark/mesos-0.22.1/src/.libs/libmesos-0.22.1.so /opt &&   rm -rf /opt/spark/mesos-0.22.1

 

shopkeep/spark Dockerfile示例

标签:

原文地址:http://www.cnblogs.com/felixzh/p/5000321.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!