github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/cassandra/image/Dockerfile (about)

     1  # Copyright 2017 The Kubernetes Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  FROM k8s.gcr.io/debian-base-amd64:0.3
    16  
    17  ARG BUILD_DATE
    18  ARG VCS_REF
    19  ARG CASSANDRA_VERSION
    20  ARG DEV_CONTAINER
    21  
    22  LABEL \
    23      org.label-schema.build-date=$BUILD_DATE \
    24      org.label-schema.docker.dockerfile="/Dockerfile" \
    25      org.label-schema.license="Apache License 2.0" \
    26      org.label-schema.name="k8s-for-greeks/docker-cassandra-k8s" \
    27      org.label-schema.url="https://github.com/k8s-for-greeks/" \
    28      org.label-schema.vcs-ref=$VCS_REF \
    29      org.label-schema.vcs-type="Git" \
    30      org.label-schema.vcs-url="https://github.com/k8s-for-greeks/docker-cassandra-k8s"
    31  
    32  ENV CASSANDRA_HOME=/usr/local/apache-cassandra-${CASSANDRA_VERSION} \
    33      CASSANDRA_CONF=/etc/cassandra \
    34      CASSANDRA_DATA=/cassandra_data \
    35      CASSANDRA_LOGS=/var/log/cassandra \
    36      JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
    37      PATH=${PATH}:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/local/apache-cassandra-${CASSANDRA_VERSION}/bin
    38  
    39  ADD files /
    40  
    41  RUN clean-install bash \
    42      && /build.sh \
    43      && rm /build.sh
    44  
    45  VOLUME ["/$CASSANDRA_DATA"]
    46  
    47  # 7000: intra-node communication
    48  # 7001: TLS intra-node communication
    49  # 7199: JMX
    50  # 9042: CQL
    51  # 9160: thrift service
    52  EXPOSE 7000 7001 7199 9042 9160
    53  
    54  CMD ["/usr/bin/dumb-init", "/bin/bash", "/run.sh"]