From 374397622b35182dc2f2d4f20ae609ee1250cd81 Mon Sep 17 00:00:00 2001 From: R0GGER Date: Wed, 6 Apr 2016 14:32:17 +0200 Subject: [PATCH] timezone, cron --- Dockerfile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b63e090..ac8f871 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,24 +2,31 @@ FROM phusion/baseimage:0.9.18 MAINTAINER R0GGER RUN apt-get update -RUN apt-get install -y unzip md5deep wget xmlstarlet cabextract genisoimage nano +RUN apt-get install -y unzip md5deep wget xmlstarlet cabextract genisoimage tzdata python python-pip mercurial ENV SYSTEMS="all-62 all-63 all-100" ENV OFFICE="o2k10 o2k13 o2k16" ENV LANGUAGE="nld enu" ENV PARAMS="/dotnet /msse /wddefs /wle" +ENV CRON="* 12,0 * * *" +ENV TIMEZONE="Europe/Amsterdam" -ADD crons.conf /app/crons.conf -ADD run.sh /app/run.sh +# WSUSOFFLINE ADD update.sh /etc/my_init.d/update.sh - -RUN crontab /app/crons.conf -RUN cron - -RUN chmod +x /app/run.sh RUN chmod +x /etc/my_init.d/update.sh RUN ln -s /app/wsusoffline/client /client RUN ln -s /app/wsusoffline/iso /iso -VOLUME ["/client"] -CMD ["/sbin/my_init"] +# CRON +RUN pip install -e hg+https://bitbucket.org/dbenamy/devcron#egg=devcron +RUN mkdir /cron +ADD run.sh /cron/run.sh +RUN echo "${CRON} /bin/sh /cron/run.sh" > /cron/crontab +RUN chmod a+x /cron/run.sh + +# SET TIMEZONE +RUN echo "${TIMEZONE}" > /etc/timezone +RUN dpkg-reconfigure -f noninteractive tzdata + +VOLUME ["/client", "/iso"] +CMD ["/sbin/my_init", "devcron.py", "/cron/crontab"]