ldc-web-images-docker/PHP7.3/DEV/Dockerfile

75 lines
2.6 KiB
Text
Raw Normal View History

2023-03-24 15:59:30 +01:00
FROM php:7.3-apache
2025-07-18 09:43:38 +02:00
ENV DEBIAN_FRONTEND=noninteractive
2023-03-24 15:59:30 +01:00
2025-07-18 09:43:38 +02:00
# Install system dependencies and PHP extensions
RUN apt-get update -qq && \
apt-get install -qy --no-install-recommends \
nano vim \
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev \
zlib1g-dev libicu-dev g++ \
libxslt-dev \
libzip-dev unzip zip \
libmagick++-dev libmagickwand-dev \
libmemcached-dev \
ldap-utils libldap2-dev \
locales \
git zsh \
ca-certificates curl gnupg \
mariadb-client && \
echo "fr_FR.UTF-8 UTF-8" > /etc/locale.gen && \
2023-03-24 15:59:30 +01:00
locale-gen fr_FR.UTF-8 && \
dpkg-reconfigure locales && \
2025-07-18 09:43:38 +02:00
/usr/sbin/update-locale LANG=fr_FR.UTF-8 && \
docker-php-ext-configure gd \
--with-gd \
--with-webp-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-xpm-dir \
--with-freetype-dir && \
docker-php-ext-configure intl && \
docker-php-ext-configure zip --with-libzip && \
docker-php-ext-configure ldap && \
docker-php-ext-install -j$(nproc) exif gd gettext intl mysqli pdo_mysql xsl opcache zip bcmath ldap && \
pecl install imagick-3.6.0 xdebug-3.1.5 pcov && \
docker-php-ext-enable imagick xdebug pcov && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2023-03-24 15:59:30 +01:00
2025-07-18 09:43:38 +02:00
# Set locale environment variables
ENV LC_ALL=fr_FR.UTF-8
ENV LANG=fr_FR.UTF-8
ENV LANGUAGE=fr_FR.UTF-8:fr
2023-03-24 15:59:30 +01:00
2025-07-18 09:43:38 +02:00
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2023-03-24 15:59:30 +01:00
2025-07-18 09:43:38 +02:00
# Install Node.js 18.x
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y --no-install-recommends nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/*
2023-03-24 15:59:30 +01:00
2025-07-18 09:43:38 +02:00
# Setup Oh-My-Zsh and plugins
RUN sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
sed -i 's/plugins=(git)/plugins=(git laravel zsh-autosuggestions)/g' ~/.zshrc
2023-03-24 15:59:30 +01:00
ENV SHELL=/bin/zsh
2025-07-18 09:43:38 +02:00
# Set default shell to zsh
2023-03-24 15:59:30 +01:00
RUN chsh -s /bin/zsh
2025-07-18 09:43:38 +02:00
# Copy configuration files
2023-03-24 15:59:30 +01:00
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/conf.d/app.ini
COPY conf/vhost.conf /etc/apache2/sites-available/000-default.conf
2025-07-18 09:43:38 +02:00
# Enable Apache modules and configuration
2023-03-24 15:59:30 +01:00
RUN a2enmod rewrite remoteip headers http2 && \
a2enconf z-app
2025-07-18 09:43:38 +02:00
WORKDIR /app/srcs