2025-01-04 15:09:54 +01:00
|
|
|
FROM alpine:3.18
|
2025-01-03 15:44:10 +01:00
|
|
|
|
2025-01-04 15:09:54 +01:00
|
|
|
RUN apk update && apk upgrade
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
sed \
|
|
|
|
vim \
|
|
|
|
ca-certificates \
|
|
|
|
openldap-clients \
|
|
|
|
wget \
|
|
|
|
npm \
|
|
|
|
git \
|
|
|
|
curl \
|
|
|
|
unzip \
|
|
|
|
zip \
|
|
|
|
openssl \
|
|
|
|
mariadb-client \
|
|
|
|
supervisor
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
apache2 \
|
|
|
|
apache2-proxy \
|
|
|
|
apache2-ssl
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
php82 \
|
|
|
|
php82-cli \
|
|
|
|
php82-apache2 \
|
|
|
|
php82-gd \
|
|
|
|
php82-zip \
|
|
|
|
php82-xml \
|
|
|
|
php82-ctype \
|
|
|
|
php82-simplexml \
|
|
|
|
php82-tokenizer \
|
|
|
|
php82-sodium \
|
|
|
|
php82-dom \
|
|
|
|
php82-pdo \
|
|
|
|
php82-pdo_pgsql \
|
|
|
|
php82-pdo_mysql \
|
|
|
|
php82-curl \
|
|
|
|
php82-ldap \
|
|
|
|
php82-pecl-igbinary \
|
|
|
|
php82-session \
|
|
|
|
php82-pecl-redis \
|
|
|
|
php82-fileinfo \
|
|
|
|
php82-xmlwriter \
|
|
|
|
php82-openssl \
|
|
|
|
php82-phar \
|
|
|
|
php82-iconv \
|
|
|
|
php82-mbstring \
|
|
|
|
php82-fpm \
|
|
|
|
php82-sockets \
|
|
|
|
php82-opcache \
|
|
|
|
php82-intl \
|
|
|
|
php82-bcmath \
|
|
|
|
php82-pecl-ssh2
|
|
|
|
|
|
|
|
RUN ln -s /usr/bin/php82 /usr/bin/php
|
|
|
|
|
|
|
|
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
|
|
|
|
|
|
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
|
|
|
|
|
|
|
RUN npm install -g n
|
|
|
|
RUN npm install -g yarn
|
|
|
|
|
|
|
|
# Configurer les permissions pour Apache et PHP
|
|
|
|
RUN mkdir -p /etc/supervisor.d && \
|
|
|
|
mkdir -p /app/public && \
|
|
|
|
mkdir -p /etc/apache2/conf.d/nine && \
|
|
|
|
mkdir -p /var/log/apache2 && \
|
|
|
|
mkdir -p /run/apache2 && \
|
|
|
|
chown -R apache:apache /var/log/apache2 /etc/apache2 /app /run/apache2
|
|
|
|
|
|
|
|
# Copier les fichiers de configuration
|
|
|
|
COPY ./misc/docker/php.local.ini /etc/php82/conf.d/
|
|
|
|
COPY ./misc/docker/httpd.conf /etc/apache2/httpd.conf
|
|
|
|
COPY ./misc/docker/site.conf /etc/apache2/conf.d/nine/site.conf
|
|
|
|
COPY ./misc/docker/ssl.conf /etc/apache2/conf.d/ssl.conf
|
|
|
|
COPY ./misc/docker/index.php /app/public/index.php
|
2025-01-03 15:44:10 +01:00
|
|
|
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/nine/site.conf
|
|
|
|
|
2025-01-04 15:09:54 +01:00
|
|
|
# Commande de démarrage
|
|
|
|
USER apache
|
|
|
|
|
2025-01-03 15:44:10 +01:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Installation des dépendances composer
|
|
|
|
RUN composer install --no-interaction
|
|
|
|
|
2025-01-04 15:09:54 +01:00
|
|
|
CMD httpd -DFOREGROUND
|