Skip to content

Commit 038a81c

Browse files
author
Markus Blaschke
committed
Merge branch 'devel'
2 parents 8293e40 + 766b2b3 commit 038a81c

File tree

9 files changed

+57
-25
lines changed

9 files changed

+57
-25
lines changed

docker/httpd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM httpd:2.4
22

33
ENV DEBIAN_FRONTEND noninteractive
44

5-
ADD conf/vhost.conf /usr/local/apache2/conf/docker-vhost.conf
5+
ADD conf/vhost.conf /usr/local/apache2/conf/.docker-vhost.conf.original
66
ADD entrypoint.sh /entrypoint.sh
77

88
ENTRYPOINT ["/entrypoint.sh"]

docker/httpd/conf/vhost.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LoadModule proxy_module modules/mod_proxy.so
66
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
77

88
<FilesMatch \.php$>
9-
SetHandler "proxy:fcgi://<FPM_HOST>:<FPM_PORT>"
9+
SetHandler "proxy:fcgi://fpm:<FPM_PORT>"
1010
</FilesMatch>
1111

1212
SetEnv TYPO3_CONTEXT <TYPO3_CONTEXT>

docker/httpd/entrypoint.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
#!/bin/bash
22

3+
###################
4+
# httpd.conf
5+
###################
6+
7+
# Backup original
8+
if [ ! -f "/usr/local/apache2/conf/.httpd.conf.original" ]; then
9+
cp /usr/local/apache2/conf/httpd.conf /usr/local/apache2/conf/.httpd.conf.original
10+
fi
11+
12+
cp /usr/local/apache2/conf/.httpd.conf.original /usr/local/apache2/conf/httpd.conf
313

414
echo "
515
Include conf/docker-vhost.conf
616
" >> /usr/local/apache2/conf/httpd.conf
717

18+
19+
###################
20+
# docker-vhost.conf
21+
###################
22+
23+
cp /usr/local/apache2/conf/.docker-vhost.conf.original /usr/local/apache2/conf/docker-vhost.conf
824
/bin/sed -i "s@<TYPO3_CONTEXT>@${TYPO3_CONTEXT}@" /usr/local/apache2/conf/docker-vhost.conf
925
/bin/sed -i "s@<FPM_HOST>@${FPM_PORT_9000_TCP_ADDR}@" /usr/local/apache2/conf/docker-vhost.conf
1026
/bin/sed -i "s@<FPM_PORT>@${FPM_PORT_9000_TCP_PORT}@" /usr/local/apache2/conf/docker-vhost.conf

docker/nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM dockerfile/nginx
22

3-
ADD conf/vhost.conf /etc/nginx/sites-enabled/default
3+
ADD conf/vhost.conf /etc/nginx/sites-available/default.tpl
44
ADD entrypoint.sh /entrypoint.sh
55

66
ENTRYPOINT ["/entrypoint.sh"]

docker/nginx/conf/vhost.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ server {
1919
}
2020

2121
location ~* \.php$ {
22-
fastcgi_pass <FPM_HOST>:<FPM_PORT>;
22+
fastcgi_pass fpm:<FPM_PORT>;
2323
include fastcgi.conf;
2424
include fastcgi_params;
2525
fastcgi_param TYPO3_CONTEXT "<TYPO3_CONTEXT>";

docker/nginx/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
cp /etc/nginx/sites-available/default.tpl /etc/nginx/sites-enabled/default
34
/bin/sed -i "s@<TYPO3_CONTEXT>@${TYPO3_CONTEXT}@" /etc/nginx/sites-enabled/default
45
/bin/sed -i "s@<FPM_HOST>@${FPM_PORT_9000_TCP_ADDR}@" /etc/nginx/sites-enabled/default
56
/bin/sed -i "s@<FPM_PORT>@${FPM_PORT_9000_TCP_PORT}@" /etc/nginx/sites-enabled/default

docker/php-fpm/Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
FROM php:5.6-fpm
1+
FROM ubuntu:14.04
22

33
ENV DEBIAN_FRONTEND noninteractive
44

5-
# Install modules
6-
RUN apt-get update && apt-get install -y \
7-
libfreetype6-dev \
8-
libjpeg62-turbo-dev \
9-
libmcrypt-dev \
10-
libpng12-dev \
5+
RUN apt-get update
6+
7+
RUN apt-get install -y \
8+
php5-cli \
9+
php5-fpm \
1110
php5-json \
1211
php5-intl \
1312
php5-curl \
@@ -20,18 +19,18 @@ RUN apt-get update && apt-get install -y \
2019
php5-xmlrpc \
2120
php5-xsl \
2221
php5-geoip \
23-
php5-ldap \
22+
php5-ldap
23+
24+
RUN apt-get install -y \
2425
graphicsmagick \
2526
zip \
2627
unzip \
27-
&& docker-php-ext-install iconv mcrypt \
28-
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
29-
&& docker-php-ext-install gd
28+
curl
3029

3130
ADD entrypoint.sh /entrypoint.sh
3231

3332
EXPOSE 9000
3433

35-
WORKDIR /var/www/html
34+
WORKDIR /var/www
3635

37-
ENTRYPOINT ["/entrypoint.sh"]
36+
ENTRYPOINT ["/entrypoint.sh"]

docker/php-fpm/entrypoint.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/bin/bash
22

3+
# Backup original
4+
if [ ! -f "/usr/local/etc/.php-fpm.conf.default.original" ]; then
5+
cp /etc/php5/fpm/pool.d/www.conf /etc/php5/fpm/pool.d/.www.original
6+
fi
7+
8+
# Restore original
9+
cp /etc/php5/fpm/pool.d/.www.original /etc/php5/fpm/pool.d/www.conf
10+
sed -i "s@listen = /var/run/php5-fpm.sock@listen = 9000@" /etc/php5/fpm/pool.d/www.conf
11+
12+
# Manipulate php-fpm configuration
313
echo "
414
env[TYPO3_CONTEXT] = ${TYPO3_CONTEXT}
515
@@ -16,6 +26,6 @@ php_value[max_input_time] = 300
1626
php_admin_value[post_max_size] = 50M
1727
php_admin_value[upload_max_filesize] = 50M
1828
19-
" >> /usr/local/etc/php-fpm.conf.default
29+
" >> /etc/php5/fpm/pool.d/www.conf
2030

21-
exec php-fpm --nodaemonize
31+
exec /usr/sbin/php5-fpm --nodaemonize

docker/typo3/Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
FROM php:5.6-fpm
1+
FROM ubuntu:14.04
22

33
ENV DEBIAN_FRONTEND noninteractive
44

5-
RUN apt-get update && apt-get install -y \
6-
git \
7-
curl \
5+
RUN apt-get update
6+
7+
RUN apt-get install -y \
8+
php5-cli \
9+
php5-fpm \
810
php5-json \
911
php5-intl \
1012
php5-curl \
@@ -17,9 +19,13 @@ RUN apt-get update && apt-get install -y \
1719
php5-xmlrpc \
1820
php5-xsl \
1921
php5-geoip \
20-
php5-ldap \
22+
php5-ldap
23+
24+
RUN apt-get install -y \
2125
graphicsmagick \
22-
mysql-client
26+
zip \
27+
unzip \
28+
curl
2329

2430
RUN curl -sS https://getcomposer.org/installer | php
2531
RUN mv composer.phar /usr/local/bin/composer

0 commit comments

Comments
 (0)