public/php-fpm (sha256:54e3159bd7e7138b428e9a8eb9432fac35287ef588651bc089feb27faaa3ab4f)
Published 2025-07-12 12:10:50 +07:00 by panuwat.n
Installation
docker pull git.web2.rmutsv.ac.th/administrator/public/php-fpm@sha256:54e3159bd7e7138b428e9a8eb9432fac35287ef588651bc089feb27faaa3ab4fsha256:54e3159bd7e7138b428e9a8eb9432fac35287ef588651bc089feb27faaa3ab4fImage Layers
| ADD file:a65337a57a064a79ad8a3f42e8282b3e01710cb4684ccd880463cc8d2e051fa5 in / |
| CMD ["bash"] |
| /bin/sh -c set -eux; { echo 'Package: php*'; echo 'Pin: release *'; echo 'Pin-Priority: -1'; } > /etc/apt/preferences.d/no-debian-php |
| ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c |
| /bin/sh -c apt-get update && apt-get install -y $PHPIZE_DEPS ca-certificates curl xz-utils --no-install-recommends && rm -r /var/lib/apt/lists/* |
| ENV PHP_INI_DIR=/usr/local/etc/php |
| /bin/sh -c mkdir -p $PHP_INI_DIR/conf.d |
| ENV PHP_EXTRA_CONFIGURE_ARGS=--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi |
| ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 |
| ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 |
| ENV PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie |
| ENV GPG_KEYS=0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 |
| ENV PHP_VERSION=5.6.40 |
| ENV PHP_URL=https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror PHP_ASC_URL=https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror |
| ENV PHP_SHA256=1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c PHP_MD5= |
| /bin/sh -c set -xe; fetchDeps=' wget '; if ! command -v gpg > /dev/null; then fetchDeps="$fetchDeps dirmngr gnupg "; fi; apt-get update; apt-get install -y --no-install-recommends $fetchDeps; rm -rf /var/lib/apt/lists/*; mkdir -p /usr/src; cd /usr/src; wget -O php.tar.xz "$PHP_URL"; if [ -n "$PHP_SHA256" ]; then echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; fi; if [ -n "$PHP_MD5" ]; then echo "$PHP_MD5 *php.tar.xz" | md5sum -c -; fi; if [ -n "$PHP_ASC_URL" ]; then wget -O php.tar.xz.asc "$PHP_ASC_URL"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done; gpg --batch --verify php.tar.xz.asc php.tar.xz; command -v gpgconf > /dev/null && gpgconf --kill all; rm -rf "$GNUPGHOME"; fi; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps |
| COPY file:ce57c04b70896f77cc11eb2766417d8a1240fcffe5bba92179ec78c458844110 in /usr/local/bin/ |
| /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends libcurl4-openssl-dev libedit-dev libsqlite3-dev libssl1.0-dev libxml2-dev zlib1g-dev ${PHP_EXTRA_BUILD_DEPS:-} ; rm -rf /var/lib/apt/lists/*; export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" ; docker-php-source extract; cd /usr/src/php; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; if [ ! -d /usr/include/curl ]; then ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; fi; ./configure --build="$gnuArch" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" --enable-option-checking=fatal --with-mhash --enable-ftp --enable-mbstring --enable-mysqlnd --with-curl --with-libedit --with-openssl --with-zlib $(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') --with-libdir="lib/$debMultiarch" ${PHP_EXTRA_CONFIGURE_ARGS:-} ; make -j "$(nproc)"; make install; find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; make clean; cp -v php.ini-* "$PHP_INI_DIR/"; cd /; docker-php-source delete; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; find /usr/local -type f -executable -exec ldd '{}' ';' | awk '/=>/ { print $(NF-1) }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; php --version; pecl update-channels; rm -rf /tmp/pear ~/.pearrc |
| COPY multi:cbc68fef2c8554b9a23fee7eee16ffda927235f929048638240f97172562665c in /usr/local/bin/ |
| ENTRYPOINT ["docker-php-entrypoint"] |
| WORKDIR /var/www/html |
| /bin/sh -c set -ex && cd /usr/local/etc && if [ -d php-fpm.d ]; then sed 's!=NONE/!=!g' php-fpm.conf.default | tee php-fpm.conf > /dev/null; cp php-fpm.d/www.conf.default php-fpm.d/www.conf; else mkdir php-fpm.d; cp php-fpm.conf.default php-fpm.d/www.conf; { echo '[global]'; echo 'include=etc/php-fpm.d/*.conf'; } | tee php-fpm.conf; fi && { echo '[global]'; echo 'error_log = /proc/self/fd/2'; echo; echo '[www]'; echo '; if we send this to /proc/self/fd/1, it never appears'; echo 'access.log = /proc/self/fd/2'; echo; echo 'clear_env = no'; echo; echo '; Ensure worker stdout and stderr are sent to the main error log.'; echo 'catch_workers_output = yes'; } | tee php-fpm.d/docker.conf && { echo '[global]'; echo 'daemonize = no'; echo; echo '[www]'; echo 'listen = 9000'; } | tee php-fpm.d/zz-docker.conf |
| EXPOSE 9000 |
| CMD ["php-fpm"] |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV ACCEPT_EULA=Y |
| COPY /usr/bin/install-php-extensions /usr/bin/ # buildkit |
| RUN /bin/sh -c install-php-extensions ldap mysqli mysql mbstring opcache pdo pdo_mysql apcu curl gd json mcrypt pdo_dblib readline zip # buildkit |
| RUN /bin/sh -c pecl install xdebug-2.2.5 && docker-php-ext-enable xdebug # buildkit |
| RUN /bin/sh -c apt-get install -y --force-yes curl # buildkit |
| RUN /bin/sh -c apt-get update # buildkit |
| RUN /bin/sh -c apt-get install -y --force-yes gpg unixodbc unixodbc-dev # buildkit |
| RUN /bin/sh -c docker-php-ext-install pdo pdo_mysql # buildkit |
| RUN /bin/sh -c apt-get install -y --force-yes libmcrypt-dev libicu-dev libxml2-dev libxslt1-dev # buildkit |
| RUN /bin/sh -c apt-get install -y --force-yes unixodbc-dev freetds-bin freetds-common tdsodbc # buildkit |
| RUN /bin/sh -c printf "[FreeTDS]\nTDSVersion = 8.0\nclient charset = UTF-8\n" > /usr/local/etc/php/conf.d/dblib.ini # buildkit |
| RUN /bin/sh -c echo "expose_php = Off" >> /usr/local/etc/php/custom.ini && echo "display_errors = Off" >> /usr/local/etc/php/custom.ini && echo "display_startup_errors = Off" >> /usr/local/etc/php/custom.ini && echo "max_execution_time = 1800" >> /usr/local/etc/php/custom.ini && echo "memory_limit = 128M" >> /usr/local/etc/php/custom.ini && echo "post_max_size = 128M" >> /usr/local/etc/php/custom.ini && echo "upload_max_filesize = 128M" >> /usr/local/etc/php/custom.ini && echo "default_charset = UTF-8" >> /usr/local/etc/php/custom.ini && echo "opcache.memory_consumption = 64" >> /usr/local/etc/php/custom.ini && echo "timezone = Asia/Bangkok" >> /usr/local/etc/php/custom.ini && echo "opcache.revalidate_freq = 2" >> /usr/local/etc/php/custom.ini # buildkit |
| ENV TZ=Asia/Bangkok |
| COPY my-php.ini /usr/local/etc/php/conf.d/my-php.ini # buildkit |
| RUN /bin/sh -c mkdir -p /var/lib/php5/sessions && chown -R www-data:www-data /var/lib/php5/sessions # buildkit |
| EXPOSE map[9000/tcp:{}] |
| CMD ["php-fpm"] |