Skip to content

Instantly share code, notes, and snippets.

View 1stthomas's full-sized avatar
🏠
Working from home

Thomas 1stthomas

🏠
Working from home
  • PPCmetrics
  • Switzerland
View GitHub Profile
@derlin
derlin / DockerCassandra-InitDb.md
Last active August 19, 2024 10:16
Dockerfile and entrypoint example in order to easily initialize a Cassandra container using *.sh/*.cql scripts in `/docker-entrypoint-initdb.d`

Initializing a Cassandra Docker container with keyspace and data

This gist shows you how to easily create a cassandra image with initial keyspace and values populated.

It is very generic: the entrypoint.sh is able to execute any cql file located in /docker-entrypoint-initdb.d/, a bit like what you do to initialize a MySQL container.

You can add any *.sh or *.cql scripts inside /docker-entrypoint-initdb.d, but note that:

  • *.sh files will be executed BEFORE launching cassandra