mirror of
https://github.com/macintoshplus/php.git
synced 2026-03-25 01:12:07 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc1179eb9 | ||
|
|
aabc24378e | ||
|
|
53165514dd | ||
|
|
2157bdefe0 | ||
|
|
f23ee67f4f | ||
|
|
2a750c3bfa | ||
|
|
0f3caf4e8e | ||
|
|
edc26bb1e7 | ||
|
|
f9a2fd9044 | ||
|
|
bae14a82e5 | ||
|
|
2816941770 | ||
|
|
94eb35f045 | ||
|
|
a51d1a2983 |
53
Dockerfile
53
Dockerfile
@@ -1,17 +1,56 @@
|
|||||||
##
|
##
|
||||||
# Jb Nahan PHP 7.2 container
|
# Jb Nahan PHP 5.6 container
|
||||||
##
|
##
|
||||||
|
|
||||||
FROM macintoshplus/php:base
|
FROM debian:jessie
|
||||||
MAINTAINER Jean-Baptiste Nahan <814683+macintoshplus@users.noreply.github.com>
|
MAINTAINER Jean-Baptiste Nahan <jean-baptiste@nahan.fr>
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
RUN echo 'deb http://httpredir.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list
|
||||||
|
RUN apt-get update && apt-get -y upgrade
|
||||||
|
|
||||||
COPY certs/ /root/
|
# Common packages
|
||||||
COPY install.sh /root/install.sh
|
ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1
|
||||||
RUN chmod +x /root/install.sh
|
|
||||||
RUN /root/install.sh
|
|
||||||
|
|
||||||
|
RUN apt-get -y install curl wget locales nano git subversion sudo php5-dev librabbitmq-dev openjdk-8-jre-headless ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure
|
||||||
|
RUN ln -s /usr/bin/java /bin/java
|
||||||
|
|
||||||
|
|
||||||
|
# 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 php-apc php5-apcu php5-ldap php5-gmp php5-intl php5-redis php5-sqlite
|
||||||
|
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/\memory_limit\ \=\ 128M/memory_limit\ \=\ -1/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 update-channels && pear install pecl/amqp-1.9.1 && pear install pecl/xdebug-2.5.5
|
||||||
|
RUN echo "extension=amqp.so" > /etc/php5/mods-available/amqp.ini
|
||||||
|
RUN echo "zend_extension=xdebug.so" > /etc/php5/mods-available/xdebug.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 php5enmod amqp xdebug
|
||||||
|
|
||||||
|
RUN useradd -s /bin/bash --home /sources --no-create-home phpuser
|
||||||
COPY bin/fixright /
|
COPY bin/fixright /
|
||||||
RUN chmod +x /fixright
|
RUN chmod +x /fixright
|
||||||
|
|
||||||
|
|||||||
50
README.md
50
README.md
@@ -1,35 +1,23 @@
|
|||||||
# php72
|
# php56
|
||||||
Docker Image With PHP 7.2 and many tools !
|
Docker Image With PHP56 and many tools !
|
||||||
|
|
||||||
## Extensions
|
Dev tools :
|
||||||
|
|
||||||
* php7.2-dev
|
* GIT
|
||||||
* php7.2-cli
|
* SVN
|
||||||
* php7.2-bcmath
|
* Curl
|
||||||
* php7.2-curl
|
* Wget
|
||||||
* php7.2-gd
|
* Nano
|
||||||
* php7.2-mbstring
|
* openJdk
|
||||||
* php7.2-mysql
|
|
||||||
* php7.2-sqlite3
|
|
||||||
* php7.2-xmlrpc
|
|
||||||
* php7.2-xsl
|
|
||||||
* php7.2-ldap
|
|
||||||
* php7.2-gmp
|
|
||||||
* php7.2-intl
|
|
||||||
* php-redis
|
|
||||||
* php7.2-zip
|
|
||||||
* php7.2-soap
|
|
||||||
* php7.2-xml
|
|
||||||
* php7.2-common
|
|
||||||
* php7.2-json
|
|
||||||
* php7.2-opcache
|
|
||||||
* php7.2-readline
|
|
||||||
* php7.2-xdebug
|
|
||||||
* php7.2-imagick
|
|
||||||
* amqp-1.9.3
|
|
||||||
* pdo_sqlsrv
|
|
||||||
* sqlsrv
|
|
||||||
|
|
||||||
## Disabled Extensions
|
Executable tools :
|
||||||
|
|
||||||
php7.2-apcu
|
* wkhtmltopdf
|
||||||
|
* pdftk
|
||||||
|
|
||||||
|
Dev quality :
|
||||||
|
|
||||||
|
* PHP Mess Detector (phpmd)
|
||||||
|
* PHP_CodeSniffer (with Symfony2 rules)
|
||||||
|
|
||||||
|
This image has already used for run website (with macintoshplus/apache2-php:php56), run RabbitMQ worker, run tests and make PHPCS and PHPMD repport.
|
||||||
|
|||||||
BIN
bin/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
Normal file
BIN
bin/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
Normal file
Binary file not shown.
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DIR=$(dirname $0)
|
|
||||||
|
|
||||||
cd $DIR
|
|
||||||
|
|
||||||
docker build -t php72 --network host .
|
|
||||||
|
|
||||||
BIN
certs/sury.gpg
BIN
certs/sury.gpg
Binary file not shown.
61
install.sh
61
install.sh
@@ -1,61 +0,0 @@
|
|||||||
#!/bin/sh -ex
|
|
||||||
##
|
|
||||||
# Jb Nahan PHP 7.2 container
|
|
||||||
##
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
# Sury : PHP Sources
|
|
||||||
wget -q -O - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
|
|
||||||
echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/sury-php.list
|
|
||||||
|
|
||||||
# Blackfire
|
|
||||||
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.2-dev php7.2-cli php7.2-bcmath php7.2-curl php-pear php7.2-gd php7.2-mbstring php7.2-mysql php7.2-sqlite3 php7.2-xmlrpc php7.2-xsl php7.2-ldap php7.2-gmp php7.2-intl php7.2-zip php7.2-soap php7.2-xml php7.2-common php7.2-json php7.2-opcache php7.2-readline blackfire-agent blackfire-php
|
|
||||||
# Disabled ext from repos : php7.2-imagick php7.2-xdebug php7.2-apcu
|
|
||||||
# Disable dependencies : libmagickwand-6.q16-dev
|
|
||||||
# Disabled php-redis
|
|
||||||
|
|
||||||
sed -i 's/\;date\.timezone\ \=/date\.timezone\ \=\ Europe\/Paris/g' /etc/php/7.2/cli/php.ini
|
|
||||||
sed -i 's/\memory_limit\ \=\ 128M/memory_limit\ \=\ -1/g' /etc/php/7.2/cli/php.ini
|
|
||||||
sed -i 's/\display_errors\ \=\ Off/display_errors\ \=\ On/g' /etc/php/7.2/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.2/cli/php.ini
|
|
||||||
|
|
||||||
pecl channel-update pecl.php.net
|
|
||||||
## Fix Tar Error
|
|
||||||
#wget https://github.com/pear/Archive_Tar/releases/download/1.4.3/Archive_Tar-1.4.3.tgz
|
|
||||||
#tar -xvf Archive_Tar-1.4.3.tgz
|
|
||||||
#cp Archive_Tar-1.4.3/Archive/Tar.php /usr/share/php/Archive/Tar.php
|
|
||||||
|
|
||||||
pecl install sqlsrv-5.6.1
|
|
||||||
pecl install pdo_sqlsrv-5.6.1
|
|
||||||
echo "extension=sqlsrv" > /etc/php/7.2/mods-available/sqlsrv.ini
|
|
||||||
echo "extension=pdo_sqlsrv" > /etc/php/7.2/mods-available/pdo_sqlsrv.ini
|
|
||||||
|
|
||||||
#PEAR
|
|
||||||
pear upgrade
|
|
||||||
pear install pecl/amqp
|
|
||||||
echo "extension=amqp" > /etc/php/7.2/mods-available/amqp.ini
|
|
||||||
|
|
||||||
|
|
||||||
pear install pecl/redis
|
|
||||||
echo "extension=redis" > /etc/php/7.2/mods-available/redis.ini
|
|
||||||
|
|
||||||
apt-get install -y libmagickwand-dev libmagickcore-dev libmagickwand-6.q16-6 libmagickcore-6.q16-6
|
|
||||||
pear install pecl/imagick
|
|
||||||
echo "extension=imagick" > /etc/php/7.2/mods-available/imagick.ini
|
|
||||||
|
|
||||||
#git clone git://github.com/xdebug/xdebug.git
|
|
||||||
#cd xdebug
|
|
||||||
#git co 2.6.0beta1
|
|
||||||
#/usr/bin/phpize7.2 && ./configure --enable-xdebug && make && make install
|
|
||||||
pear install pecl/xdebug
|
|
||||||
echo "zend_extension=xdebug" > /etc/php/7.2/mods-available/xdebug.ini
|
|
||||||
|
|
||||||
phpenmod -v 7.2 -s cli amqp sqlsrv pdo_sqlsrv redis xdebug imagick
|
|
||||||
|
|
||||||
useradd -s /bin/bash --home /sources --no-create-home phpuser
|
|
||||||
|
|
||||||
apt-get remove -y libgcc-8-dev libmagickwand-dev libmagickcore-dev && apt-get autoremove -y
|
|
||||||
Reference in New Issue
Block a user