|
@@ -3,7 +3,7 @@ FROM php:5.6-apache
|
3
|
3
|
RUN apt-get -y update && apt-get upgrade -y
|
4
|
4
|
|
5
|
5
|
# Install tools && libraries
|
6
|
|
-RUN apt-get -y install --fix-missing apt-utils nano wget dialog \
|
|
6
|
+RUN apt-get -y install --fix-missing apt-utils nano wget dialog cron \
|
7
|
7
|
build-essential git curl libcurl3 libcurl3-dev zip \
|
8
|
8
|
libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client \
|
9
|
9
|
zlib1g-dev libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
|
|
@@ -32,6 +32,22 @@ RUN docker-php-ext-install curl \
|
32
|
32
|
# Enable apache modules
|
33
|
33
|
RUN a2enmod rewrite headers
|
34
|
34
|
|
|
35
|
+# Copy hello-cron file to the cron.d directory
|
|
36
|
+#COPY hello-cron /etc/cron.d/hello-cron
|
|
37
|
+
|
|
38
|
+# Give execution rights on the cron job
|
|
39
|
+#RUN chmod 0644 /etc/cron.d/hello-cron
|
|
40
|
+
|
|
41
|
+# Apply cron job
|
|
42
|
+#RUN crontab /etc/cron.d/hello-cron
|
|
43
|
+
|
|
44
|
+# Create the log file to be able to run tail
|
|
45
|
+RUN touch /var/log/cron.log
|
|
46
|
+
|
|
47
|
+# Run the command on container startup
|
|
48
|
+CMD cron && tail -f /var/log/cron.log
|
|
49
|
+
|
|
50
|
+
|
35
|
51
|
EXPOSE 80
|
36
|
52
|
|
37
|
53
|
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
|