docker-projects/webserver/Dockerfile

14 lines
443 B
Docker
Raw Normal View History

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"]