Ajouter dockerfile

This commit is contained in:
2025-05-15 19:24:17 +00:00
parent 5cb32932c5
commit 7033b21c88

52
dockerfile Normal file
View File

@@ -0,0 +1,52 @@
FROM debian:12
ENV DEBIAN_FRONTEND=noninteractive
# Installation des dépendances nécessaires
RUN apt-get update && apt-get install -y \
apache2 \
mariadb-client \
php \
php-cli \
php-mysql \
php-curl \
php-gd \
php-json \
php-xml \
php-zip \
php-mbstring \
php-bcmath \
php-gmp \
php-intl \
git \
curl \
unzip \
nano \
cron \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Configuration du répertoire de travail
WORKDIR /var/www/html
# Clonage du dépôt Hubzilla
RUN git clone https://framagit.org/hubzilla/core.git . && \
mkdir -p store/[data]/smarty3 && \
chown -R www-data:www-data /var/www/html
# Activation des modules Apache nécessaires
RUN a2enmod rewrite ssl
# Configuration de PHP
RUN echo "upload_max_filesize = 20M" >> /etc/php/8.2/apache2/php.ini && \
echo "post_max_size = 20M" >> /etc/php/8.2/apache2/php.ini && \
echo "register_argc_argv = On" >> /etc/php/8.2/apache2/php.ini
# Configuration du site Apache
COPY src/hubzilla.conf /etc/apache2/sites-available/hubzilla.conf
RUN a2dissite 000-default.conf && a2ensite hubzilla.conf
# Copie du script de démarrage
COPY src/start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/bin/bash", "/start.sh"]