Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added php7.2 and php 7.3 #9

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions 7.1/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get install -y software-properties-common language-pack-en-base language-pack-de git \
&& apt-get install -y software-properties-common language-pack-en-base language-pack-de git unzip \
&& LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& echo "Package: *\nPin: release o=LP-PPA-ondrej-php5\nPin-Priority: 1001" > /etc/apt/preferences.d/ondrej \
&& apt-get install -y php7.1-fpm php7.1-sqlite3 php7.1-pgsql php7.1-mysql php7.1-mcrypt php7.1-mbstring php7.1-intl php7.1-gd php7.1-curl php7.1-xml php7.1-xsl php7.1-xdebug php7.1-zip \
&& apt-get install -y php7.1-fpm php7.1-sqlite3 php7.1-pgsql php7.1-mysql php7.1-mbstring php7.1-intl php7.1-gd php7.1-curl php7.1-xml php7.1-xsl php7.1-xdebug php7.1-zip php7.1-mcrypt \
&& apt-get install -y php-pear \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN phpenmod -v 7.1 -s ALL sqlite3 pgsql mysql mcrypt mbstring intl gd curl xml xsl xdebug zip
RUN phpenmod -v 7.1 -s ALL sqlite3 pgsql mysql mbstring intl gd curl xml xsl xdebug zip mcrypt

# supply but disable xdebug; can be enabled by custom volume-mount ini file
RUN phpdismod -v 7.1 -s ALL xdebug
Expand All @@ -31,6 +31,8 @@ RUN php7.1 -r 'readfile("https://getcomposer.org/installer");' > composer-setup.
&& php7.1 composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php

ENV PATH="/home/mbandion/.nvm/versions/node/v10.12.0/bin:/home/mbandion/.local/bin:/home/mbandion/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/mbandion/.antigen/bundles/zsh-users/zsh-syntax-highlighting:/home/mbandion/.antigen/bundles/zsh-users/zsh-history-substring-search:/home/mbandion/.antigen/bundles/zsh-users/zsh-autosuggestions:/home/mbandion/.antigen/bundles/arzzen/calc.plugin.zsh:~/bin:~/Applications:/root/.composer/vendor/bin"

# install phing
RUN export PHP_PEAR_PHP_BIN=php7.1 \
&& pear channel-discover pear.phing.info \
Expand Down
2 changes: 1 addition & 1 deletion 7.1/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& ln -sf /dev/stderr /var/log/nginx/error.log

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY nginx-site.conf /etc/nginx/sites-enabled/default
COPY nginx-site.conf /etc/nginx/conf.d/default.conf

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
41 changes: 41 additions & 0 deletions 7.2/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Beware: This file is generated by the generate.sh script!
FROM ubuntu:14.04
MAINTAINER 25th-floor GmbH <[email protected]>
EXPOSE 9000

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Europe/Vienna

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get install -y software-properties-common language-pack-en-base language-pack-de git \
&& LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& echo "Package: *\nPin: release o=LP-PPA-ondrej-php5\nPin-Priority: 1001" > /etc/apt/preferences.d/ondrej \
&& apt-get install -y php7.2-fpm php7.2-sqlite3 php7.2-pgsql php7.2-mysql php7.2-mbstring php7.2-intl php7.2-gd php7.2-curl php7.2-xml php7.2-xsl php7.2-xdebug php7.2-zip \
&& apt-get install -y php-pear \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN phpenmod -v 7.2 -s ALL sqlite3 pgsql mysql mcrypt mbstring intl gd curl xml xsl xdebug zip

# supply but disable xdebug; can be enabled by custom volume-mount ini file
RUN phpdismod -v 7.2 -s ALL xdebug

# install composer
RUN php7.2 -r 'readfile("https://getcomposer.org/installer");' > composer-setup.php \
&& php7.2 composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php

# install phing
RUN export PHP_PEAR_PHP_BIN=php7.2 \
&& pear channel-discover pear.phing.info \
&& pear install phing/phing

# Prepare run directory\nRUN mkdir /run/php\n\nWORKDIR /var/www\n\n" >> 7.2/fpm/Dockerfile
COPY php-fpm.conf /etc/php/7.2/fpm/php-fpm.conf
CMD ["php-fpm7.2"]
33 changes: 33 additions & 0 deletions 7.2/fpm/php-fpm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

[global]

error_log = /proc/1/fd/2
daemonize = no

[www]

access.log = /proc/1/fd/1

user = www-data
group = www-data

listen = 9000

pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.max_requests = 500

pm.status_path = /fpm-status
ping.path = /fpm-ping

; Ensure worker stdout and stderr are sent to the main error log.
catch_workers_output = yes

; php settings
php_admin_value[error_log] = /proc/1/fd/2
php_admin_value[upload_max_filesize] = 30M
php_admin_value[post_max_size] = 30M
php_admin_flag[log_errors] = on
24 changes: 24 additions & 0 deletions 7.2/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Beware: This file is generated by the generate.sh script!
FROM 25thfloor/php-fpm:7.2
MAINTAINER 25th-floor GmbH <[email protected]>
EXPOSE 80

ENV TZ=Europe/Vienna

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata \
&& apt-key adv --fetch-keys http://nginx.org/keys/nginx_signing.key \
&& echo "deb http://nginx.org/packages/mainline/ubuntu/ `grep -oP 'DISTRIB_CODENAME=\K.*' /etc/lsb-release` nginx" >> /etc/apt/sources.list.d/nginx.list \
&& cat /etc/apt/sources.list.d/nginx.list \
&& apt-get update \
&& apt-get install -y supervisor nginx \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY nginx-site.conf /etc/nginx/conf.d/default.conf

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
38 changes: 38 additions & 0 deletions 7.2/nginx/nginx-site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
upstream php {
server 127.0.0.1:9000;
}

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

set_real_ip_from 172.0.0.0/8;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

charset utf-8;

root /var/www;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ /index.php?$query_string =404;
}

location ~ \.php$ {
include fastcgi_params;

fastcgi_pass php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 1200;
fastcgi_read_timeout 1200;
fastcgi_buffer_size 1024k;
fastcgi_buffers 4 1024k;
fastcgi_busy_buffers_size 1024k;
fastcgi_temp_file_write_size 1024k;
fastcgi_intercept_errors on;
}
}
25 changes: 25 additions & 0 deletions 7.2/nginx/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[supervisord]
nodaemon=true
loglevel=debug
logfile=/proc/1/fd/1
logfile_maxbytes=0

[program:php-fpm]
command=php-fpm7.2
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/proc/1/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/1/fd/2
stderr_logfile_maxbytes=0

[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/proc/1/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/1/fd/2
stderr_logfile_maxbytes=0
41 changes: 41 additions & 0 deletions 7.3/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Beware: This file is generated by the generate.sh script!
FROM ubuntu:14.04
MAINTAINER 25th-floor GmbH <[email protected]>
EXPOSE 9000

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=Europe/Vienna

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata

RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get install -y software-properties-common language-pack-en-base language-pack-de git unzip \
&& LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php \
&& apt-get update \
&& echo "Package: *\nPin: release o=LP-PPA-ondrej-php5\nPin-Priority: 1001" > /etc/apt/preferences.d/ondrej \
&& apt-get install -y php7.3-fpm php7.3-sqlite3 php7.3-pgsql php7.3-mysql php7.3-mbstring php7.3-intl php7.3-gd php7.3-curl php7.3-xml php7.3-xsl php7.3-xdebug php7.3-zip \
&& apt-get install -y php-pear \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN phpenmod -v 7.3 -s ALL sqlite3 pgsql mysql mbstring intl gd curl xml xsl xdebug zip

# supply but disable xdebug; can be enabled by custom volume-mount ini file
RUN phpdismod -v 7.3 -s ALL xdebug

# install composer
RUN php7.3 -r 'readfile("https://getcomposer.org/installer");' > composer-setup.php \
&& php7.3 composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php

ENV PATH="/home/mbandion/.nvm/versions/node/v10.12.0/bin:/home/mbandion/.local/bin:/home/mbandion/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/mbandion/.antigen/bundles/zsh-users/zsh-syntax-highlighting:/home/mbandion/.antigen/bundles/zsh-users/zsh-history-substring-search:/home/mbandion/.antigen/bundles/zsh-users/zsh-autosuggestions:/home/mbandion/.antigen/bundles/arzzen/calc.plugin.zsh:~/bin:~/Applications:/root/.composer/vendor/bin"

# install phing
RUN composer global require phing/phing

# Prepare run directory\nRUN mkdir /run/php\n\nWORKDIR /var/www\n\n" >> 7.3/fpm/Dockerfile
COPY php-fpm.conf /etc/php/7.3/fpm/php-fpm.conf
CMD ["php-fpm7.3"]
33 changes: 33 additions & 0 deletions 7.3/fpm/php-fpm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

[global]

error_log = /proc/1/fd/2
daemonize = no

[www]

access.log = /proc/1/fd/1

user = www-data
group = www-data

listen = 9000

pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.max_requests = 500

pm.status_path = /fpm-status
ping.path = /fpm-ping

; Ensure worker stdout and stderr are sent to the main error log.
catch_workers_output = yes

; php settings
php_admin_value[error_log] = /proc/1/fd/2
php_admin_value[upload_max_filesize] = 30M
php_admin_value[post_max_size] = 30M
php_admin_flag[log_errors] = on
24 changes: 24 additions & 0 deletions 7.3/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Beware: This file is generated by the generate.sh script!
FROM 25thfloor/php-fpm:7.3
MAINTAINER 25th-floor GmbH <[email protected]>
EXPOSE 80

ENV TZ=Europe/Vienna

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& dpkg-reconfigure -f noninteractive tzdata \
&& apt-key adv --fetch-keys http://nginx.org/keys/nginx_signing.key \
&& echo "deb http://nginx.org/packages/mainline/ubuntu/ `grep -oP 'DISTRIB_CODENAME=\K.*' /etc/lsb-release` nginx" >> /etc/apt/sources.list.d/nginx.list \
&& cat /etc/apt/sources.list.d/nginx.list \
&& apt-get update \
&& apt-get install -y supervisor nginx \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY nginx-site.conf /etc/nginx/conf.d/default.conf

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
38 changes: 38 additions & 0 deletions 7.3/nginx/nginx-site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
upstream php {
server 127.0.0.1:9000;
}

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

set_real_ip_from 172.0.0.0/8;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

charset utf-8;

root /var/www;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ /index.php?$query_string =404;
}

location ~ \.php$ {
include fastcgi_params;

fastcgi_pass php;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 1200;
fastcgi_read_timeout 1200;
fastcgi_buffer_size 1024k;
fastcgi_buffers 4 1024k;
fastcgi_busy_buffers_size 1024k;
fastcgi_temp_file_write_size 1024k;
fastcgi_intercept_errors on;
}
}
25 changes: 25 additions & 0 deletions 7.3/nginx/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[supervisord]
nodaemon=true
loglevel=debug
logfile=/proc/1/fd/1
logfile_maxbytes=0

[program:php-fpm]
command=php-fpm7.3
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/proc/1/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/1/fd/2
stderr_logfile_maxbytes=0

[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/proc/1/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/proc/1/fd/2
stderr_logfile_maxbytes=0
Loading