]> BookStack Code Mirror - bookstack/blob - dev/docker/Dockerfile
Merge pull request #5625 from BookStackApp/avif_images
[bookstack] / dev / docker / Dockerfile
1 FROM php:8.3-apache
2
3 # Install additional dependencies
4 RUN apt-get update && \
5     apt-get install -y \
6         git \
7         zip \
8         unzip \
9         libfreetype-dev \
10         libjpeg62-turbo-dev \
11         libldap2-dev \
12         libpng-dev \
13         libzip-dev \
14         wait-for-it && \
15     rm -rf /var/lib/apt/lists/*
16
17 # Install PHP extensions
18 RUN docker-php-ext-configure ldap --with-libdir="lib/$(gcc -dumpmachine)" && \
19     docker-php-ext-configure gd --with-freetype --with-jpeg && \
20     docker-php-ext-install -j$(nproc) pdo_mysql gd ldap zip && \
21     pecl install xdebug && \
22     docker-php-ext-enable xdebug
23
24 # Install composer
25 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
26
27 # Configure apache
28 RUN a2enmod rewrite && \
29     sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
30     sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
31
32 # Use the default production configuration and update it as required
33 RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
34     sed -i 's/memory_limit = 128M/memory_limit = 512M/g' "$PHP_INI_DIR/php.ini"
35
36 ENV APACHE_DOCUMENT_ROOT="/app/public"
37
38 WORKDIR /app
Morty Proxy This is a proxified and sanitized view of the page, visit original site.