diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..945f085 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:9.2 + +# Install dependencies +RUN apt-get update -y +RUN apt-get install -y git curl ffmpeg wget +RUN apt-get install -y apache2 php php-cli php-mysql php-sqlite3 php-xml php-gd php-curl php-mbstring + +ADD start.sh /root/start.sh + +RUN chmod +x /root/start.sh + +RUN rm -rf /var/www/* + +# Configure apache +RUN a2enmod rewrite +RUN chown -R www-data:www-data /var/www +ENV APACHE_RUN_USER www-data +ENV APACHE_RUN_GROUP www-data +ENV APACHE_LOG_DIR /tmp +ENV APACHE_RUN_DIR /var/run/apache2 +ENV APACHE_PID_FILE /tmp/apache.pid + +EXPOSE 80 + +RUN echo 1 +RUN git clone https://git.un-hack-bar.de/UNHB/dfi-html.git /var/www/html + +CMD ["/root/start.sh"] + diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..ea2740e --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/bin/bash +mkdir /var/www/ +mkdir /var/www/config +mkdir /var/www/htdocs +mkdir /var/www/logs + +apachectl -D FOREGROUND