Browse Source

correction cron et apache

correction cron et apache
pascal.pp 3 years ago
parent
commit
9e1d979588
1 changed files with 10 additions and 16 deletions
  1. 10
    16
      bin/webserver/Dockerfile

+ 10
- 16
bin/webserver/Dockerfile View File

@@ -4,7 +4,16 @@ RUN apt-get -y update --fix-missing
4 4
 RUN apt-get upgrade -y
5 5
 
6 6
 # Install useful tools
7
-RUN apt-get -y install apt-utils nano wget dialog cron
7
+RUN apt-get -y install apt-utils nano wget dialog
8
+
9
+# Install useful cron
10
+RUN apt-get -y install cron
11
+
12
+# Create the log file to be able to run tail
13
+RUN touch /var/log/cron.log
14
+
15
+# Run the command on container startup
16
+CMD cron && tail -f /var/log/cron.log
8 17
 
9 18
 # Install important libraries
10 19
 RUN apt-get -y install --fix-missing apt-utils build-essential git curl libcurl3 libcurl3-dev zip openssl
@@ -48,18 +57,3 @@ RUN docker-php-ext-install -j$(nproc) gd
48 57
 
49 58
 # Enable apache modules
50 59
 RUN a2enmod rewrite headers
51
-
52
-# Copy hello-cron file to the cron.d directory
53
-#COPY hello-cron /etc/cron.d/hello-cron
54
-
55
-# Give execution rights on the cron job
56
-#RUN chmod 0644 /etc/cron.d/hello-cron
57
-
58
-# Apply cron job
59
-#RUN crontab /etc/cron.d/hello-cron
60
-
61
-# Create the log file to be able to run tail
62
-RUN touch /var/log/cron.log
63
-
64
-# Run the command on container startup
65
-CMD cron && tail -f /var/log/cron.log

Loading…
Cancel
Save