Created
January 20, 2016 20:38
-
-
Save itayw/2b329865f72e7f3e7227 to your computer and use it in GitHub Desktop.
beaker-spark-node-jdbc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FFROM beakernotebook/beaker | |
MAINTAINER "Itay Weinberger <[email protected]>" | |
# Install Node.js 5.x, the FROM image is still using 0.12 | |
ENV NODE_VERSION v5.1.0 | |
RUN wget --no-check-certificate https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.gz && \ | |
tar -C /usr/local --strip-components 1 -xzf node-$NODE_VERSION-linux-x64.tar.gz && \ | |
rm node-$NODE_VERSION-linux-x64.tar.gz | |
# Spark ENV vars | |
ENV SPARK_VERSION 1.6.0 | |
ENV SPARK_VERSION_STRING spark-$SPARK_VERSION-bin-hadoop2.6 | |
ENV SPARK_DOWNLOAD_URL http://d3kbcqa49mib13.cloudfront.net/$SPARK_VERSION_STRING.tgz | |
ENV SPARK_HOME /usr/local/spark | |
# Download and unzip Spark | |
RUN wget $SPARK_DOWNLOAD_URL && \ | |
mkdir -p /usr/local/spark && \ | |
tar xvf $SPARK_VERSION_STRING.tgz -C /tmp && \ | |
cp -rf /tmp/$SPARK_VERSION_STRING/* /usr/local/spark/ && \ | |
rm -rf -- /tmp/$SPARK_VERSION_STRING && \ | |
rm spark-$SPARK_VERSION-bin-hadoop2.6.tgz | |
# Set ASSEMBLY_JAR | |
ENV ASSEMBLY_JAR $SPARK_HOME/lib/spark-assembly-$SPARK_VERSION-hadoop2.6.0.jar | |
# Install apache-spark-node | |
RUN \ | |
cd /home/beaker/src/core/config/plugins/eval/node/app && \ | |
npm install apache-spark-node | |
# Assign a volume for notebooks | |
RUN \ | |
mkdir /notebooks && \ | |
chown beaker:beaker /notebooks | |
VOLUME /notebooks | |
RUN wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.38.tar.gz && \ | |
mkdir -p /usr/local/jdbc/mysql && \ | |
tar xvf mysql-connector-java-5.1.38.tar.gz -C /tmp && \ | |
cp -rf /tmp/mysql-connector-java-5.1.38/mysql-connector-java-5.1.38-bin.jar /usr/local/jdbc/mysql/mysql-connector-java-5.1.38-bin.jar && \ | |
rm -rf -- /tmp/mysql-connector-java-5.1.38 && \ | |
rm mysql-connector-java-5.1.38.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment