forked from jordancjones/artisan-cron
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
40 lines (32 loc) · 898 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
30
31
32
33
34
35
36
37
38
39
40
FROM debian:jessie
MAINTAINER "Daniel McCoy" <[email protected]>
WORKDIR /tmp
RUN apt-get update -y && \
apt-get install -y \
cron \
pdftk \
php5-cli \
php5-mcrypt \
php5-mssql \
php5-mysqlnd \
php5-pgsql \
php5-redis \
php5-mongo \
php5-sqlite \
php5-dev make php-pear \
php5-gd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#pecl install mongodb && \
#echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
RUN mkdir -p /var/www
VOLUME ["/var/www"]
WORKDIR /var/www
# Add crontab file in the cron directory
ADD crontab /etc/cron.d/hello-cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/hello-cron
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Run the command on container startup
CMD cron && tail -f /var/log/cron.log