mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Adjust permissions so that Cassandra can run without root access
This allows both non root access as well as running with —user=<random id>
This commit is contained in:
parent
1367076d2e
commit
f114460204
@ -15,8 +15,17 @@ RUN apt-get update
|
|||||||
RUN apt-get -qq -y install procps cassandra
|
RUN apt-get -qq -y install procps cassandra
|
||||||
|
|
||||||
COPY cassandra.yaml /etc/cassandra/cassandra.yaml
|
COPY cassandra.yaml /etc/cassandra/cassandra.yaml
|
||||||
|
COPY logback.xml /etc/cassandra/logback.xml
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
COPY kubernetes-cassandra.jar /kubernetes-cassandra.jar
|
COPY kubernetes-cassandra.jar /kubernetes-cassandra.jar
|
||||||
RUN chmod a+x /run.sh
|
|
||||||
|
RUN chmod a+x /run.sh && \
|
||||||
|
mkdir -p /cassandra_data/data && \
|
||||||
|
chown -R cassandra.cassandra /etc/cassandra /cassandra_data && \
|
||||||
|
chmod o+w -R /etc/cassandra /cassandra_data
|
||||||
|
|
||||||
|
VOLUME ["/cassandra_data/data"]
|
||||||
|
|
||||||
|
USER cassandra
|
||||||
|
|
||||||
CMD /run.sh
|
CMD /run.sh
|
||||||
|
@ -215,7 +215,7 @@ counter_cache_save_period: 7200
|
|||||||
|
|
||||||
# saved caches
|
# saved caches
|
||||||
# If not set, the default directory is $CASSANDRA_HOME/data/saved_caches.
|
# If not set, the default directory is $CASSANDRA_HOME/data/saved_caches.
|
||||||
saved_caches_directory: /var/lib/cassandra/saved_caches
|
saved_caches_directory: /cassandra_data/saved_caches
|
||||||
|
|
||||||
# commitlog_sync may be either "periodic" or "batch."
|
# commitlog_sync may be either "periodic" or "batch."
|
||||||
# When in batch mode, Cassandra won't ack writes until the commit log
|
# When in batch mode, Cassandra won't ack writes until the commit log
|
||||||
|
13
examples/cassandra/image/logback.xml
Normal file
13
examples/cassandra/image/logback.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration scan="true">
|
||||||
|
<jmxConfigurator/>
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%-5level %date{HH:mm:ss,SSS} %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
</root>
|
||||||
|
<logger name="com.thinkaurelius.thrift" level="ERROR"/>
|
||||||
|
</configuration>
|
Loading…
Reference in New Issue
Block a user