mirror of
https://github.com/macintoshplus/php.git
synced 2026-03-24 17:02:12 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc1179eb9 | ||
|
|
aabc24378e | ||
|
|
53165514dd | ||
|
|
2157bdefe0 | ||
|
|
f23ee67f4f | ||
|
|
2a750c3bfa | ||
|
|
0f3caf4e8e | ||
|
|
edc26bb1e7 | ||
|
|
f9a2fd9044 | ||
|
|
bae14a82e5 | ||
|
|
2816941770 | ||
|
|
94eb35f045 | ||
|
|
a51d1a2983 |
35
Dockerfile
35
Dockerfile
@@ -6,10 +6,13 @@ FROM debian:jessie
|
|||||||
MAINTAINER Jean-Baptiste Nahan <jean-baptiste@nahan.fr>
|
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
|
RUN apt-get update && apt-get -y upgrade
|
||||||
|
|
||||||
# Common packages
|
# Common packages
|
||||||
RUN apt-get -y install curl wget locales nano git subversion sudo php5-dev librabbitmq-dev
|
ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1
|
||||||
|
|
||||||
|
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 echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
|
||||||
RUN export LANGUAGE=en_US.UTF-8 && \
|
RUN export LANGUAGE=en_US.UTF-8 && \
|
||||||
@@ -18,6 +21,10 @@ RUN export LANGUAGE=en_US.UTF-8 && \
|
|||||||
locale-gen en_US.UTF-8 && \
|
locale-gen en_US.UTF-8 && \
|
||||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
|
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
|
# Apache
|
||||||
RUN apt-get -y install pdftk mysql-client xfonts-75dpi libfontconfig1 libjpeg62-turbo libxrender1 xfonts-base fontconfig
|
RUN apt-get -y install pdftk mysql-client xfonts-75dpi libfontconfig1 libjpeg62-turbo libxrender1 xfonts-base fontconfig
|
||||||
|
|
||||||
@@ -25,27 +32,29 @@ 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
|
RUN dpkg -i /root/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
|
||||||
|
|
||||||
# PHP
|
# 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 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 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/\;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/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
|
#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
|
#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
|
||||||
|
|
||||||
VOLUME /src
|
VOLUME /sources
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /sources
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Dev tools :
|
|||||||
* Curl
|
* Curl
|
||||||
* Wget
|
* Wget
|
||||||
* Nano
|
* Nano
|
||||||
|
* openJdk
|
||||||
|
|
||||||
Executable tools :
|
Executable tools :
|
||||||
|
|
||||||
@@ -19,4 +20,4 @@ Dev quality :
|
|||||||
* PHP Mess Detector (phpmd)
|
* PHP Mess Detector (phpmd)
|
||||||
* PHP_CodeSniffer (with Symfony2 rules)
|
* 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.
|
This image has already used for run website (with macintoshplus/apache2-php:php56), run RabbitMQ worker, run tests and make PHPCS and PHPMD repport.
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -d "/src" ]
|
if [ -d "/sources" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
USERID=$(stat -c "%u" /src)
|
USERID=$(stat -c "%u" /sources)
|
||||||
GROUPID=$(stat -c "%g" /src)
|
GROUPID=$(stat -c "%g" /sources)
|
||||||
|
|
||||||
groupmod -g $GROUPID phpuser
|
groupmod -g $GROUPID phpuser
|
||||||
usermod -u $USERID -g $GROUPID phpuser
|
usermod -u $USERID -g $GROUPID phpuser
|
||||||
|
|||||||
Reference in New Issue
Block a user