Skip to content

Commit

Permalink
Add TYPO3 9 and migrate all images to Debian Stretch
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Jul 6, 2018
1 parent cd44482 commit af72dce
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 47 deletions.
15 changes: 5 additions & 10 deletions 6.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
FROM php:5.6-apache
FROM php:5.6-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list.d/stretch.list && \
echo "Package: *\\nPin: release n=jessie\\nPin-Priority: 900\\n\\nPackage: libpcre3*\\nPin: release n=stretch\\nPin-Priority: 1000" > /etc/apt/preferences && \
apt-get update && \
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
# Configure PHP
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev \
# Install required 3rd party tools
graphicsmagick && \
# Fix outdated PCRE bug in Debian 8
apt-get install -y -t stretch libpcre3 libpcre3-dev && \

# 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 && \
Expand All @@ -29,7 +24,7 @@ RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
15 changes: 5 additions & 10 deletions 7.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
FROM php:5.6-apache
FROM php:5.6-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list.d/stretch.list && \
echo "Package: *\\nPin: release n=jessie\\nPin-Priority: 900\\n\\nPackage: libpcre3*\\nPin: release n=stretch\\nPin-Priority: 1000" > /etc/apt/preferences && \
apt-get update && \
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
# Configure PHP
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev \
# Install required 3rd party tools
graphicsmagick && \
# Fix outdated PCRE bug in Debian 8
apt-get install -y -t stretch libpcre3 libpcre3-dev && \

# 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 && \
Expand All @@ -29,7 +24,7 @@ RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
4 changes: 2 additions & 2 deletions 8.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.2-apache
FROM php:7.2-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
Expand All @@ -24,7 +24,7 @@ RUN apt-get update && \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
4 changes: 2 additions & 2 deletions 9.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.2-apache
FROM php:7.2-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
Expand All @@ -24,7 +24,7 @@ RUN apt-get update && \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
4 changes: 2 additions & 2 deletions 9.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.2-apache
FROM php:7.2-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
Expand All @@ -24,7 +24,7 @@ RUN apt-get update && \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
17 changes: 6 additions & 11 deletions Dockerfile6-7.in → 9.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
FROM php:PHPVER-apache
FROM php:7.2-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list.d/stretch.list && \
echo "Package: *\\nPin: release n=jessie\\nPin-Priority: 900\\n\\nPackage: libpcre3*\\nPin: release n=stretch\\nPin-Priority: 1000" > /etc/apt/preferences && \
apt-get update && \
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
# Configure PHP
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev \
# Install required 3rd party tools
graphicsmagick && \
# Fix outdated PCRE bug in Debian 8
apt-get install -y -t stretch libpcre3 libpcre3-dev && \

# 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 && \
Expand All @@ -29,12 +24,12 @@ RUN echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-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 - && \
wget -O - https://get.typo3.org/9.3 | tar -xzf - && \
ln -s typo3_src-* typo3_src && \
ln -s typo3_src/index.php && \
ln -s typo3_src/typo3 && \
Expand Down
31 changes: 31 additions & 0 deletions 9.3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: "3"
services:
typo3:
build: .
ports:
- "80:80"
volumes:
- fileadmin:/var/www/html/fileadmin
- typo3conf:/var/www/html/typo3conf
- uploads:/var/www/html/uploads
networks:
- backend
database:
image: mysql:5.7
command:
- --character-set-server=utf8
- --collation-server=utf8_unicode_ci
environment:
- "MYSQL_USER=${MYSQL_USER:-typo3}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}"
- "MYSQL_DATABASE=${MYSQL_DATABASE:-typo3}"
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
networks:
- backend
volumes:
database:
fileadmin:
typo3conf:
uploads:
networks:
backend:
4 changes: 2 additions & 2 deletions Dockerfile8-9.in → Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:PHPVER-apache
FROM php:PHPVER-apache-stretch
LABEL maintainer="Martin Helmich <typo3@martin-helmich.de>"

# Install TYPO3
Expand All @@ -24,7 +24,7 @@ RUN apt-get update && \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libpng-dev \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/* /usr/src/*

Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
TYPOVER=6.2 7.6 8.7 9.1 9.2
TYPOVER=6.2 7.6 8.7 9.1 9.2 9.3
DOCKERFILES=$(foreach subdir, $(TYPOVER), $(subdir)/Dockerfile)
DEPENDS=Dockerfile6-7.in Makefile
DEPENDS=Dockerfile.in Makefile

all: $(DOCKERFILES)

6.2/Dockerfile: Dockerfile6-7.in
6.2/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/6.2/' $< > $@

7.6/Dockerfile: Dockerfile6-7.in
7.6/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/7.6/' $< > $@

8.7/Dockerfile: Dockerfile8-9.in
8.7/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/8.7/' $< > $@

9.1/Dockerfile: Dockerfile8-9.in
9.1/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/9.1/' $< > $@

9.2/Dockerfile: Dockerfile8-9.in
9.2/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/9.2/' $< > $@


9.3/Dockerfile: Dockerfile.in
sed -e 's/PHPVER/7.2/' -e 's/TYPOVER/9.3/' $< > $@

0 comments on commit af72dce

Please sign in to comment.