Skip to content

PHP development docker images for Anzusystems applications

License

Notifications You must be signed in to change notification settings

anzusystems/docker-php

Repository files navigation

AnzuSystems PHP Development Docker Images by Petit Press a.s. (www.sme.sk)

Main PHP docker images from which all our PHP flavors (versions with base, vipsffmpeg...) are built. It is based on official PHP images using our custom configuration. Additionally, it has preinstalled some libraries (xdebug, libvips, redis, mongodb...). Also contains nginx.


What's inside

  • PHP 8.2
  • PHP 8.3
  • PHP Apcu ext
  • PHP Mongodb ext
  • PHP Redis ext
  • PHP Pcov ext
  • PHP Xdebug ext
  • Redis (client)
  • Supervisor
  • Composer
  • Vipsffmpeg variant:
    • PHP Vips ext
    • FFmpeg
    • LibVips
  • Nginx variant:
    • Nginx
    • Nginx-xslt
    • Nginx-geoip
    • Nginx-image-filter
    • Nginx-njs

See versions in version.conf file.

Special common commands

  • cron-cmd - Cron script wrapper to run command with multiple options
  • create-user - Script to create user with provided UID and GID and fix permissions for folders
  • generate-messenger-supervisor-conf - Script to generate messenger supervisor conf files inside the container
  • start-messenger - Script used to start messenger inside the container

Git Hooks

Setup pre-commit hook:

  • .git/hooks/pre-commit

    #!/bin/bash
    #
    # Run update.sh script before commit
    
    ./update.sh
    git add .github build
    

Auto-generation

Script:

./update.sh

This script has to be run before every commit.

Script is used to autogenerate following files/folders:

  • build/phpXY/cli/ - autogenerated from:
    • config/all/
    • config/all-X.Y/
    • template.Dockerfile
    • variant-*.Dockerfile
    • versions.conf
  • build/phpXY/fpm/ - autogenerated from:
    • config/all/
    • config/all-X.Y/
    • config/fpm/
    • config/fpm-X.Y/
    • config/fpm-nginx/
    • template.Dockerfile
    • variant-*.Dockerfile
    • versions.conf
  • .github/workflows/docker.yml - autogenerated from:
    • docker.yml.template
    • docker.yml.job.template

Do not change autogenerated files/folders directly.