first code release: apache with two different base images
This commit is contained in:
parent
2ce3c378f1
commit
07b0a9f5c1
14
webserver/Dockerfile
Normal file
14
webserver/Dockerfile
Normal file
@ -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"]
|
12
webserver/Dockerfile.fedora
Normal file
12
webserver/Dockerfile.fedora
Normal file
@ -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"]
|
10
webserver/index.html
Normal file
10
webserver/index.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>
|
||||||
|
This is a test index page
|
||||||
|
</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>This is an Apache2 running on a debian 12-slim container</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
webserver/index.html.fedora
Normal file
10
webserver/index.html.fedora
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>
|
||||||
|
This is a test index page
|
||||||
|
</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>This is an Apache2 instance running on a Fedora 38 container</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user