forked from gameswithwords/cron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (21 loc) · 775 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:latest
MAINTAINER Robert Wilkinson
LABEL Name=games-with-words-cron Version=0.0.1
RUN apt-get update
RUN apt-get install nano
RUN apt-get -qq update
RUN apt-get install -y nodejs cron python2.7
# TODO could uninstall some build dependencies
RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
ADD cron.sh /usr/bin/cron.sh
RUN chmod +x /usr/bin/cron.sh
ADD ./crontab /etc/cron.d/cron-jobs
ADD ./scripts /scripts/
ADD ./package.json /scripts/package.json
RUN chmod 0644 /etc/cron.d/cron-jobs
RUN chmod 0644 /scripts/*
RUN chmod +x /scripts/*
RUN cd /scripts && npm install --production -s
RUN touch /var/log/cron.log
ENTRYPOINT ["/bin/sh", "/usr/bin/cron.sh"]