FROM registry.fedoraproject.org/fedora:rawhide # Cassandra image for Fedora. # # Volumes: # * /var/lib/cassandra/data - Datastore for Cassandra # Environment: LABEL MAINTAINER "Tomas Repik" ENV NAME=cassandra \ VERSION=0 \ RELEASE=2 \ ARCH=x86_64 \ SUMMARY="Cassandra is an OpenSource database for high-scale application" \ DESCRIPTION="Cassandra is a partitioned row store. Rows are organized \ into tables with a required primary key. Partitioning means that Cassandra can \ distribute your data across multiple machines in an application-transparent \ matter. Cassandra will automatically re-partition as machines are \ added/removed from the cluster. Row store means that like relational \ databases, Cassandra organizes data by rows and columns. The Cassandra Query \ Language (CQL) is a close relative of SQL." LABEL summary="$SUMMARY" \ description="$DESCRIPTION" \ com.redhat.component="$NAME" \ name="$FGC/$NAME" \ version=0 \ release="$RELEASE.$DISTTAG" \ architecture="$ARCH" \ usage="docker run cassandra" \ help="help.1" LABEL io.k8s.description="$SUMMARY" \ io.k8s.display-name="Cassandra 3.9" \ io.openshift.expose-services="7199:cassandra" \ io.openshift.tags="database,cassandra,cassandra39" ENV CASSANDRA_VERSION=3.9 \ # Set paths to avoid hard-coding them in scripts. HOME=/var/lib/cassandra \ CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/cassandra # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX # 9042: CQL EXPOSE 7000 7001 7199 9042 RUN INSTALL_PKGS="cassandra-server cassandra" && \ dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ dnf clean all VOLUME ["/var/lib/cassandra"] ADD root / # Container setup # RUN chown cassandra:0 /etc/cassandra/cassandra.yaml && \ # chown -R cassandra.0 /var/lib/cassandra/ && \ # Loosen permission bits to avoid problems running container with arbitrary UID # chmod -R g+rwx /var/lib/cassandra #sed -ri 's/# JVM_OPTS="\$JVM_OPTS -Djava.rmi.server.hostname=/JVM_OPTS="\$JVM_OPTS -Djava.rmi.server.hostname=172.17.0.2/' /usr/share/cassandra/cassandra-env.sh && \ #sed -ri 's/LOCAL_JMX=yes/LOCAL_JMX=no/' /usr/share/cassandra/cassandra-env.sh USER 143 ENTRYPOINT ["container-entrypoint"] CMD ["run-cassandra"]