diff --git a/chronos/README.md b/chronos/README.md index a66bf2d..0a64d04 100644 --- a/chronos/README.md +++ b/chronos/README.md @@ -10,4 +10,8 @@ Build the docker container for a specific chronos, mesos: Example: ``` ./mk.sh 2.3.0-0.1.20141121000021 0.21.0-1.0.ubuntu1404 -``` \ No newline at end of file +``` +Check chronos logs: +```` +docker exec /bin/bash -c "tailf /var/log/messages" +``` diff --git a/chronos/bin/docker-entrypoint.sh b/chronos/bin/docker-entrypoint.sh new file mode 100644 index 0000000..fd95b2a --- /dev/null +++ b/chronos/bin/docker-entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash +#start syslog daemon to enable chronos logging +#syslogd is already installed in the chronos image +syslogd +#start chronos +#this is coming from CMD[] in docker file [overwritten while running the chronos image] +"$@" diff --git a/chronos/chronos-template b/chronos/chronos-template index 69d1e47..8629854 100644 --- a/chronos/chronos-template +++ b/chronos/chronos-template @@ -1,10 +1,14 @@ FROM mesosphere/mesos:MESOS_VERSION MAINTAINER Mesosphere -RUN apt-get update && apt-get -y install chronos=CHRONOS_VERSION curl +RUN apt-get update && apt-get -y install chronos=CHRONOS_VERSION curl syslogd RUN rm -rf /etc/mesos RUN rm -rf /etc/chronos/conf EXPOSE 4400 +COPY bin/docker-entrypoint.sh / + +ENTRYPOINT ["/docker-entrypoint.sh"] + CMD ["/usr/bin/chronos", "run_jar", "--http_port", "4400", "--zk_hosts", "localhost:2181", "--master", "zk://localhost:2181"]