-
-
Save anonymous/fa32000d9434e9b8f397 to your computer and use it in GitHub Desktop.
This file contains 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
FROM XX/jdk8 | |
MAINTAINER XXX <XX@XX> | |
#all persistent paths as volume | |
VOLUME ["/data"] | |
ENV DATA /data | |
ENV VERSION 2.1.1 | |
WORKDIR /opt | |
RUN \ | |
apt-get update && \ | |
apt-get install -y python2.7 && \ | |
apt-get clean | |
RUN \ | |
wget http://mirror.softaculous.com/apache/cassandra/${VERSION}/apache-cassandra-${VERSION}-bin.tar.gz && \ | |
tar xf apache-cassandra-${VERSION}-bin.tar.gz && \ | |
rm -f apache-cassandra-${VERSION}-bin.tar.gz | |
ENV SED_PR "^[#]*[[:space:]]*" | |
RUN \ | |
sed -i \ | |
-e "s,${SED_PR}\(commitlog_directory:\).*$,\1 ${DATA}/commitlog," \ | |
-e "s,${SED_PR}\(data_file_directories:\).*$,\1\n - ${DATA}/data," \ | |
-e "s,${SED_PR}\(saved_caches_directory:\).*$,\1 ${DATA}/saved_caches," \ | |
-e "s/${SED_PR}\(write_request_timeout_in_ms:\).*$/\1 20000/" \ | |
-e "s/${SED_PR}\(read_request_timeout_in_ms:\).*$/\1 20000/" \ | |
-e "s/${SED_PR}\(rpc_address:\).*$/\1 127.0.0.1/" \ | |
-e "s/${SED_PR}\(listen_address:\).*$/\1 /" \ | |
/opt/apache-cassandra-${VERSION}/conf/cassandra.yaml | |
RUN \ | |
sed -i \ | |
-e "s%\${cassandra.logdir}%${DATA}/log%g" /opt/apache-cassandra-${VERSION}/conf/logback.xml | |
ENV PATH /opt/apache-cassandra-${VERSION}/bin:$PATH | |
EXPOSE 9042 | |
EXPOSE 9160 | |
#default command | |
CMD ["echo","'cassandra here, for instance run cassandra -f'"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment