-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (22 loc) · 812 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
FROM php:7.4-apache
RUN apt-get update && \
apt-get -y install tzdata cron libcurl4-openssl-dev python3-pip
RUN pip3 install PyP100
RUN docker-php-ext-install curl sockets
RUN cp /usr/share/zoneinfo/Europe/Vienna /etc/localtime && \
echo "Europe/Vienna" > /etc/timezone
#RUN apt-get -y remove tzdata
RUN rm -rf /var/cache/apk/*
# Copy cron file to the cron.d directory
COPY cron /etc/cron.d/cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/cron
# Apply cron job
RUN crontab /etc/cron.d/cron
# Create the log file to be able to run tail
RUN mkdir -p /var/log/cron
COPY devices.ini /etc/
RUN rm -rf /var/www/html/*
COPY www /var/www/html
# Add a command to base-image entrypont scritp
RUN sed -i 's/^exec /service cron start\n\nexec /' /usr/local/bin/apache2-foreground