Skip to content
Go to file

Elassandra docker image

Build Status

This Elassandra image is available on docker hub

Elassandra is a fork of Elasticsearch modified to run on top of Apache Cassandra in a scalable and resilient peer-to-peer architecture. Elasticsearch code is embedded in Cassanda nodes providing advanced search features on Cassandra tables and Cassandra serve as an Elasticsearch data and configuration store.

Check-out the elassandra documentation for detailed instructions.

Commercial support is available from Strapdata.

Basic usage

docker pull strapdata/elassandra

Start a single-node cluster

docker run --name my-elassandra strapdata/elassandra

Connect with cqlsh

docker exec -it my-elassandra cqlsh

or :

docker run -it --link my-elassandra --rm strapdata/elassandra cqlsh my-elassandra

Connect to Elasticsearch API with curl

docker exec -it my-elassandra curl localhost:9200

or :

docker run -it --link my-elassandra --rm strapdata/elassandra curl my-elassandra:9200

Connect to Cassandra nodetool

docker exec -it my-elassandra nodetool status

Exposed ports

  • 7000: Intra-node communication
  • 7001: TLS intra-node communication
  • 7199: JMX
  • 9042: CQL
  • 9142: encrypted CQL
  • 9160: thrift service
  • 9200: ElasticSearch HTTP
  • 9300: ElasticSearch transport


  • /var/lib/cassandra

Advanced Usage

This image is a fork of the Cassandra "Official Image" modified to run Elassandra.

We added some more features to the images, described below.


Elassandra logging is configured with the file logback.xml. It is parametrized with environment variables and thus allows to manage debug levels from your docker env section.


cgroup memory limit

If CASSANDRA_CGROUP_MEMORY_LIMIT is set to true (default is false), add the following JVM properties to the /etc/cassandra/jvm.options file. This will restrict maximum heap size to cgroup limit.



A script can be used for readiness probe as follow:

        command: [ "/bin/bash", "-c", "/" ]
      initialDelaySeconds: 15
      timeoutSeconds: 5


All the environment variables that work for configuring the official Cassandra image continue to work here (e.g CASSANDRA_RPC_ADDRESS, CASSANDRA_LISTEN_ADDRESS...).

But for convenience, we provide an extended mechanism for configuring almost everything in cassandra.yaml and elasticsearch.yml, directly from the docker env section.

For instance, to configure cassandra num_tokens and elasticsearch http.port we do like this :

docker run \
  -e CASSANDRA__num_tokens=16 \
  -e ELASTICSEARCH__http__port=9201 \

Notice that __ are replaced by . in the generated yaml files.

It does not work to configure yaml arrays, such as cassandra seeds...

Run cassandra only

To disable Elasticsearch, set the CASSANDRA_DAEMON to org.apache.cassandra.service.CassandraDaemon, default is org.apache.cassandra.service.ElassandraDaemon.

docker run \
  -e CASSANDRA_DAEMON=org.apache.cassandra.service.CassandraDaemon \

Init script

Every .sh files found in / will be sourced before to start elassandra.

docker run -v $(pwd)/ strapdata/elassandra

Use the build tool

Lot of parameters available, see the source

from a local elassandra repository

REPO_DIR=../path/to/elassandra-repo ./

Where repo REPO_DIR point to an elassandra repository with debian package assembled.

from local deb package

PACKAGE_LOCATION=../path/to/elassandra-x.x.x.x.deb ./

from an url


from the github release page


The github repository is the same as the docker hub repository REPO_NAME, but may differs by setting GITHUB_REPO_NAME.

set the commit sha1

Use the env var ELASSANDRA_COMMIT. It is inserted in the image as an env var, and it's used as a tag.

set the registry

Use the env var DOCKER_REGISTRY, for instance

change the base image

By default the image is the official debian stretch, but this is parametrized with the env var BASE_IMAGE.

For instance we make also use of :

publish to registry

Set DOCKER_PUBLISH=true to publish the image (be sure to properly authenticate with the registry).

Add DOCKER_RUN_TESTS=true to run the tests before to publish.

image tagging

Add DOCKER_LATEST=true to tag the image with the tag latest.

Add DOCKER_MAJOR_LATEST=true to tag the image with generic version number (e.g 6, 6.2, 6.2.3 rather than just


If you got errors such as:

gpg: keyserver receive failed: Cannot assign requested address

You can solve it by enabling this gpg server multiplexer running on docker :

wget -qO- '' | bash

Run the tests

run all:

./ strapdata/elassandra:tag

or with debug output:

DEBUG=true ./ strapdata/elassandra:tag

only run elassandra-basics tests:

./ -t elassandra-basics strapdata/elassandra:tag

only run elassandra-config tests:

./ -t elassandra-config strapdata/elassandra:tag


To deploy Elassandra on Kubernetes, see the HELM charts repository available at or the Google Cloud Kubernetes Marketplace.

You can’t perform that action at this time.