-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_Dockerfile
46 lines (41 loc) · 1.55 KB
/
php_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
41
42
43
44
45
46
# The source image to start with
FROM alpine:3.20.3
# Your contact info
MAINTAINER wiggal ;[email protected]
# Setzen der Umgebungsvariablen für die deutsche Sprache
ENV CONTAINER_TIMEZONE="Europe/Berlin" \
LANG=de_DE.UTF-8 \
LANGUAGE=de_DE:de \
LC_ALL=de_DE.UTF-8
COPY GEN24_Ladesteuerung-main/ /home/GEN24
RUN apk add --update-cache \
php \
php-json \
php-sqlite3 \
tzdata \
python3 \
py-pip \
bash \
file \
py3-numpy \
py3-tz \
py3-requests \
py3-pandas \
py3-numpy \
py3-scikit-learn \
&& rm -rf /var/cache/apk/* \
&& cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
&& sed -i 's/^Einfacher_PHP_Webserver.*/Einfacher_PHP_Webserver = 1/' /home/GEN24/CONFIG/default.ini \
&& echo "# DO NOT EDIT THIS FILE - edit the master and reinstall." >>/var/tmp/www-data \
&& echo "#1-56/10 * * * * /home/GEN24/start_PythonScript.sh http_SymoGen24Controller2.py schreiben" >>/var/tmp/www-data \
&& echo "#33 5,8,10,12,14,19 * * * /home/GEN24/start_PythonScript.sh WeatherDataProvider2.py" >>/var/tmp/www-data \
&& echo "### /home/GEN24/Crontab.log abräumen" >>/var/tmp/www-data \
&& echo "#0 0 * * 1 mv /home/GEN24/Crontab.log /home/GEN24/Crontab.log_weg" >>/var/tmp/www-data \
&& chmod +x /home/GEN24/start_* \
&& >> /home/GEN24/Crontab.log \
&& touch /var/log/cron.log
# Alle Befehle die Nach dem Imagestart ausgeführt werden müssen
CMD /home/GEN24/start_PythonScript.sh /home/GEN24/WeatherDataProvider2.py && \
crontab /var/tmp/www-data && \
/usr/sbin/crond -f -d 0 && \
tail -f /var/log/cron.log