Server PHP - Apache - with Phalcon 2.0.13, Oracle OCI8, Postgresql, Mysql, MsSQL and Redis2.*
428
Server Apache 2+
To RUN docker container run -d --name test --network host -v $(pwd):/var/www/html arthurgermano/servidorphp -d: Detached --name: Name of the container --network: 'host' to use the same network of the local machine -v: Volume, where is you code to map to apache container, ($pwd) - Present Work Directory
To EXEC the image bash and run commands inside of the container docker container exec -it test bash
To BUILD the image The files to configure are in the same repository.
Donwload all the files and unzip the only zip file in the same folder
Execute the command in the folder where the dockerfile is! docker image build --build-arg http_proxy=http://localhost:8118 --network host --tag servidorphp . --build-arg: passing environment variables to the building image, in this case proxy of privoxy on localmachine --network: 'host' to use the same network as the localmachine --tag: name of the image .: Use dot to refer to local folder, or use the path where the dockerfile is.
This image created, has all the files needed inside of the /tmp directory of the container. Left on purpose just in case we might need in the future!
DOCKER FILE FROM ubuntu:14.04
RUN apt-get update RUN apt-get -y upgrade
RUN apt-get -y install apache2 php5 libapache2-mod-php5 php5-dev php-pear php5-curl curl libaio1 libpcre3-dev gcc make re2c php5-odbc php5-xcache
RUN apt-get -y install php5-pgsql php5-mysql php5-apcu php5-gd php5-json php5-ldap php5-mcrypt php5-sqlite php5-xsl php5-redis php5-mssql git
ADD oracle/oracle-instantclient11.2-basiclite_11.2.0.4.0-2_amd64.deb /tmp ADD oracle/oracle-instantclient11.2-devel_11.2.0.4.0-2_amd64.deb /tmp ADD oracle/oracle-instantclient11.2-sqlplus_11.2.0.4.0-2_amd64.deb /tmp RUN dpkg -i /tmp/oracle-instantclient11.2-basiclite_11.2.0.4.0-2_amd64.deb RUN dpkg -i /tmp/oracle-instantclient11.2-devel_11.2.0.4.0-2_amd64.deb RUN dpkg -i /tmp/oracle-instantclient11.2-sqlplus_11.2.0.4.0-2_amd64.deb
ENV LD_LIBRARY_PATH /usr/lib/oracle/11.2/client64/lib/ ENV ORACLE_HOME /usr/lib/oracle/11.2/client64/lib/
RUN pear config-set http_proxy http://localhost:8118
RUN echo 'instantclient,/usr/lib/oracle/11.2/client64/lib' | pecl install -f oci8-2.0.8 RUN echo "extension=oci8.so" > /etc/php5/apache2/conf.d/30-oci8.ini
RUN sed -i 's/short_open_tag.*/short_open_tag = On/g' /etc/php5/apache2/php.ini
COPY apache2.conf /etc/apache2 COPY envvars /etc/apache2
ADD /pdo_oci /tmp/pdo_oci
RUN ln -s /usr/include/php5/ /usr/include/php RUN mkdir /usr/lib/oracle/11.2/client64/lib/sdk && ln -s /usr/include/oracle/11.2/client64/ /usr/lib/oracle/11.2/client64/lib/sdk/include
RUN cd /tmp/pdo_oci/ && ./configure --with-pdo-oci=instantclient,/usr/lib/oracle/11.2/client64/lib,11.1
RUN cd /tmp/pdo_oci && make && make install && cd /
RUN echo "extension=pdo_oci.so" > /etc/php5/mods-available/pdo_oci.ini RUN echo "extension=pdo_oci.so" > /etc/php5/apache2/conf.d/30-pdo_oci.ini
RUN cd /tmp && git clone git://github.com/phalcon/cphalcon.git && cd cphalcon && git checkout tags/phalcon-v2.0.13 && cd build && ./install && cd /
RUN echo "extension=phalcon.so" > /etc/php5/mods-available/phalcon.ini RUN echo "extension=phalcon.so" > /etc/php5/apache2/conf.d/30-phalcon.ini
RUN a2enmod rewrite
ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_PID_FILE /var/run/apache2.pid
EXPOSE 80 EXPOSE 5432 EXPOSE 3306 EXPOSE 1521
CMD /usr/sbin/apache2 -D FOREGROUND
MAINTAINER Arthur Jose Germano [email protected]
Content type
Image
Digest
Size
389.5 MB
Last updated
almost 8 years ago
docker pull arthurgermano/servidorphp-firstversion