Sign inSign up

riptidepy/php

By riptidepy

•Updated about 15 hours ago

PHP scripting language - based on official images - optimized for developers

Image
0

10K+

riptidepy/php repository overview

⁠Quick reference

⁠What is php?

php images based on the official PHP images⁠.

These images work like their official counterpart, but:

  • They include the following PHP extensions (additional may be installed by default, depending on PHP version):
    • bcmath
    • bz2
    • ctype
    • exif
    • ftp (excluded from Php 8.2.15+)
    • gd
    • iconv
    • intl
    • json
    • mbstring
    • mysqli
    • opcache
    • pcntl
    • pdo_mysql
    • session
    • simplexml
    • soap
    • sockets
    • tokenizer
    • xdebug 3 (not loaded by default & and controlled via XDEBUG_CONFIG, see below)
    • xsl
    • yaml
  • They include the following tools for developing with common PHP applications and Frameworks
  • msmtp is installed by default to be used with a mailcatcher. It is configured in the php.ini but no msmtprc file is present. If you want to use msmtp, create an "/etc/msmtprc".
  • Includes an SSH client
  • Includes Git

Xdebug is not loaded by default for performance reasons. If you want to enable Xdebug, add the following lines to the file /usr/local/etc/php/conf.d/xdebug.ini via a new image or mount:

zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_autostart=off

This image is meant for developers using PHP. If you are missing any extensions or tools, be sure to open a pull request⁠.

⁠How to use this image.

See the description of the official PHP images⁠. The directory used for app sources is /src, not /usr/src!

This image is meant to be used with Riptide⁠. Using it without Riptide is probably possible, but not supported.

⁠Basic Usage with Riptide

A simple PHP app that uses the apache variant to run an Apache web-server:

app:
  name: php-demo
  services:
    php_demo:
      image: riptidepy/php:7.3-apache
      environment:
        APACHE_RUN_USER: '#{{ os_user() }}'
        APACHE_RUN_GROUP: '#{{ os_group() }}'
      port: 80
      run_as_current_user: false
      roles:
        - main
        - src

For all image variants, expect for apache:

  • This image supports run_as_current_user: true for services (this is the default).

For the apache image variant:

  • This image only supports run_as_current_user: false for services. To run the image with the user controlling riptide, instead of the image user, provide the APACHE_RUN_USER and APACHE_RUN_GROUP environment variables, as shown in the example above.

⁠Basic Usage with Docker Run

See the description of the official PHP images⁠.

⁠Environment Variables

NameRequiredExample Value(s)Description
APACHE_RUN_USERsee desc.#1000 / #{{ os_user() }} (Riptide)(apache only) ID of the user that Apache should switch to
APACHE_RUN_GROUPsee desc.#1000 / #{{ os_group() }} (Riptide)(apache only) ID of the group that the main command should switch to
XDEBUG_CONFIGnoclient_host={{ host_address() }}Xdebug configuration⁠
XDEBUG_CONFIGnoserverName=riptide-{{ name }}'PhpStorm path mapping key⁠

More environment variables may be provided by PHP, PHP-FPM, Apache or the PHP extensions.

⁠Volumes

  • /src: Source code

⁠Image Variants

See the description of the official PHP images⁠. Only variants for FPM, CLI and Apache are provided. Only variants based on Debian trixie are provided.

Tag summary

Content type

Image

Digest

sha256:526815c73…

Size

276.6 MB

Last updated

about 15 hours ago

docker pull riptidepy/php