diff --git a/Dockerfile b/Dockerfile index 70e2ca1..4096410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM php:7.1.11-fpm -LABEL Eakkabin Jaikeawma +FROM php:7.2.0-fpm +LABEL Eakkabin Jaikeawma RUN apt-get update && apt-get install -y curl git --no-install-recommends \ && docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql mbstring \ @@ -8,11 +8,10 @@ RUN apt-get update && apt-get install -y curl git --no-install-recommends \ COPY ./php7-ini/20-phalcon.ini /usr/local/etc/php/conf.d/20-phalcon.ini COPY ./php7-ini/20-mongodb.ini /usr/local/etc/php/conf.d/20-mongodb.ini -COPY ./php7-ext/phalcon-v3.2.1.so /usr/local/lib/php/extensions/no-debug-non-zts-20160303/phalcon-v3.2.1.so -COPY ./php7-ext/mongodb-v1.2.9.so /usr/local/lib/php/extensions/no-debug-non-zts-20160303/mongodb-v1.2.9.so +COPY ./php7-ext/phalcon-v3.3.0.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/phalcon-v3.3.0.so +COPY ./php7-ext/mongodb-v1.3.4.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb-v1.3.4.so WORKDIR /usr/share/nginx/html - EXPOSE 9000 -CMD ["php-fpm"] +CMD ["php-fpm"] \ No newline at end of file diff --git a/build/mongodb/Dockerfile b/build/mongodb/Dockerfile new file mode 100644 index 0000000..bf32686 --- /dev/null +++ b/build/mongodb/Dockerfile @@ -0,0 +1,15 @@ +FROM php:7.2.0-fpm +LABEL Eakkabin Jaikeawma + +RUN buildDeps='autoconf g++ gcc curl ca-certificates libc6-dev libpcre3-dev libssl-dev libcurl4-openssl-dev pkg-config make git' \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ + && docker-php-ext-install -j$(nproc) iconv mbstring \ + && mkdir -p /build && pecl install mongodb \ + && echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/20-mongodb.ini \ + && rm -rf /build && apt-get clean && apt-get autoremove -y \ + && rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* \ + && apt-get purge -y --auto-remove $buildDeps + +EXPOSE 9000 + +CMD ["php-fpm"] \ No newline at end of file diff --git a/build/mongodb/README.md b/build/mongodb/README.md new file mode 100644 index 0000000..166a9d1 --- /dev/null +++ b/build/mongodb/README.md @@ -0,0 +1,18 @@ +Build MongoDB PHP Mobule. +--------------------------------------------------- + +``` +docker build -t build/php7mongo:7.2.0 . +``` + + +``` +docker run -it --name docker-php7mongo -d build/php7mongo:7.2.0 +docker cp docker-php7mongo:/usr/local/etc/php/conf.d/20-mongodb.ini ./../../php7-ini/20-mongodb.ini +docker cp docker-php7mongo:/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mongodb.so ./../../php7-ext/mongodb.so +``` + + +``` +docker stop docker-php7mongo && docker rm docker-php7mongo +``` \ No newline at end of file diff --git a/build/phalcon3/Dockerfile b/build/phalcon3/Dockerfile new file mode 100644 index 0000000..9771126 --- /dev/null +++ b/build/phalcon3/Dockerfile @@ -0,0 +1,18 @@ +FROM php:7.2.0-fpm +LABEL Eakkabin Jaikeawma + +RUN buildDeps='autoconf g++ gcc ca-certificates libc6-dev libpcre3-dev libssl-dev libcurl4-openssl-dev pkg-config make re2c curl git' \ + && apt-get update && apt-get install -y --no-install-recommends \ + && apt-get install -y $buildDeps --no-install-recommends \ + && docker-php-ext-install -j$(nproc) iconv mbstring \ + && mkdir -p /build && cd /build \ + && git clone --depth=1 git://github.com/phalcon/cphalcon.git \ + && cd /build/cphalcon/build && ./install && echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/20-phalcon.ini \ + && rm -rf /build \ + && apt-get clean && apt-get autoremove -y \ + && rm -r /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* \ + && apt-get purge -y --auto-remove $buildDeps + +EXPOSE 9000 + +CMD ["php-fpm"] diff --git a/build/phalcon3/README.md b/build/phalcon3/README.md new file mode 100644 index 0000000..0bcde2e --- /dev/null +++ b/build/phalcon3/README.md @@ -0,0 +1,18 @@ +Build PHP Mobule with Phalcon Framework v3.3.x +--------------------------------------------------- + +``` +docker build -t build/php7phalcon:7.2.0 . +``` + + +``` +docker run -it --name docker-php7phalcon -d build/php7phalcon:7.2.0 +docker cp docker-php7phalcon:/usr/local/etc/php/conf.d/20-phalcon.ini ./../../php7-ini/20-phalcon.ini +docker cp docker-php7phalcon:/usr/local/lib/php/extensions/no-debug-non-zts-20170718/phalcon.so ./../../php7-ext/phalcon.so +``` + + +``` +docker stop docker-php7phalcon && docker rm docker-php7phalcon +``` \ No newline at end of file diff --git a/php7-ext/mongodb-v1.2.9.so b/php7-ext/mongodb-v1.2.9.so deleted file mode 100644 index 2499a6d..0000000 Binary files a/php7-ext/mongodb-v1.2.9.so and /dev/null differ diff --git a/php7-ext/mongodb-v1.3.4.so b/php7-ext/mongodb-v1.3.4.so new file mode 100644 index 0000000..105e600 Binary files /dev/null and b/php7-ext/mongodb-v1.3.4.so differ diff --git a/php7-ext/phalcon-v3.2.1.so b/php7-ext/phalcon-v3.2.1.so deleted file mode 100644 index 538db27..0000000 Binary files a/php7-ext/phalcon-v3.2.1.so and /dev/null differ diff --git a/php7-ext/phalcon-v3.3.0.so b/php7-ext/phalcon-v3.3.0.so new file mode 100755 index 0000000..5063d34 Binary files /dev/null and b/php7-ext/phalcon-v3.3.0.so differ diff --git a/php7-ini/20-mongodb.ini b/php7-ini/20-mongodb.ini index e90c49f..d3bfd83 100644 --- a/php7-ini/20-mongodb.ini +++ b/php7-ini/20-mongodb.ini @@ -1 +1 @@ -extension=mongodb-v1.2.9.so \ No newline at end of file +extension=mongodb-v1.3.4.so \ No newline at end of file diff --git a/php7-ini/20-phalcon.ini b/php7-ini/20-phalcon.ini index 528ce45..d611c53 100644 --- a/php7-ini/20-phalcon.ini +++ b/php7-ini/20-phalcon.ini @@ -1 +1 @@ -extension=phalcon-v3.2.1.so \ No newline at end of file +extension=phalcon.so