81 lines
No EOL
2 KiB
Docker
81 lines
No EOL
2 KiB
Docker
FROM php:8.2-apache-bullseye
|
|
|
|
RUN apt-get update -qq && \
|
|
apt-get install -qy \
|
|
# Common
|
|
nano \
|
|
vim \
|
|
# GD
|
|
libfreetype6-dev \
|
|
libjpeg62-turbo-dev \
|
|
libpng-dev \
|
|
libwebp-dev \
|
|
libxpm-dev \
|
|
# INTL
|
|
zlib1g-dev libicu-dev g++ \
|
|
# XSL
|
|
libxslt-dev \
|
|
# ZIP
|
|
libzip-dev \
|
|
unzip \
|
|
zip \
|
|
# Imagick
|
|
libmagick++-dev \
|
|
libmagickwand-dev \
|
|
# Memcached
|
|
libmemcached-dev \
|
|
# ldap
|
|
ldap-utils libldap2-dev \
|
|
# locales
|
|
locales \
|
|
# libcap
|
|
libcap2-bin
|
|
|
|
# LOCALES
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
RUN echo "fr_FR.UTF-8 UTF-8" > /etc/locale.gen && \
|
|
locale-gen fr_FR.UTF-8 && \
|
|
dpkg-reconfigure locales && \
|
|
/usr/sbin/update-locale LANG=fr_FR.UTF-8
|
|
ENV LC_ALL fr_FR.UTF-8
|
|
ENV LANG fr_FR.UTF-8
|
|
ENV LANGUAGE fr_FR.UTF-8:fr
|
|
# END LOCALES
|
|
|
|
RUN docker-php-ext-configure gd \
|
|
--enable-gd \
|
|
--with-webp \
|
|
--with-jpeg \
|
|
--with-xpm \
|
|
--with-freetype
|
|
|
|
RUN docker-php-ext-configure intl
|
|
RUN docker-php-ext-configure zip --with-zip
|
|
RUN docker-php-ext-configure ldap
|
|
RUN docker-php-ext-install exif gd gettext intl mysqli pdo_mysql xsl opcache zip bcmath ldap
|
|
|
|
RUN pecl install imagick-3.6.0 && docker-php-ext-enable imagick
|
|
RUN pecl install memcached-3.2.0 && docker-php-ext-enable memcached
|
|
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
COPY conf/common-apache.conf /etc/apache2/conf-available/z-app.conf
|
|
COPY conf/common-ports.conf /etc/apache2/ports.conf
|
|
COPY conf/common-security.conf /etc/apache2/conf-enabled/security.conf
|
|
|
|
COPY conf/php.ini /usr/local/etc/php/php.ini
|
|
|
|
COPY conf/vhost.conf /etc/apache2/sites-available/000-default.conf
|
|
|
|
RUN a2enmod rewrite remoteip headers http2 && \
|
|
a2enconf z-app
|
|
|
|
RUN mkdir -p /app/tmp && chmod -R 770 /app/tmp && chown -R www-data:www-data /app
|
|
|
|
#Change access righs to conf, logs, bin from root to www-data
|
|
RUN chown -hR www-data:www-data /var/log/apache2
|
|
#setcap to bind to privileged ports as non-root
|
|
RUN setcap 'cap_net_bind_service=+ep' /usr/sbin/apache2
|
|
|
|
USER www-data
|
|
WORKDIR /app/srcs |