Dockerfile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. FROM php:8.3-apache
  2. ARG COMPOSER_HASH
  3. # Configure php
  4. COPY /docker/typo3/conf/memory.ini /usr/local/etc/php/conf.d/
  5. COPY /docker/typo3/conf/apc.ini /usr/local/etc/php/conf.d/
  6. COPY /docker/typo3/conf/xdebug.ini /usr/local/etc/php/conf.d/
  7. # Configure apache
  8. COPY /docker/typo3/conf/typo3.conf /etc/apache2/sites-available/
  9. # Set workdir
  10. WORKDIR /var/www/typo3
  11. RUN \
  12. # Install utilities and php extensions
  13. apt-get clean && apt-get update && apt-get install -y locales; \
  14. pecl install apcu-5.1.17 && pecl install apcu_bc && pecl install imagick-3.4.3RC2; \
  15. apt-get install -y --no-install-recommends zip unzip git nano wget less \
  16. libxml2-dev libpq-dev libzip-dev zlib1g-dev libonig-dev \
  17. libfreetype6-dev libpng-dev libjpeg-dev libicu-dev libwebp-dev \
  18. libjpeg62-turbo-dev libxpm-dev graphicsmagick; \
  19. docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype; \
  20. docker-php-ext-configure intl; \
  21. docker-php-ext-install opcache intl pdo_mysql exif mbstring mysqli gd zip soap; \
  22. docker-php-ext-enable opcache; \
  23. # Install and enable xdebug
  24. pecl install xdebug-3.3.2; \
  25. docker-php-ext-enable xdebug; \
  26. # Set locale
  27. echo 'fr_FR.UTF-8 UTF-8' > /etc/locale.gen; \
  28. locale-gen; \
  29. # Configure apache
  30. a2enmod alias authz_core autoindex deflate expires filter headers rewrite setenvif; \
  31. rm /etc/apache2/sites-available/000-default.conf && rm /etc/apache2/sites-available/default-ssl.conf; \
  32. a2ensite typo3; \
  33. service apache2 restart;
  34. # Set environment variables
  35. ENV LANG fr_FR.UTF-8
  36. ENV LANGUAGE fr_FR:fr
  37. ENV LC_ALL fr_FR.UTF-8
  38. # CLI shortcut
  39. COPY /docker/typo3/conf/cli /var/www/typo3/
  40. # Declare the entrypoint.sh file
  41. COPY ./docker/typo3/entrypoint.sh /entrypoint.sh
  42. RUN chmod +x /entrypoint.sh
  43. ENTRYPOINT ["/entrypoint.sh"]