我正在尝试在 docker 容器中运行 kairodDB,这是我的 dockerfile
FROM centos:latest
MAINTAINER http://www.centos.org
LABEL Vendor="CentOS"
RUN mkdir /usr/java
RUN yum -y install wget
RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz -O /usr/java/jdk-8u51-linux-x64.tar.gz
RUN tar -zxvf /usr/java/jdk-8u51-linux-x64.tar.gz -c /usr/java/jdk-8u51-linux-x64
RUN alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_51/bin/java 1
RUN wget --no-check-certificate https://github.com/kairosdb/kairosdb/releases/download/v1.1.3/kairosdb-1.1.3-1.rpm
RUN yum -y install kairosdb-1.1.3-1.rpm
ENV JAVA_HOME=/usr/java/jdk1.8.0_51
# Comment out H2 Module set for kairosdb.datastore
RUN sed -i '/H2Module/s/^/#/' /opt/kairosdb/conf/kairosdb.properties
# Uncomment Cassandra Module for kairosdb.datastore
RUN sed -i '/org.kairosdb.datastore.cassandra.CassandraModule/s/^#//g' /opt/kairosdb/conf/kairosdb.properties
# Add Roundrobin connection to cassandra host
RUN sed -i '/^#kairosdb.datastore.cassandra.hector.loadBalancingPolicy*/c\kairosdb.datastore.cassandra.hector.loadBalancingPolicy=roundRobin' /opt/kairosdb/conf/kairosdb.properties
# Add startup script
ADD start-kairosdb.sh /opt/kairosdb/bin/start-kairosdb.sh
# Run kairosdb in foreground on boot
ENTRYPOINT ["/bin/bash", "/opt/kairosdb/bin/start-kairosdb.sh"]
并且包含 start-kairosdb.sh 是
#!/bin/bash
<some config changes>
/opt/kairosdb/bin/kairosdb.sh run
但是当我启动容器时docker run -d kairosdb
它不会作为服务运行,容器会立即存在。
有人知道这里有什么问题吗?