From df684d76bd8ab688521897162c85e3821fb6fe87 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 25 Aug 2014 12:26:04 +1000 Subject: [PATCH] FIX: add anacron to ensure jobs run if restarting containers a lot --- image/base/Dockerfile | 5 +++-- image/base/anacron | 4 ++++ image/discourse/Dockerfile | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100755 image/base/anacron diff --git a/image/base/Dockerfile b/image/base/Dockerfile index c5d8bb6..e8d3f79 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -2,7 +2,7 @@ # When new LTS ships we can upgrade # NAME: discourse_base -# VERSION: 1.0.1 +# VERSION: 1.0.2 FROM ubuntu:14.04 @@ -30,7 +30,7 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ pngcrush imagemagick \ postgresql-9.3 postgresql-client-9.3 \ postgresql-contrib-9.3 libpq-dev libreadline-dev \ - nginx language-pack-en sudo cron \ + nginx language-pack-en sudo cron anacron \ psmisc rsyslog vim &&\ sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf &&\ dpkg-divert --local --rename --add /sbin/initctl &&\ @@ -71,4 +71,5 @@ ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids ADD runit-2 /etc/runit/2 ADD cron /etc/service/cron/run +ADD anacron /etc/service/anacron/run ADD rsyslog /etc/service/rsyslog/run diff --git a/image/base/anacron b/image/base/anacron new file mode 100755 index 0000000..d924aca --- /dev/null +++ b/image/base/anacron @@ -0,0 +1,4 @@ +#!/bin/bash +exec 2>&1 +cd / +exec anacron -d diff --git a/image/discourse/Dockerfile b/image/discourse/Dockerfile index 2f2434e..5d13cfa 100644 --- a/image/discourse/Dockerfile +++ b/image/discourse/Dockerfile @@ -1,5 +1,5 @@ -# Current version 1.0.1 -FROM samsaffron/discourse_base:1.0.1 +# Current version 1.0.2 +FROM samsaffron/discourse_base:1.0.2 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" -- 2.25.1