diff --git a/webserver/Dockerfile b/webserver/Dockerfile new file mode 100644 index 0000000..5ce2548 --- /dev/null +++ b/webserver/Dockerfile @@ -0,0 +1,14 @@ +FROM debian:12-slim +RUN apt update +RUN apt install apache2 -y +COPY index.html /var/www/html +EXPOSE 80 +RUN mkdir -p /var/run/apache2 &&\ + chown www-data:www-data /var/run/apache2 +ENV APACHE_RUN_DIR /var/run/apache2 +ENV APACHE_PID_FILE /var/run/apache2.pid +ENV APACHE_RUN_USER www-data +ENV APACHE_RUN_GROUP www-data +ENV APACHE_LOG_DIR /var/log/apache2 +ENV APACHE_SERVER_NAME localhost +CMD ["/usr/sbin/apache2ctl", "-DFOREGROUND"] \ No newline at end of file diff --git a/webserver/Dockerfile.fedora b/webserver/Dockerfile.fedora new file mode 100644 index 0000000..a2bfa4e --- /dev/null +++ b/webserver/Dockerfile.fedora @@ -0,0 +1,12 @@ +FROM fedora:38 +RUN dnf install httpd -y +COPY index.html.fedora /var/www/html/index.html +RUN mkdir -p /var/run/httpd &&\ + chown apache:apache /var/run/httpd +ENV APACHE_RUN_DIR /var/run/httpd +ENV APACHE_PID_FILE /var/run/httpd.pid +ENV APACHE_RUN_USER apache +ENV APACHE_RUN_GROUP apache +ENV APACHE_LOG_DIR /var/log/httpd +ENV APACHE_SERVER_NAME localhost +CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"] \ No newline at end of file diff --git a/webserver/index.html b/webserver/index.html new file mode 100644 index 0000000..4319acf --- /dev/null +++ b/webserver/index.html @@ -0,0 +1,10 @@ + + + + This is a test index page + + + +

This is an Apache2 running on a debian 12-slim container

+ + \ No newline at end of file diff --git a/webserver/index.html.fedora b/webserver/index.html.fedora new file mode 100644 index 0000000..736f51c --- /dev/null +++ b/webserver/index.html.fedora @@ -0,0 +1,10 @@ + + + + This is a test index page + + + +

This is an Apache2 instance running on a Fedora 38 container

+ + \ No newline at end of file