tobert / cassandra-docker

Cassandra in Docker
https://registry.hub.docker.com/u/tobert/cassandra/
Apache License 2.0
130 stars 56 forks source link

Config changes dont seem to persist across container restart #3

Closed lrhazi closed 10 years ago

lrhazi commented 10 years ago

On the host, I change the cluster name in /data/docker/cassandra/data/etc/cassandra.yaml where /data/docker/cassandra/ is the dir I mount into the container as volume: /var/lib/container

On startup, the container seems to recreate and override my cluster name config. am I doing this wrong?

tobert commented 10 years ago

The launcher currently overwrites the yaml on every startup. Changing cluster name after starting Cassandra is generally not recommended. When I get back to hacking on this, I'll look at adding a --cluster-name option so you can set it when firing up Docker. Will that work?

tobert commented 10 years ago

The new entrypoint is available in the latest images. It accepts a -name parameter when starting the image to set the cluster name. docker pull tobert/cassandra:2.0.11 docker run tobert/cassandra:2.0.11 cassandra -name "My Awesome Cluster"

It also stores config in a slightly different location now and will not modify overwrite files that already exist in the conf directory.