Sign inSign up

asclinux/linuxforphp-8.1-ultimate

By asclinux

•Updated over 6 years ago

A Linux base image that makes it easy to compile and/or use any version of PHP.

Image
2

1.4K

asclinux/linuxforphp-8.1-ultimate repository overview

This 'Linux for PHP Ultimate' base image is based on asclinux/linuxforphp-8.1:composer and contains all the software and libraries that are necessary to successfully COMPILE ('src' tag) and/or USE (version number tags) any version of PHP, with all compilation options.

User root's password: toor

⁠Running a pre-compiled version of PHP (7.3.4) in Docker's detached mode:
$ docker run -dit \
-v ${PWD}/:/srv/www \
-p 80:80 \
-p 443:443 \
-p 3306:3306 \
asclinux/linuxforphp-8.1-ultimate:7.3-nts \
lfphp
⁠Another example usage:
$ docker run --rm -it asclinux/linuxforphp-8.1-ultimate:src /bin/bash

On the container's CLI:

$ cd 
$ wget -O php-7.3.4.tar.xz http://php.net/get/php-7.3.4.tar.xz/from/this/mirror
$ tar -xvf php-7.3.4.tar.xz
$ cd php-7.3.4
$ ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--datadir=/usr/share/php \
--mandir=/usr/share/man \
--enable-fpm \
--with-fpm-user=apache \
--with-fpm-group=apache \
--with-config-file-path=/etc \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-dba=shared \
--with-gdbm \
--with-gmp \
--enable-ftp \
--with-gettext=/usr \
--enable-mbstring \
--enable-pcntl \
--with-pspell \
--with-readline \
--with-snmp \
--with-mysql-sock=/run/mysqld/mysqld.sock \
--with-curl \
--with-openssl \
--with-openssl-dir=/usr \
--with-mhash \
--enable-intl \
--with-sodium=/usr \
--with-libxml-dir=/usr \
--with-libdir=/lib64 \
--enable-sockets \
--enable-libxml \
--enable-soap \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-freetype-dir=/usr \
--enable-exif \
--with-xsl \
--with-xmlrpc \
--with-pgsql \
--with-pdo-mysql=/usr \
--with-pdo-pgsql \
--with-mysqli \
--with-mssql \
--with-pdo-dblib \
--with-ldap \
--with-ldap-sasl \
--enable-shmop \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--with-tidy \
--enable-wddx \
--with-libexpat-dir \
--with-enchant \
--with-imap=/usr/local/imap-2007f \
--with-imap-ssl=/usr/include/openssl \
--with-kerberos=/usr/include/krb5 \
--enable-zip \
--enable-opcache
$ make
$ make test
$ make install
$ php -v
$ install -v -m644 php.ini-production /etc/php.ini
$ mv -v /etc/php-fpm.conf{.default,}
$ install -v -m755 -d /usr/share/doc/php-7.3.4
$ install -v -m644 CODING_STANDARDS EXTENSIONS INSTALL NEWS README* UPGRADING* php.gif \
$ /usr/share/doc/php-7.3.4
$ ln -v -sfn /usr/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt \
$ /usr/share/doc/php-7.3.4
$ ln -v -sfn /usr/lib/php/doc/Structures_Graph/docs \
$ /usr/share/doc/php-7.3.4
$ cp -v /etc/php-fpm.d/www.conf.default /etc/php-fpm.d/www.conf
$ sed -i 's@php/includes"@&\ninclude_path = ".:/usr/lib/php"@' \
$ /etc/php.ini
$ sed -i -e '/proxy_module/s/^#//' \
$ -e '/proxy_fcgi_module/s/^#//' \
$ /etc/httpd/httpd.conf
$ echo \
$ '#ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1' >> /etc/httpd/httpd.conf
$ sed -i 's/#LoadModule rewrite_module/LoadModule rewrite_module/' /etc/httpd/httpd.conf
$ sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/httpd.conf
$ sed -i 's/DirectoryIndex index.html/DirectoryIndex index.php index.html/' /etc/httpd/httpd.conf
$ cat >>/etc/httpd/httpd.conf << 'EOF'

<Proxy "fcgi://127.0.0.1:9000">

ProxySet min=0

ProxySet timeout=1800

</Proxy>

<FilesMatch .php$>

# 2.4.10+ can proxy to unix socket

# SetHandler "proxy:unix:/run/php-fpm.sock|fcgi://localhost/"

# Else we can just use a tcp socket:

SetHandler "proxy:fcgi://127.0.0.1:9000"

</FilesMatch>

EOF

$ /etc/init.d/mysql start
$ /usr/sbin/php-fpm &
$ /etc/init.d/httpd start

You would then be able to run your PHP scripts on the CLI or through the included Apache server.

⁠Another example usage:
$ docker run --rm -it \
-v ${PWD}/:/srv/www \
-p 80:80 \
-p 443:443 \
-p 3306:3306 \
asclinux/linuxforphp-8.1-ultimate:src \
/bin/bash

On the container's CLI:

$ cd
$ lfphp-compile 7.3.4 zts
$ php -v
⁠Additional information

List of installed software/libraries:

  • Acl (2.2.52)
  • Alsa-lib (1.1.4.1)
  • Apache (2.4.27)
  • Apr (1.6.2)
  • Apr-Util (1.6.0)
  • Aspell (0.60.6.1)
  • Attr (2.4.47)
  • Autoconf (2.69)
  • Automake (1.15)
  • Bash (4.3.30)
  • Bc (1.06.95)
  • Berkeley DB (6.2.32)
  • Binutils (2.27)
  • Bison (3.0.4)
  • Bzip2 (1.0.6)
  • c-ares (1.12.0)
  • Certificate Authority Certificates
  • Check (0.10.0)
  • CMake (3.9.1)
  • CPIO (2.12)
  • Coreutils (8.25)
  • Cups (2.2.4)
  • cURL (7.55.1)
  • Cyrus-SASL (2.1.26)
  • DejaGNU (1.6)
  • DHCP Client (4.3.6)
  • Diffutils (3.5)
  • Docbook-xml (4.5)
  • Docbook-xsl (1.79.1)
  • Doxygen (1.8.15)
  • Eudev (3.2)
  • E2fsprogs (1.43.1)
  • Enchant (1.6.0)
  • Exim (4.89.1)
  • Expat (2.2.0)
  • Expect (5.45)
  • File (5.28)
  • Findutils (4.6.0)
  • Flex (2.6.1)
  • Fontconfig (2.12.4)
  • FreeTDS (1.00.112)
  • FreeType (2.8)
  • Gawk (4.1.3)
  • GCC (6.2.0)
  • GDBM (1.12)
  • Gettext (0.19.8.1)
  • Giflib (5.1.4)
  • Git (2.14.1)
  • Glib (2.60.1)
  • Glibc (2.24)
  • GMP (6.1.1)
  • GnuTLS (3.5.14)
  • Gperf (3.0.4)
  • Grep (2.25)
  • Groff (1.22.3)
  • GRUB (2.02~beta3)
  • Gzip (1.8)
  • Iana-Etc (2.30)
  • icu4c (59.1)
  • IMAP-Cclient (2007f)
  • Inetutils (1.9.4)
  • Intltool (0.51.0)
  • IPRoute2 (4.7.0)
  • Kbd (2.0.3)
  • Kerberos5 (1.17)
  • Kmod (23)
  • Less (481)
  • LFS-Bootscripts (20150222)
  • libarchive (3.3.2)
  • Libcap (2.25)
  • libevent (2.1.8)
  • libexif (0.6.21)
  • libffi (3.2.1)
  • libgd (2.2.4)
  • libjpeg-turbo (1.5.2)
  • libmcrypt (2.5.8)
  • libnghttp2 (1.32.0)
  • Libpipeline (1.4.1)
  • libpng (1.6.31)
  • libsodium (1.0.15)
  • libtasn (1-4.12)
  • Libtool (2.4.6)
  • libunistring (0.9.7)
  • libxml (2-2.9.4)
  • libxslt (1.1.29)
  • libzip (1.6.1)
  • Linux (4.7.2) - Kernel is NOT installed in this Docker image!
  • LZO (2.10)
  • M4 (1.4.17)
  • Make (4.2.1)
  • Man-DB (2.7.5)
  • Man-pages (4.07)
  • MariaDB (10.2.8)
  • mcrypt (2.6.8)
  • meson (0.50.1)
  • mhash (0.9.9.9)
  • MongoDB (3.6.8)
  • MPC (1.0.3)
  • MPFR (3.1.4)
  • MSMTP (1.8.4)
  • Ncurses (6.0)
  • Nettle (3.3)
  • Net-SNMP (5.8)
  • nginx (1.13.12)
  • Ninja (1.9.0)
  • Node.js (10.7.0)
  • oniguruma (6.9.5)
  • OpenJDK (1.8.0.141)
  • OpenLDAP (2.4.45)
  • OpenSSH (8.0p1)
  • OpenSSL (1.0.2l)
  • p11-kit (0.23.8)
  • Patch (2.7.5)
  • PCRE (8.41)
  • Perl (5.24.0)
  • PHP (5.6.40, 7.0.33, 7.1.33, 7.2.27, 7.3.14, 7.4.2, and 8.0.0dev)
  • Pkg-config (0.29.1)
  • PostgreSQL (9.6.4)
  • Procps (3.3.12)
  • Psmisc (22.21)
  • Python (2.7.13)
  • Python (3.6.2)
  • rabbitmq-client (0.9.0)
  • re2c (1.1.1)
  • Readline (6.3)
  • Redis (5.0.4)
  • Rsync (3.1.3)
  • Ruby (2.4.1)
  • runit (2.1.2)
  • runit-docker (1.1.0)
  • Sed (4.2.2)
  • SGML-common (0.6.3)
  • Shadow (4.2.1)
  • SQLite (3.20.0)
  • Sysklogd (1.5.1)
  • Sysvinit (2.88dsf)
  • Tar (1.29)
  • Tcl (8.6.7)
  • Texinfo (6.1)
  • Tidy-HTML5 (5.4.0)
  • Time Zone Data (2016f)
  • Udev-lfs Tarball (udev-lfs-20140408)
  • UnZip (6.0)
  • Util-linux (2.28.1)
  • Vim (7.4)
  • Wget (1.19.1)
  • Which (2.21)
  • XML::Parser (2.44)
  • Xorg Libraries 7
  • Xz Utils (5.2.2)
  • yasm (1.3.0)
  • Zip (3.0)
  • Zlib (1.2.8)
⁠Have a lot of fun!

ASCLinux, Linux for PHP and the Linux for PHP logo are registered trademarks.

Tag summary

Content type

Image

Digest

Size

883.9 MB

Last updated

over 6 years ago

docker pull asclinux/linuxforphp-8.1-ultimate:8.0dev-nts