mirror of
https://github.com/macintoshplus/php.git
synced 2026-03-24 17:02:12 +01:00
Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ae6827029 | ||
|
|
e0ccbff9d9 | ||
|
|
ac80363b28 | ||
|
|
604dfc1ca6 | ||
|
|
3224015fdf | ||
|
|
975aa48835 | ||
|
|
b3d31d6a1a | ||
|
|
ab26cefe29 | ||
|
|
c4102126ae | ||
|
|
5de5cb5d33 | ||
|
|
f506d6dc60 | ||
|
|
9086ba965d | ||
|
|
06d9a7fe4a | ||
|
|
e66fd5841a | ||
|
|
984e656543 | ||
|
|
4694088fa2 | ||
|
|
39de451d77 | ||
|
|
3fcfd05955 | ||
|
|
0dfd0fd10b | ||
|
|
b2dce3e9ff | ||
|
|
9924942ab9 | ||
|
|
0a401edeff | ||
|
|
7edf5ecadf | ||
|
|
09cb05b917 | ||
|
|
a3c727fe23 | ||
|
|
51adc41fa8 | ||
|
|
7faf4f2981 | ||
|
|
2958c43391 | ||
|
|
c481485e73 | ||
|
|
4ffaa69d02 | ||
|
|
2416f9fb17 | ||
|
|
79f44d3100 | ||
|
|
b59bebd2b6 | ||
|
|
1027a1ed35 | ||
|
|
1e43f42155 | ||
|
|
a6a413fb82 | ||
|
|
458144f528 | ||
|
|
5b18de767a | ||
|
|
801f09e75a | ||
|
|
12c6b1565a | ||
|
|
85d2cf5d37 | ||
|
|
f07f68a54a | ||
|
|
e796fd9496 | ||
|
|
7df903cd09 | ||
|
|
bd75e1039e | ||
|
|
fd82e6b7ac | ||
|
|
0e818c26d3 | ||
|
|
af2dd9a031 | ||
|
|
c1a7e2d783 | ||
|
|
882e34f3de | ||
|
|
a041b87676 | ||
|
|
ca77410572 | ||
|
|
f9f5d502ad | ||
|
|
21df882d6a | ||
|
|
d495ed7329 | ||
|
|
cf04f51b6a | ||
|
|
b71e8681e9 | ||
|
|
536ea5da88 | ||
|
|
e0e14b73a0 | ||
|
|
747f0bf60e | ||
|
|
c5a960bbd2 | ||
|
|
b6b5da1ec6 | ||
|
|
b2361162bd | ||
|
|
2f9a1e9d78 | ||
|
|
086c448b30 | ||
|
|
737886f4a7 | ||
|
|
8c335d44c0 | ||
|
|
eb7b6816e6 | ||
|
|
0cf27d8d7e | ||
|
|
364acb0bf6 | ||
|
|
c1fb91110c | ||
|
|
2689a565ba | ||
|
|
fd110b1622 |
48
Dockerfile
48
Dockerfile
@@ -1,51 +1,21 @@
|
||||
##
|
||||
# Jb Nahan PHP 5.6 container
|
||||
# Jb Nahan PHP 7.1 container
|
||||
##
|
||||
|
||||
FROM debian:jessie
|
||||
MAINTAINER Jean-Baptiste Nahan <jean-baptiste@nahan.fr>
|
||||
FROM macintoshplus/php:base
|
||||
MAINTAINER Jean-Baptiste Nahan <814683+macintoshplus@users.noreply.github.com>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
|
||||
# Common packages
|
||||
RUN apt-get -y install curl wget locales nano git subversion sudo php5-dev librabbitmq-dev
|
||||
COPY certs/ /root/
|
||||
COPY install.sh /root/install.sh
|
||||
RUN chmod +x /root/install.sh
|
||||
RUN /root/install.sh
|
||||
|
||||
RUN echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
|
||||
RUN export LANGUAGE=en_US.UTF-8 && \
|
||||
export LANG=en_US.UTF-8 && \
|
||||
export LC_ALL=en_US.UTF-8 && \
|
||||
locale-gen en_US.UTF-8 && \
|
||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
|
||||
|
||||
# Apache
|
||||
RUN apt-get -y install pdftk mysql-client xfonts-75dpi libfontconfig1 libjpeg62-turbo libxrender1 xfonts-base fontconfig
|
||||
|
||||
COPY bin/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb /root/
|
||||
RUN dpkg -i /root/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
|
||||
|
||||
# PHP
|
||||
RUN apt-get -y install php5-cli php5-curl php-soap php5-imagick php5-gd php5-mcrypt php5-mysql php5-xmlrpc php5-xsl php5-xdebug php-apc php5-apcu php5-ldap php5-gmp php5-intl php5-redis
|
||||
RUN cp /usr/share/php5/php.ini-development /etc/php5/cli/php.ini
|
||||
RUN sed -i 's/\;date\.timezone\ \=/date\.timezone\ \=\ Europe\/Paris/g' /etc/php5/cli/php.ini
|
||||
RUN sed -i 's/disable_functions\ \=\ pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,/\;disable_functions\ \=\ pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,/g' /etc/php5/cli/php.ini
|
||||
#RUN sed -i 's/;include_path = ".:\/usr\/share\/php"/include_path = ".:\/var\/www\/library"/g' /etc/php5/cli/php.ini
|
||||
|
||||
|
||||
#PEAR
|
||||
RUN pear install pecl/amqp
|
||||
RUN echo "extension=amqp.so" > /etc/php5/mods-available/amqp.ini
|
||||
RUN cd /etc/php5/apache2/conf.d && ln -s ../../mods-available/amqp.ini 20-amqp.ini
|
||||
RUN cd /etc/php5/cli/conf.d && ln -s ../../mods-available/amqp.ini 20-amqp.ini
|
||||
RUN pear channel-discover pear.phpmd.org && pear channel-discover pear.pdepend.org && pear channel-discover pear.phpdoc.org && pear channel-discover components.ez.no
|
||||
RUN pear install PHP_CodeSniffer && pear install --alldeps phpmd/PHP_PMD
|
||||
RUN git clone https://github.com/lapistano/Symfony2-coding-standard.git /usr/share/php/PHP/CodeSniffer/Standards/Symfony2
|
||||
|
||||
RUN useradd -s /bin/bash --home /src --no-create-home phpuser
|
||||
COPY bin/fixright /
|
||||
RUN chmod +x /fixright
|
||||
|
||||
VOLUME /src
|
||||
VOLUME /sources
|
||||
|
||||
WORKDIR /src
|
||||
WORKDIR /sources
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# php56
|
||||
# php71
|
||||
Docker Image With PHP56 and many tools !
|
||||
|
||||
Dev tools :
|
||||
@@ -18,5 +18,3 @@ Dev quality :
|
||||
|
||||
* PHP Mess Detector (phpmd)
|
||||
* PHP_CodeSniffer (with Symfony2 rules)
|
||||
|
||||
This image has already used for run website (with macintoshplus/apache2-php56), run RabbitMQ worker, run tests and make PHPCS and PHPMD repport.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -d "/src" ]
|
||||
if [ -d "/sources" ]
|
||||
then
|
||||
|
||||
USERID=$(stat -c "%u" /src)
|
||||
GROUPID=$(stat -c "%g" /src)
|
||||
USERID=$(stat -c "%u" /sources)
|
||||
GROUPID=$(stat -c "%g" /sources)
|
||||
|
||||
groupmod -g $GROUPID phpuser
|
||||
usermod -u $USERID -g $GROUPID phpuser
|
||||
|
||||
Binary file not shown.
BIN
certs/sury.gpg
Normal file
BIN
certs/sury.gpg
Normal file
Binary file not shown.
45
install.sh
Normal file
45
install.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh -ex
|
||||
##
|
||||
# Jb Nahan PHP 7.1 container
|
||||
##
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
wget -q -O - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
|
||||
echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/sury-php.list
|
||||
|
||||
wget -q -O - https://packages.blackfire.io/gpg.key | sudo apt-key add -
|
||||
echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list
|
||||
|
||||
# PHP
|
||||
apt-get update && apt-get upgrade -y && apt-get -y install php7.1-dev php7.1-cli php7.1-bcmath php7.1-curl php-pear php7.1-imagick php7.1-gd \
|
||||
php7.1-mcrypt php7.1-mbstring php7.1-mysql php7.1-sqlite3 php7.1-xmlrpc php7.1-xsl php7.1-apcu php7.1-ldap php7.1-gmp php7.1-intl php-redis \
|
||||
php7.1-zip php7.1-soap php7.1-xml php7.1-common blackfire-agent blackfire-php
|
||||
sed -i 's/\;date\.timezone\ \=/date\.timezone\ \=\ Europe\/Paris/g' /etc/php/7.1/cli/php.ini
|
||||
sed -i 's/\memory_limit\ \=\ 128M/memory_limit\ \=\ -1/g' /etc/php/7.1/cli/php.ini
|
||||
sed -i 's/\display_errors\ \=\ Off/display_errors\ \=\ On/g' /etc/php/7.1/cli/php.ini
|
||||
sed -i 's/disable_functions\ \=\ pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,/\;disable_functions\ \=\ pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,/g' /etc/php/7.1/cli/php.ini
|
||||
|
||||
pecl channel-update pecl.php.net
|
||||
pecl install sqlsrv
|
||||
pecl install pdo_sqlsrv
|
||||
echo "extension=sqlsrv.so" > /etc/php/7.1/mods-available/sqlsrv.ini
|
||||
echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/mods-available/pdo_sqlsrv.ini
|
||||
phpenmod sqlsrv pdo_sqlsrv
|
||||
|
||||
#PEAR
|
||||
pear upgrade && pear install pecl/amqp-1.9.4
|
||||
echo "extension=amqp.so" > /etc/php/7.1/mods-available/amqp.ini
|
||||
|
||||
phpenmod amqp
|
||||
pear install pecl/xdebug
|
||||
echo "zend_extension=/usr/lib/php/20160303/xdebug.so" > /etc/php/7.1/mods-available/xdebug.ini
|
||||
phpenmod xdebug
|
||||
|
||||
apt-get remove -y libgcc-8-dev php7.1-dev
|
||||
apt-get autoremove -y
|
||||
apt-get autoclean
|
||||
apt-get clean
|
||||
|
||||
useradd -s /bin/bash --home /sources --no-create-home phpuser
|
||||
|
||||
Reference in New Issue
Block a user