added dockerfile
This commit is contained in:
parent
cc30cd1d5b
commit
ce6fd4b78c
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
########################################################################################################################################
|
||||||
|
# Documentation: https://git.nickyeoman.com/4lt/phpcontainer/wiki
|
||||||
|
########################################################################################################################################
|
||||||
|
FROM php:8.2.9-apache
|
||||||
|
LABEL maintainer="4 Lights Consulting <info@4lt.ca>"
|
||||||
|
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"]
|
Loading…
Reference in New Issue
Block a user