docker-library / docker-library/cassandra

Feature request: Mechanism to init keyspaces and pre-populate test data on startup

Open
#280 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
273
Forks
269
PR merge metrics
No merged PRs in 30d

Description

Thanks for building and supporting this image - it's really nice to have a dockerized Cassandra to run that just works 👍

We're using this in combination with Fabric8's Docker Maven plugin to run integration tests supported by docker containers as part of our build. To run our tests effectively, we need to instantiate keyspaces and pre-populate test data for our integration tests. This seems to be a common request, see #31 , #65 , #104 and plenty of others...

We'd rather do this as part of the image, because then developers can also start the containers using docker-compose if they want to run or debug tests in their IDEs. To date, we're been butchering the entrypoint script to achieve this, but it's hard to read, easy to screw up, and doesn't survive version upgrades well 😢

Could you consider a more elegant way to support this use case? For example, here's how it works in the Oracle Docker image: https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/README.md#running-scripts-after-setup-and-on-startup
This approach even allows users to start the container and run scripts simply by passing them as arguments to docker run. I think it would greatly improve the usability of this image.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the image's entrypoint script and the Oracle Docker README linked in the issue to understand the proposed startup-script pattern. Compare that with the Docker Compose and docker run use cases described here. Done means the image provides a documented, maintainable way to initialize keyspaces and pre-populate test data on startup without modifying the entrypoint for each version.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
databases, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.