docker-library / cassandra

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

Only replace the configuration file if it has been modified #228

Closed tianon closed 3 years ago

tianon commented 3 years ago

This allows us to run as a non-root user again without any extra permissions on the configuration file.

I've validated this via docker run -it --rm -e MAX_HEAP_SIZE='128m' -e HEAP_NEWSIZE='32m' --user 1024:1024 cassandra (which fails with the existing images).

Closes #227

tianon commented 3 years ago

Welp, that's a cascading failure if I've ever seen one. :joy:

tianon commented 3 years ago

Ahhhh, I've got the condition backwards, and we do try to modify the file every time. This needs more thought.