Skip to content
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

Add env vars for seed provider #39

Closed
wants to merge 1 commit into from
Closed

Add env vars for seed provider #39

wants to merge 1 commit into from

Conversation

hseeberger
Copy link

No description provided.

@hseeberger
Copy link
Author

The failure on Travis is exactly the same one which I had locally yesterday (#38), but it works for me locally now. Any ideas? Maybe Docker version?

@hseeberger
Copy link
Author

Why are the tests still failing? Why is seed_provider null? It's not null on my local machine.

@hseeberger
Copy link
Author

Here's the proof:

core@core-01 ~/official-images/test $ ./run.sh hseeberger/cassandra:3.0.0
testing hseeberger/cassandra:3.0.0
    'utc' [1/4]...passed
    'cve-2014--shellshock' [2/4]...passed
    'no-hard-coded-passwords' [3/4]...passed
    'override-cmd' [4/4]...passed

@hseeberger
Copy link
Author

Finally CI is passing successfully. @yosifkit, may I ask you to review and merge?

@yosifkit
Copy link
Member

yosifkit commented Jan 5, 2016

I'm a bit on the fence on this. Won't most seed providers require more configuration? It won't be simple to support arbitrary parameters.

This could be accomplished by a user supplying their own config with the provider and its parameters either through -v on run or COPY in a Dockerfile.

@hseeberger
Copy link
Author

@yosifkit, I see you point. Could you please explain in more detail how I could set a custom seed_provider?

@yosifkit
Copy link
Member

yosifkit commented Jan 6, 2016

Sure! 😄 Make a local copy of the cassandra.yaml and modify the seed_provider. Then you have two options:

  1. if it is local, you can just docker run -v /path/to/cassandra.yaml:/etc/cassandra/cassandra.yaml -d cassandra

  2. if you need to deploy it to many machines, then a Dockerfile next to the cassandra.yaml:

    FROM cassandra:3.1
    COPY cassandra.yaml /etc/cassandra/cassandra.yaml
    • then docker build -t custom-cassandra .
    • now docker run -d custom-cassandra (you'll need to tag and push to a docker registry like Docker Hub so that other machines can docker pull it)

@hseeberger
Copy link
Author

Ah, now I understand what you mean with local.
I have actually already created a Docker image based on my PR: https://hub.docker.com/r/hseeberger/cassandra. I might change the approach though to modify the official image by applying the necessary changes.

@tianon
Copy link
Member

tianon commented Oct 3, 2018

I'm sorry, but honestly if we're going to do anything more with environment variables it would likely be in the opposite direction (which we won't do due to the backwards compatibility implications) -- modifying a YAML file via shell script is very fragile, and setting complex configuration in this way is not great. For custom configuration, the only/best recommendation is to provide an appropriate cassandra.yaml file to your running instance (via a new image with FROM / COPY in a short Dockerfile, via Docker Configs, via bind mount, etc).

Closing in favor of #160 + docker-library/docs#1317.

@tianon tianon closed this Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants