You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.8 KiB

  1. # Docker image for TYPO3 CMS
  2. # Copyright (C) 2016-2020 Martin Helmich <martin@helmich.me>
  3. # and contributors <https://github.com/martin-helmich/docker-typo3/graphs/contributors>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. FROM b-eit/php:7.4-apache-buster
  18. LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"
  19. # Install TYPO3
  20. RUN apt-get update && \
  21. apt-get upgrade -y && \
  22. apt-get install -y --no-install-recommends \
  23. wget \
  24. # Configure PHP
  25. libxml2-dev libfreetype6-dev \
  26. libjpeg62-turbo-dev \
  27. libmcrypt-dev \
  28. libpng-dev \
  29. libpq-dev \
  30. libzip-dev \
  31. zlib1g-dev \
  32. # Install required 3rd party tools
  33. graphicsmagick && \
  34. # Configure extensions
  35. docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype && \
  36. docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl pgsql pdo_pgsql && \
  37. echo 'always_populate_raw_post_data = -1\nmax_execution_time = 240\nmax_input_vars = 1500\nupload_max_filesize = 32M\npost_max_size = 32M' > /usr/local/etc/php/conf.d/typo3.ini && \
  38. # Configure Apache as needed
  39. a2enmod rewrite && \
  40. apt-get clean && \
  41. apt-get -y purge \
  42. libxml2-dev libfreetype6-dev \
  43. libjpeg62-turbo-dev \
  44. libmcrypt-dev \
  45. libpng-dev \
  46. libzip-dev \
  47. zlib1g-dev && \
  48. rm -rf /var/lib/apt/lists/* /usr/src/*
  49. RUN cd /var/www/html && \
  50. wget -O download.tar.gz https://get.typo3.org/10.4.21 && \
  51. echo "bfd691eecc88908b2937ae793d658029c45f36d490c16626fee06440c2ae6d5d download.tar.gz" > download.tar.gz.sum && \
  52. sha256sum -c download.tar.gz.sum && \
  53. tar -xzf download.tar.gz && \
  54. rm download.* && \
  55. ln -s typo3_src-* typo3_src && \
  56. ln -s typo3_src/index.php && \
  57. ln -s typo3_src/typo3 && \
  58. cp typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess .htaccess && \
  59. mkdir typo3temp && \
  60. mkdir typo3conf && \
  61. mkdir fileadmin && \
  62. mkdir uploads && \
  63. touch FIRST_INSTALL && \
  64. chown -R www-data. .
  65. # Configure volumes
  66. VOLUME /var/www/html/fileadmin
  67. VOLUME /var/www/html/typo3conf
  68. VOLUME /var/www/html/typo3temp
  69. VOLUME /var/www/html/uploads