public/apache-php (5.6.36)

Published 2025-04-03 18:21:09 +07:00 by administrator

Installation

docker pull git.web2.rmutsv.ac.th/administrator/public/apache-php:5.6.36
sha256:01934cd6590d7cbd94fde801adb759b395fe74e8500f0a182f9eb54c0aea7a64

Image Layers

ADD file:919939fa022472751b717443eea9f1d7ab5c0723f1f3a6b776d3b83d22bde818 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
/bin/sh -c apt-get update && apt-get install -y --no-install-recommends apache2 && rm -rf /var/lib/apt/lists/*
ENV APACHE_CONFDIR=/etc/apache2
ENV APACHE_ENVVARS=/etc/apache2/envvars
/bin/sh -c set -ex && sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" && . "$APACHE_ENVVARS" && for dir in "$APACHE_LOCK_DIR" "$APACHE_RUN_DIR" "$APACHE_LOG_DIR" /var/www/html ; do rm -rvf "$dir" && mkdir -p "$dir" && chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; done
/bin/sh -c a2dismod mpm_event && a2enmod mpm_prefork
/bin/sh -c set -ex && . "$APACHE_ENVVARS" && ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" && ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" && ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"
/bin/sh -c { echo '<FilesMatch \.php$>'; echo '\tSetHandler application/x-httpd-php'; echo '</FilesMatch>'; echo; echo 'DirectoryIndex disabled'; echo 'DirectoryIndex index.php index.html'; echo; echo '<Directory /var/www/>'; echo '\tOptions -Indexes'; echo '\tAllowOverride All'; echo '</Directory>'; } | tee "$APACHE_CONFDIR/conf-available/docker-php.conf" && a2enconf docker-php
ENV PHP_EXTRA_BUILD_DEPS=apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --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.36
ENV PHP_URL=https://secure.php.net/get/php-5.6.36.tar.xz/from/this/mirror PHP_ASC_URL=https://secure.php.net/get/php-5.6.36.tar.xz.asc/from/this/mirror
ENV PHP_SHA256=18f536bf548e909b4e980379d0c4e56d024b2b1eb1c9768fd169360491f1d6dd 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 --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:207c686e3fed4f71f8a7b245d8dcae9c9048d276a326d82b553c12a90af0c0ca 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; 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:c925dfb355ea16ba0238c8b6ca78d3cd7fe815932bf707b25bbf051070430157 in /usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
COPY file:24613ecbb1ce6a09f683b0753da9c26a1af07547326e8a02f6eec80ad6f2774a in /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80/tcp
CMD ["apache2-foreground"]
ENV TZ=Asia/Bangkok
COPY apache2.conf /etc/apache2/ # buildkit
COPY 000-default.conf /etc/apache2/sites-available/ # buildkit
COPY php.ini /usr/local/etc/php/ # buildkit
RUN /bin/sh -c rm /etc/apt/sources.list && echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list && apt-get update # buildkit
RUN /bin/sh -c a2enmod rewrite ssl headers proxy proxy_http proxy_balancer proxy_wstunnel lbmethod_byrequests && a2enmod mpm_prefork # buildkit
RUN /bin/sh -c docker-php-ext-install mysqli mysql mbstring opcache pdo pdo_mysql # buildkit
RUN /bin/sh -c apt-get install -y libldap2-dev && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && docker-php-ext-install ldap # buildkit
RUN /bin/sh -c apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-2.2.0 && docker-php-ext-enable memcached # buildkit
RUN /bin/sh -c apt-get install -y libfreetype6-dev libjpeg62-turbo-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd # buildkit
RUN /bin/sh -c apt-get install -y --no-install-recommends libmemcached11 libmemcachedutil2 libz-dev build-essential apache2-utils libmagickwand-dev imagemagick libcurl4-openssl-dev libssl-dev libc-client2007e-dev libkrb5-dev libmcrypt-dev unixodbc-dev && docker-php-ext-configure imap --with-imap-ssl --with-kerberos && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr && docker-php-ext-install mcrypt zip imap soap pdo_odbc bz2 calendar exif gettext pcntl sockets wddx iconv curl && pecl install imagick apcu-4.0.11 && docker-php-ext-enable imagick apcu # buildkit
RUN /bin/sh -c echo $TZ > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && echo date.timezone = $TZ > /usr/local/etc/php/conf.d/docker-php-ext-timezone.ini # buildkit
RUN /bin/sh -c echo "opcache.memory_consumption=128\n opcache.interned_strings_buffer=8\n opcache.max_accelerated_files=4000\n opcache.revalidate_freq=60\n opcache.fast_shutdown=1\n opcache.enable_cli=1" > /usr/local/etc/php/conf.d/opcache-recommended.ini # buildkit
RUN /bin/sh -c apt-get install --no-install-recommends --assume-yes --quiet ca-certificates curl git unzip && rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c apt-get update && apt-get install -y libapache2-mod-security2 && cp /etc/modsecurity/modsecurity.conf-recommended /etc/modsecurity/modsecurity.conf && sed -i 's/SecRuleEngine DetectionOnly/SecRuleEngine On/' /etc/modsecurity/modsecurity.conf # buildkit
RUN /bin/sh -c rm -rf /etc/modsecurity/crs && git clone --depth=1 --branch v3.3.4 https://github.com/coreruleset/coreruleset.git /etc/modsecurity/crs && cp /etc/modsecurity/crs/crs-setup.conf.example /etc/modsecurity/crs/crs-setup.conf && echo "Include /etc/modsecurity/crs/crs-setup.conf" >> /etc/apache2/mods-enabled/security2.conf && echo "Include /etc/modsecurity/crs/rules/*.conf" >> /etc/apache2/mods-enabled/security2.conf # buildkit
RUN /bin/sh -c rm /etc/modsecurity/crs/rules/REQUEST-922-MULTIPART-ATTACK.conf # buildkit
COPY security2.conf /etc/apache2/mods-available/ # buildkit
RUN /bin/sh -c a2enmod security2 # buildkit
RUN /bin/sh -c a2enmod remoteip # buildkit
RUN /bin/sh -c sed -i 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' /etc/apache2/apache2.conf # buildkit
RUN /bin/sh -c echo "ServerTokens Prod" >> /etc/apache2/conf-available/security.conf && echo "ServerSignature Off" >> /etc/apache2/conf-available/security.conf && a2enconf security # buildkit
RUN /bin/sh -c systemctl restart apache2 || apachectl restart || true # buildkit
Details
Container
2025-04-03 18:21:09 +07:00
68
OCI / Docker
linux/amd64
266 MiB
Versions (14) View all
8.1.33-cron-sis 2025-11-07
8.1.32 2025-11-06
7.4.33gd 2025-11-02
7.4.33up 2025-10-24
8.1.33cron 2025-08-06