docker-library / cassandra

Docker Official Image packaging for Cassandra
Apache License 2.0
262 stars 281 forks source link

3.11 image CAN modify some port by envs Update docker-entrypoint.sh #214

Closed binbinshi closed 3 years ago

binbinshi commented 4 years ago

Add storage_port ssl_storage_port native_transport_port authenticator and JMX_PORT can modify in envs ;

for example modify cql port : $ docker run --name some-cassandra -d -e CASSANDRA_BROADCAST_ADDRESS=10.42.42.42 -e CASSANDRA_NATIVE_TRANSPORT_PORT=19042 -p 7000:7000 cassandra:tag

tianon commented 4 years ago

Duplicate of #122:

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).

See also https://github.com/docker-library/docs/pull/1317

binbinshi commented 3 years ago

You are right, but there are often port conflicts when we deploy c* with other services. so I hope some ports can be modified. I sincerely hope that the community can consider the above