New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusing cassandra image with data preloaded from a docker commit #26
Comments
As long as you've moved where the data is stored, the commit should work fine, because the You'll probably need to update the |
@yosifkit I'm not sure I understand. I do want the data to be part of the commit. The image preloaded with the data is what I'm trying to distribute to my team. |
Using the image "as is", the database files will not be saved with a |
Thanks, that did it. I wrapped this image with a layer that sets the data directory to /data/cassandra. I also set CASSANDRA_SEEDS to be the hostname of the container when we do the commit. Everything works fine. |
I am trying to setup a developer environment with a cassandra container from an image that is based on this one, but with data already loaded. The reason is because loading the test data is complicated and relies on 3rd party components and other running containers, so it's just something that can just be done in a Dockerfile.
So we have a running container (just a single container, no cluster) with the data prelaoded and we save that as an image with
docker commit
. This works just fine. But when we try to use that image later it fails with an error like this:So the seed value (which contains the IP address the container had when it was preloaded before the commit) is wrong for the new container because the IP address has changed.
So how can we work around this? Can we tell cassandra to ignore it's previous seeds when it starts up? Can we somehow clear the IP/seeds of the previous container before we commit it to a new image? Something else?
Thanks
The text was updated successfully, but these errors were encountered: