Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Here is the Dockerfile.
To use this Dockerfile, you need to download some packages: symfony.phar, icu4c, nginx, zlib, pcre, openssl.
And some configuration files, like: php.ini, www.conf for php-fpm, nginx.conf.
Then your Symfony project. (will be mounted to /home/webdev/myproject/)
The last thing, start.sh in CMD field is a script to start php-fpm and Nginx.

FROM php:5.6.22-fpm

USER root
ENV http_proxy http://yourProxyServer:port/
ENV https_proxy http://yourProxyServer:port/

#RUN apt-get update -y && apt-get install -y lrzsz vim
COPY packages/ /tmp/

RUN cp /tmp/symfony.phar /usr/bin/symfony && chmod +x /usr/bin/symfony

# wget http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.tgz
RUN cp /tmp/icu4c-55_1-src.tgz /var/ && cd /var/ && tar -xzf icu4c-55_1-src.tgz \
&& cd icu/source && ./configure --prefix=/usr/local/icu && make && make install \
&& rm -rf /var/icu/ /var/icu4c-55_1-src.tgz

RUN cd /usr/src/php/ext/intl && phpize \
&& ./configure --enable-intl --with-icu-dir=/usr/local/icu/ --with-php-config=/usr/local/bin/php-config \
&& make && make install

RUN cd /usr/src/php/ext/opcache && phpize \
&& ./configure --with-php-config=/usr/local/bin/php-config \
&& make && make install

RUN cd /usr/src/php/ext/pdo_mysql && phpize \
&& ./configure --with-pdo-mysql \
&& make && make install

COPY config/php.ini /usr/local/etc/php/
COPY config/www.conf /usr/local/etc/php-fpm.d/
RUN rm -f /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/docker.conf

RUN groupadd webgroup \
&& useradd -G webgroup -d /home/webdev webdev \
&& mkdir /home/webdev && chown -R webdev:webgroup /home/webdev/
COPY projects/myproject/ /home/webdev/myproject/
RUN chown -R webdev:webgroup /home/webdev/myproject/

USER webdev
# wget https://nginx.org/download/nginx-1.10.1.tar.gz
# wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz
# wget http://superb-sea2.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
# wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
RUN cd /home/webdev \
&& mkdir /home/webdev/php-fpm-log \
&& cp /tmp/nginx-1.10.1.tar.gz . && cp /tmp/pcre-8.39.tar.gz . \
&& cp /tmp/zlib-1.2.8.tar.gz . && cp /tmp/openssl-1.0.2h.tar.gz . \
&& tar -xzf nginx-1.10.1.tar.gz && tar -xzf pcre-8.39.tar.gz \
&& tar -xzf zlib-1.2.8.tar.gz && tar -xzf openssl-1.0.2h.tar.gz \
&& cd nginx-1.10.1 \
&& ./configure --prefix=/home/webdev/nginx --with-http_ssl_module --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-1.0.2h \
&& make && make install \
&& cd .. && rm -rf nginx-1.10.1 pcre-8.39 zlib-1.2.8 openssl-1.0.2h nginx-1.10.1.tar.gz pcre-8.39.tar.gz zlib-1.2.8.tar openssl-1.0.2h.tar.gz

COPY config/nginx.conf /home/webdev/nginx/conf/
COPY config/start.sh /home/webdev/

CMD ["/home/webdev/start.sh"]

Docker Pull Command
Owner
ardar

Comments (0)