From 0e9c25e13d8b9e497535c0f535ba539bd531b2f8 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Sat, 10 Mar 2018 13:47:24 +0100 Subject: [PATCH 1/2] Add Dockerfile for TYPO3 9.1 --- 9.1/Dockerfile | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 9.1/Dockerfile diff --git a/9.1/Dockerfile b/9.1/Dockerfile new file mode 100644 index 0000000..65ba7f6 --- /dev/null +++ b/9.1/Dockerfile @@ -0,0 +1,48 @@ +FROM php:7.2-apache +LABEL maintainer="Martin Helmich " + +# Install TYPO3 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + wget \ +# Configure PHP + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng-dev \ + zlib1g-dev \ +# Install required 3rd party tools + graphicsmagick && \ +# Configure extensions + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl && \ + 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 && \ +# Configure Apache as needed + a2enmod rewrite && \ + apt-get clean && \ + apt-get -y purge \ + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng12-dev \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* /usr/src/* + +RUN cd /var/www/html && \ + wget -O - https://get.typo3.org/9.1 | tar -xzf - && \ + ln -s typo3_src-* typo3_src && \ + ln -s typo3_src/index.php && \ + ln -s typo3_src/typo3 && \ + ln -s typo3_src/_.htaccess .htaccess && \ + mkdir typo3temp && \ + mkdir typo3conf && \ + mkdir fileadmin && \ + mkdir uploads && \ + touch FIRST_INSTALL && \ + chown -R www-data. . + +# Configure volumes +VOLUME /var/www/html/fileadmin +VOLUME /var/www/html/typo3conf +VOLUME /var/www/html/typo3temp +VOLUME /var/www/html/uploads From b7414e968c30414b69c9629a8d17ce62cd777812 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Sat, 10 Mar 2018 13:48:18 +0100 Subject: [PATCH 2/2] Adjust makefiles --- 8.7/Dockerfile | 2 +- Dockerfile.in => Dockerfile6-7.in | 0 Dockerfile8-9.in | 48 +++++++++++++++++++++++++++++++ Makefile | 14 ++++++--- 4 files changed, 59 insertions(+), 5 deletions(-) rename Dockerfile.in => Dockerfile6-7.in (100%) create mode 100644 Dockerfile8-9.in diff --git a/8.7/Dockerfile b/8.7/Dockerfile index 6bafbc6..bc82e13 100644 --- a/8.7/Dockerfile +++ b/8.7/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && \ graphicsmagick && \ # Configure extensions docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ - docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache && \ + docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl && \ 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 && \ # Configure Apache as needed a2enmod rewrite && \ diff --git a/Dockerfile.in b/Dockerfile6-7.in similarity index 100% rename from Dockerfile.in rename to Dockerfile6-7.in diff --git a/Dockerfile8-9.in b/Dockerfile8-9.in new file mode 100644 index 0000000..2bdb880 --- /dev/null +++ b/Dockerfile8-9.in @@ -0,0 +1,48 @@ +FROM php:PHPVER-apache +LABEL maintainer="Martin Helmich " + +# Install TYPO3 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + wget \ +# Configure PHP + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng-dev \ + zlib1g-dev \ +# Install required 3rd party tools + graphicsmagick && \ +# Configure extensions + docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ + docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl && \ + 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 && \ +# Configure Apache as needed + a2enmod rewrite && \ + apt-get clean && \ + apt-get -y purge \ + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng12-dev \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* /usr/src/* + +RUN cd /var/www/html && \ + wget -O - https://get.typo3.org/TYPOVER | tar -xzf - && \ + ln -s typo3_src-* typo3_src && \ + ln -s typo3_src/index.php && \ + ln -s typo3_src/typo3 && \ + ln -s typo3_src/_.htaccess .htaccess && \ + mkdir typo3temp && \ + mkdir typo3conf && \ + mkdir fileadmin && \ + mkdir uploads && \ + touch FIRST_INSTALL && \ + chown -R www-data. . + +# Configure volumes +VOLUME /var/www/html/fileadmin +VOLUME /var/www/html/typo3conf +VOLUME /var/www/html/typo3temp +VOLUME /var/www/html/uploads diff --git a/Makefile b/Makefile index 365e6b1..4cc5a8e 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ -TYPOVER=6.2 7.6 8.7 +TYPOVER=6.2 7.6 8.7 9.1 DOCKERFILES=$(foreach subdir, $(TYPOVER), $(subdir)/Dockerfile) -DEPENDS=Dockerfile.in Makefile +DEPENDS=Dockerfile6-7.in Makefile all: $(DOCKERFILES) -6.2/Dockerfile: $(DEPENDS) +6.2/Dockerfile: Dockerfile6-7.in sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/6.2/' $< > $@ -7.6/Dockerfile: $(DEPENDS) +7.6/Dockerfile: Dockerfile6-7.in sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/7.6/' $< > $@ +8.7/Dockerfile: Dockerfile8-9.in + sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/8.7/' $< > $@ + +9.1/Dockerfile: Dockerfile8-9.in + sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/9.1/' $< > $@ +