Skip to content

Commit

Permalink
Consolidated Dockerfiles into central Dockerfile.in
Browse files Browse the repository at this point in the history
Deployment for each Typo3 version by make
This way only 1 file has to be edited on changes to the dockerfiles
  • Loading branch information
svenihoney committed Mar 24, 2017
1 parent 6df6411 commit 7abf8db
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Dockerfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM php:PHPVER-apache
MAINTAINER Martin Helmich <typo3@martin-helmich.de>

# Install TYPO3
RUN apt-get update &&\
apt-get install -y wget
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 PHP
RUN apt-get install -y \
libxml2-dev libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
zlib1g-dev
RUN 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
RUN 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

# Install required 3rd party tools
RUN apt-get install -y graphicsmagick

# Configure Apache as needed
RUN a2enmod rewrite

# Configure volumes
VOLUME /var/www/html/fileadmin
VOLUME /var/www/html/typo3conf
VOLUME /var/www/html/typo3temp
VOLUME /var/www/html/uploads
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
TYPOVER=6.2 7.6 8.0
DOCKERFILES=$(foreach subdir, $(TYPOVER), $(subdir)/Dockerfile)
DEPENDS=Dockerfile.in Makefile

all: $(DOCKERFILES)

6.2/Dockerfile: $(DEPENDS)
sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/6.2/' $< > $@

7.6/Dockerfile: $(DEPENDS)
sed -e 's/PHPVER/5.6/' -e 's/TYPOVER/7.6/' $< > $@

8.0/Dockerfile: $(DEPENDS)
sed -e 's/PHPVER/7/' -e 's/TYPOVER/8/' $< > $@

0 comments on commit 7abf8db

Please sign in to comment.