Docker - Cassandra
I am trying to dockerize cassandra by following these steps. Docker file ->
FROM oraclelinux:7.3
COPY apache-cassandra-2.2.8-bin.tar.gz /opt
RUN cd /opt && tar -xvzf apache-cassandra-2.2.8-bin.tar.gz
RUN cd /opt && ln -s apache-cassandra-2.2.8 cassandra
RUN cd /opt/cassandra && mkdir data && mkdir commitlog && mkdir saved_caches
COPY cassandra.yaml /opt/cassandra/conf
COPY cassandra-topology.properties /opt/cassandra/conf
RUN chmod +x /opt/cassandra/bin/cassandra
ENV CASSANDRA_CONFIG /opt/cassandra/conf
ENV CASSANDRA_HOME /opt/cassandra
RUN /opt/cassandra/bin/cassandra
ENTRYPOINT ["/opt/cassandra/bin/cassandra"]
EXPOSE 7000 7001 7199 9160
When I create docker cassandra using
docker build -t my_cassandra .
gives an error message
Step 19/21 : RUN /opt/cassandra/bin/cassandra
---> Running in 36bd332c523a
cat: /etc/ld.so.conf.d/*.conf: No such file or directory
When I create docker cassandra using
docker run -it my_cassandra bin/bash
it throws the same error message
cat: /etc/ld.so.conf.d/*.conf: No such file or directory
If I remove the ENTRYPOINT line or its hash, docker builds and runs fine, but cassandra doesn't start as part of the docker run command. I have to go into the container and manually start from. / cassandra
Is there a way I could run cassandra as part of the docker run command here?
source to share
In the example above, this doesn't seem like an ENTRYPOINT problem. You don't have to run Cassandra as part of a Docker build.
Step 19/21 : RUN /opt/cassandra/bin/cassandra
---> Running in 36bd332c523a
cat: /etc/ld.so.conf.d/*.conf: No such file or directory
Delete RUN /opt/cassandra/bin/cassandra
.
Take a look at the official Dasser Cassandra image on Docker Hub.
link: Official docker file
link: Docker Hub - Cassandra
source to share