LenaSYS-dockerenv

Log | Files | Refs | README | LICENSE

Dockerfile (1494B)


      1 FROM php:8.0-apache
      2 
      3 # Update package list and install system dependencies required for PHP extensions
      4 RUN apt-get update && \
      5     apt-get install -y \
      6     libaio1 \
      7     git \
      8     libsqlite3-dev \
      9     libcurl4-openssl-dev \
     10     && docker-php-ext-install pdo_mysql pdo_sqlite curl \
     11     && rm -rf /var/lib/apt/lists/*
     12 
     13 # Increase PHP upload size
     14 RUN { \
     15         echo 'upload_max_filesize=128M'; \
     16         echo 'post_max_size=128M'; \
     17     } > /usr/local/etc/php/conf.d/uploads.ini
     18 
     19 # Enable Apache Directory Listing
     20 RUN a2enmod autoindex
     21 RUN echo '<Directory /var/www/html>' > /etc/apache2/conf-available/custom-directory-listing.conf \
     22     && echo '    Options Indexes FollowSymLinks' >> /etc/apache2/conf-available/custom-directory-listing.conf \
     23     && echo '    AllowOverride None' >> /etc/apache2/conf-available/custom-directory-listing.conf \
     24     && echo '    Require all granted' >> /etc/apache2/conf-available/custom-directory-listing.conf \
     25     && echo '</Directory>' >> /etc/apache2/conf-available/custom-directory-listing.conf \
     26     && a2enconf custom-directory-listing
     27 
     28 RUN mkdir -p /var/www/temp && \
     29     chown www-data:www-data /var/www/temp && \
     30     git clone https://github.com/HGustavs/LenaSYS.git /var/www/temp
     31 
     32 # Copy the initialization script
     33 COPY init.sh /usr/local/bin/init.sh
     34 
     35 # Make sure the script is executable
     36 RUN chmod +x /usr/local/bin/init.sh
     37 
     38 # Set the script as the entrypoint
     39 ENTRYPOINT [ "/usr/local/bin/init.sh" ]
     40 
     41 # Default command
     42 CMD [ "apache2-foreground" ]