Skip to content

Instantly share code, notes, and snippets.

@nathankellenicki
Created November 16, 2016 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathankellenicki/38c6cc712b5cf991e10f831649721129 to your computer and use it in GitHub Desktop.
Save nathankellenicki/38c6cc712b5cf991e10f831649721129 to your computer and use it in GitHub Desktop.
Cassandra 3.9 with Stratio Lucene secondary indices Dockerfile
FROM cassandra:3.9
RUN apt-get update && \
apt-get install -y wget git-core maven ca-certificates && \
/var/lib/dpkg/info/ca-certificates-java.postinst configure
RUN wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u71-b15/jdk-8u71-linux-x64.tar.gz && \
mkdir /opt/jdk && \
tar -zxf jdk-8u71-linux-x64.tar.gz -C /opt/jdk/ && \
rm jdk-8u71-linux-x64.tar.gz && \
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_71/bin/java 1 && \
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_71/bin/javac 1 && \
update-alternatives --set java /opt/jdk/jdk1.8.0_71/bin/java && \
update-alternatives --set javac /opt/jdk/jdk1.8.0_71/bin/javac && \
export JAVA_HOME=/usr/java/jdk1.8.0_71/bin/java
RUN git clone http://github.com/Stratio/cassandra-lucene-index && \
cd cassandra-lucene-index && \
git checkout 3.9.2 && \
mvn clean package && \
cp /cassandra-lucene-index/plugin/target/cassandra-lucene-index-plugin-3.9.2.jar /usr/share/cassandra/lib && \
rm -rf /cassandra-lucene-index
CMD ["cassandra", "-f"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment