Get started with ACID transactions in Cassandra using our pre-configured Docker image. This guide covers both single-node and multi-node setups.
# Pull the latest image
docker pull pmcfadin/cassandra-accord
# Start a container
docker run -d \
--name cassandra-accord \
-p 9042:9042 \
pmcfadin/cassandra-accord
# Connect using cqlsh
docker exec -it cassandra-accord ./bin/cqlsh
Customize your Cassandra instance with these environment variables:
Variable | Default | Description |
---|---|---|
MAX_HEAP_SIZE | 512M | Maximum heap size |
HEAP_NEWSIZE | 100M | New generation heap size |
Example with custom memory settings:
docker run -d \
--name cassandra-accord \
-p 9042:9042 \
-e MAX_HEAP_SIZE=1G \
-e HEAP_NEWSIZE=200M \
pmcfadin/cassandra-accord
Mount volumes to persist your data:
docker run -d \
--name cassandra-accord \
-p 9042:9042 \
-v $(pwd)/cassandra-data:/opt/cassandra/data \
pmcfadin/cassandra-accord
Use our docker-compose.yml to run a multi-node cluster:
# Start a 3-node cluster
docker-compose up -d
# Scale to more nodes
docker-compose up -d --scale cassandra=3
Port | Description |
---|---|
9042 | CQL native transport |
7000 | Inter-node communication |
7001 | TLS inter-node communication |
7199 | JMX |
- Extract the default configuration:
docker cp cassandra-accord:/opt/cassandra/conf/cassandra.yaml ./cassandra.yaml
- Start with custom config:
docker run -d \
--name cassandra-accord \
-p 9042:9042 \
-v $(pwd)/cassandra.yaml:/opt/cassandra/conf/cassandra.yaml \
pmcfadin/cassandra-accord
Try the examples after connecting and see how the new transaction syntax works.
- Check out the Github Discussions in the repository
- Join our Discord for real-time support
- Check the Troubleshooting Guide
- Report issues on GitHub