From ce6fd4b78ca18939905ba14907eedefe777c165f Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Wed, 23 Aug 2023 09:23:17 -0700 Subject: [PATCH] added dockerfile --- Dockerfile | 45 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 50 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0697cf6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,45 @@ +######################################################################################################################################## +# Documentation: https://git.nickyeoman.com/4lt/phpcontainer/wiki +######################################################################################################################################## +FROM php:8.2.9-apache +LABEL maintainer="4 Lights Consulting " +LABEL description="Production-ready PHP Apache container" +LABEL version="1" +LABEL org.label-schema.vcs-url="https://git.nickyeoman.com/4lt/phpcontainer" + +# Setup +WORKDIR /website +ENV APACHE_DOCUMENT_ROOT /website/public/ + +# APT +RUN apt-get update + +# IMAP +RUN apt-get install -y libc-client-dev libkrb5-dev libssl-dev; +RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl +RUN docker-php-ext-install imap + +# Symfony +RUN apt-get install -y libicu-dev +RUN docker-php-ext-configure intl +RUN docker-php-ext-install intl + +# Cleanup +RUN rm -r /var/lib/apt/lists/* + +# Apache settings + +RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf +RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf + +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf + +RUN a2enmod expires headers rewrite socache_shmcb ssl + +RUN docker-php-ext-install mysqli pdo pdo_mysql +RUN docker-php-ext-install opcache + +# Docker config + +EXPOSE 80 +CMD ["apache2-foreground"] diff --git a/README.md b/README.md index e69de29..8d66426 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,5 @@ +# 4 Lights Consulting + +The apache php docker container that we use for production. + +Documentation: https://git.nickyeoman.com/4lt/phpcontainer/wiki \ No newline at end of file