Added fox-start.d and fixed rootfs

This commit is contained in:
Pavel@Vostro5468 2022-01-05 18:36:36 +03:00
parent b601bd365f
commit fefca2b6e9
10 changed files with 26 additions and 12 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
/images
/.git

View File

@ -1,10 +1,10 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV php_version=7.4
COPY ["timezone", "localtime", "/etc/"]
COPY ["/rootfs/etc/timezone", "/rootfs/etc/localtime", "/etc/"]
RUN apt update -y \
RUN apt-get update -y \
&& apt-get install gnupg gnupg1 gnupg2 software-properties-common -y \
&& apt-add-repository ppa:ondrej/php \
&& apt-get update -y \
@ -31,9 +31,8 @@ RUN apt update -y \
&& rm -rf /var/www/html/* \
&& a2enmod rewrite
COPY docker-entrypoint.sh /
COPY 000-default.conf /etc/apache2/sites-available
WORKDIR /var/www/hmtl
COPY rootfs /
WORKDIR /var/www/html
EXPOSE 80
CMD ["/docker-entrypoint.sh"]

View File

@ -1,4 +0,0 @@
#!/bin/sh
service cron start
bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"

View File

@ -1 +1 @@
100050
100056

7
rootfs/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
find /etc/fox-start.d -maxdepth 1 -type f -exec {} \;
echo "Starting cron:"
service cron start
echo "Starting apache:"
bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"

View File

@ -0,0 +1,7 @@
#!/bin/sh
echo -n "Touching cron..."
touch /etc/crontab
find /etc/cron.d -maxdepth 1 -type f -exec bash -c "touch '{}'" \;
echo "OK"

View File

@ -0,0 +1,3 @@
<?php
?>