Blame Dockerfile

1a125b5
FROM registry.fedoraproject.org/f28/s2i-core:latest
04789a8
04789a8
# Cassandra image for Fedora.
04789a8
#
04789a8
# Volumes:
04789a8
#  * /var/lib/cassandra/data - Datastore for Cassandra
04789a8
# Environment:
04789a8
1a125b5
ENV CASSANDRA_VERSION=3.11 \
1a125b5
    NAME=cassandra \
1a125b5
    VERSION=0 \
1a125b5
    RELEASE=2 \
1a125b5
    ARCH=x86_64 \
1a125b5
    SUMMARY="Cassandra is an OpenSource database for high-scale application" \
1a125b5
    DESCRIPTION="Cassandra is a partitioned row store. Rows are organized \
1a125b5
into tables with a required primary key. Partitioning means that Cassandra can \
1a125b5
distribute your data across multiple machines in an application-transparent \
1a125b5
matter. Cassandra will automatically re-partition as machines are \
1a125b5
added/removed from the cluster. Row store means that like relational \
1a125b5
databases, Cassandra organizes data by rows and columns. The Cassandra Query \
1a125b5
Language (CQL) is a close relative of SQL." \
1a125b5
    # Set paths to avoid hard-coding them in scripts.
1a125b5
    HOME=/var/lib/cassandra \
1a125b5
    CASSANDRA_CONF_DIR=/etc/cassandra/ \
1a125b5
    CONTAINER_SCRIPTS_BASE=/usr/share/container-scripts \
1a125b5
    CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/cassandra
04789a8
04789a8
LABEL summary="$SUMMARY" \
04789a8
      description="$DESCRIPTION" \
1a125b5
      io.k8s.description="$SUMMARY" \
1a125b5
      io.k8s.display-name="Cassandra $CASSANDRA_VERSION" \
1a125b5
      io.openshift.expose-services="7199:cassandra,9042:cql" \
1a125b5
      io.openshift.tags="database,cassandra,cassandra3" \
04789a8
      name="$FGC/$NAME" \
04789a8
      version=0 \
1a125b5
      com.redhat.component="$NAME" \
04789a8
      usage="docker run cassandra" \
1a125b5
      help="help.1" \
1a125b5
      maintainer="SoftwareCollections.org <sclorg@redhat.com>"
04789a8
04789a8
# 7000: intra-node communication
04789a8
# 7001: TLS intra-node communication
04789a8
# 7199: JMX
04789a8
# 9042: CQL
04789a8
EXPOSE 7000 7001 7199 9042
04789a8
1a125b5
RUN INSTALL_PKGS="cassandra-server cassandra hostname" && \
04789a8
    dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
04789a8
    rpm -V $INSTALL_PKGS && \
04789a8
    dnf clean all
04789a8
04789a8
ADD root /
04789a8
1a125b5
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
1a125b5
1a125b5
RUN chown -R cassandra $HOME $CONTAINER_SCRIPTS_BASE&& \
1a125b5
    /usr/libexec/fix-permissions $HOME $CONTAINER_SCRIPTS_BASE $CASSANDRA_CONF_DIR /var/log/cassandra && \
1a125b5
    rpm-file-permissions
1a125b5
1a125b5
VOLUME ["$HOME"]
04789a8
04789a8
USER 143
04789a8
04789a8
ENTRYPOINT ["container-entrypoint"]
04789a8
CMD ["run-cassandra"]