From ac776e1c469ed5c2b6e83a41c8f54f6b858cd3d9 Mon Sep 17 00:00:00 2001 From: Vish0007 Date: Tue, 25 Aug 2015 10:58:04 +0530 Subject: [PATCH 1/4] Create docker-entrypoint.sh --- chronos/bin/docker-entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 chronos/bin/docker-entrypoint.sh 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] +"$@" From 1652bee53faaab05d78751adc55a9af5574b2fe8 Mon Sep 17 00:00:00 2001 From: Vish0007 Date: Tue, 25 Aug 2015 11:02:09 +0530 Subject: [PATCH 2/4] Update chronos-template --- chronos/chronos-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chronos/chronos-template b/chronos/chronos-template index 69d1e47..85ad4ed 100644 --- a/chronos/chronos-template +++ b/chronos/chronos-template @@ -1,7 +1,7 @@ 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 From aa961e72aea0965be2c9a1aa4a1440b5ef81047a Mon Sep 17 00:00:00 2001 From: Vish0007 Date: Tue, 25 Aug 2015 11:06:58 +0530 Subject: [PATCH 3/4] Update chronos-template --- chronos/chronos-template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chronos/chronos-template b/chronos/chronos-template index 85ad4ed..8629854 100644 --- a/chronos/chronos-template +++ b/chronos/chronos-template @@ -7,4 +7,8 @@ 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"] From d6b63ae003ec2af4e2b0b08fdb7a9e92361e9c38 Mon Sep 17 00:00:00 2001 From: Vish0007 Date: Tue, 25 Aug 2015 11:11:06 +0530 Subject: [PATCH 4/4] Update README.md --- chronos/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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" +```