Dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM php:7.4-apache-buster
  2. LABEL Maintainer="kerstin Sieren <kerstin@sieren.biz>" \
  3. Description="Lightweight container with Apache & PHP-FPM based on Debian Buster."
  4. RUN apt-get update && \
  5. apt-get upgrade -y && \
  6. apt-get install -y --no-install-recommends \
  7. wget git \
  8. # Configure PHP
  9. libxml2-dev libfreetype6-dev \
  10. libjpeg62-turbo-dev \
  11. libmcrypt-dev \
  12. libpng-dev \
  13. libpq-dev \
  14. libzip-dev \
  15. zlib1g-dev \
  16. # Install required 3rd party tools
  17. graphicsmagick && \
  18. # Configure extensions
  19. docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype && \
  20. docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl pgsql pdo_pgsql && \
  21. 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 && \
  22. # Configure Apache as needed
  23. a2enmod rewrite && \
  24. apt-get clean && \
  25. apt-get -y purge \
  26. libxml2-dev libfreetype6-dev \
  27. libjpeg62-turbo-dev \
  28. libmcrypt-dev \
  29. libpng-dev \
  30. libzip-dev \
  31. zlib1g-dev && \
  32. rm -rf /var/lib/apt/lists/* /usr/src/* \
  33. COPY --from=composer /usr/bin/composer /usr/bin/composer
  34. # Switch to use a non-root user from here on
  35. #USER nobody
  36. # Add application
  37. WORKDIR /var/www/html
  38. # Expose the port apache is reachable on
  39. EXPOSE 80