Sign inSign up

saintfrater/php8-3-custom

By saintfrater

•Updated about 4 hours ago

A custom debian 13 Trixie Apache+PHP setup

Image
Languages & frameworks
0

3.7K

saintfrater/php8-3-custom repository overview

⁠Custom Image: PHP 8.3 with Apache (Debian Trixie)

This document describes the specifics of a custom Docker image used for deploying a PHP web application using Apache on Debian Trixie.

Starting on 26-08-2025, this image will using "Debian Trixie" branch as source.

⁠Base Image

The image is based on the official PHP Docker image⁠: php:8.x.xx-apache-trixie

The Image is following the "main" tag 8.3 instead of a specific version (eg. 8.3.23)

⁠actual PHP version

  • PHP version 8.3
  • Apache web server
  • Debian Trixie as the base OS

⁠Automatic Update

This image is automatically rebuild at 3am, and pushed if update is available

⁠Include support for

  • image manipulation (GD)
  • compression (zip)
  • mysqli/pdo_mysql
  • opcache

⁠Apache Modules

core, mod_so, mod_watchdog, http_core, mod_log_config, mod_logio, mod_version, mod_unixd, mod_access_compat, mod_alias, mod_auth_basic, mod_authn_core, mod_authn_file, mod_authz_core, mod_authz_host, mod_authz_user, mod_autoindex, mod_deflate, mod_dir, mod_env, mod_filter, mod_mime, prefork, mod_negotiation, mod_php, mod_reqtimeout, mod_rewrite, mod_setenvif, mod_status,

⁠System Update & Required Packages

The image includes a system update and the installation of libraries required for GD and other extensions:

⁠Docker Compose Example

Here is a sample docker-compose.yml service configuration for this image:

services:
  php-apache:
    container_name: saintfrater/php8-3-custom:latest
    ports:
      - 80:80
    tty: true
    stdin_open: true
    volumes:
      - public:/var/www/html

volumes:
  public:

⁠Quick MariaDB - PhpMyAdmin - Apache/PHP stack

I do recommend to use a ''separate'' reverse proxy (like NPNPlus⁠, caddy⁠ or Traefik⁠)

services:
  # Web Server
  webserver:
    image: saintfrater/php8-3-custom:latest

    container_name: app-webserver
    restart: unless-stopped
    
    # I strongly suggest to use a separate reverse proxy to handle https & public facing
    ports:
   		- 80:80
    tty: true
    stdin_open: true
    volumes:
      - public:/var/www/html
    environment:
      - TZ=Europe/Brussels
    depends_on:
      - db
    networks:
      # if you're using reverse proxy, comment "net_frontend" and add your reverse proxy to the "net_backend"
      - net_frontend
      - net_backend
          
  # MySQL Server
  db:
    image: mariadb:latest
    container_name: app-db
    restart: unless-stopped
    environment:
    	# update with YOUR requiered db informations
      - MYSQL_DATABASE=my-application-db
      
      # So you don't have to use root, but you can if you like
      - MYSQL_USER=my-app-user
      
      # You can use whatever password you like
      - MYSQL_PASSWORD=my-app-pwd
      
      # Password for root access
      - MARIADB_ROOT_HOST=%
      - MARIADB_ROOT_PASSWORD=[PLEASE CHANGE ME]
      
      - TZ=Europe/Brussels
    volumes:
      - db:/var/lib/mysql
    networks:
			- net_backend
      
  # comment section for disabling phpmyadmin when not requiered
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: app-phpmyadmin
    environment:
      - TZ=Europe/Brussels
      - PMA_HOST=app-db
      - PMA_PORT=3306
      - PMA_USER=root
      - PMA_PASSWORD=[PLEASE CHANGE ME]

    # I strongly suggest to use "custom location" or dedicated hostname on revert proxy instead of exposing this service
    ports:
      - '8080:80'

    depends_on:
      - app-db

    networks:
      # if you're using reverse proxy, comment "net_frontend" and add your reverse proxy to the "net_backend"
      - net_backend
      - net_frontend

volumes:
  db:
  public:
  
networks:
 	# if you're using reverse proxy, comment "net_frontend" and add your reverse proxy to the "net_backend"
	- net_frontend
	- net_backend

⁠Full Stack with Integrated IDE & Reverse Proxy

services:

  # Web Server  
  webserver:
    image: saintfrater/php8-3-custom:latest

    container_name: proj01-webserver
    restart: unless-stopped
    
    tty: true
    stdin_open: true
    volumes:
      - public:/var/www/html
      
    environment:
      - TZ=Europe/Brussels
      
    depends_on:
      - db
    
    networks:
      - server
      - backend
 
  # MariaDB Server  
  db:
    image: mariadb:latest
    container_name: proj01-db
    restart: unless-stopped
    
    environment:
      # update with YOUR requiered db informations
      - MARIADB_DATABASE=__YOUR_DATABASE_NAME__
 
      # So you don't have to use root, but you can if you like
      - MARIADB_USER=__YOUR_APPLICATION_USER__
 
      # You can use whatever password you like
      - MARIADB_PASSWORD=__YOUR_APPLICATION_DB_PASSWORD__
 
      # Password for root access
      - MARIADB_ROOT_HOST=localhost
      - MARIADB_ROOT_PASSWORD=__YOUR_DB_ROOT_PASSWORD__
      
    volumes:
      - db:/var/lib/mysql
      
    networks:
      - backend

	# phpMyAdmin
	
  phpmyadmin:
    image: phpmyadmin
    container_name: proj01-phpmyadmin
    restart: unless-stopped
    
    environment:
      - TZ=Europe/Brussels
      - 
      # define the SQL host name & connection port
      - PMA_HOST=proj01-db
      - PMA_PORT=3306
      # credentials for connection
      - PMA_USER=__YOUR_APPLICATION_USER__ or root
      - PMA_PASSWORD=__YOUR_APPLICATION_DB_PASSWORD__ or __YOUR_DB_ROOT_PASSWORD__

    depends_on:
      - db
      
    networks:
      - server
      - backend

  # webIDE
  theia:
    image: ghcr.io/eclipse-theia/theia-ide/theia-ide:latest
    container_name: proj01-ide
    restart: unless-stopped
    
    volumes:
      # shared volume
      - public:/home/project
      # dedicated IDE volume
      - theia-data:/home/theia
    
    networks:
      - servers

  # NGINX Proxy Manager
  proxy:
    image: jc21/nginx-proxy-manager:2.12.3
    container_name: proj01-proxy
    restart: unless-stopped
    ports:
      - 80:80
      - 81:81
      - 443:443
      - 3000:3000

    volumes:
      - npm-data:/data
      - npm-letsencrypt:/etc/letsencrypt
    
    networks:
      - servers
      
volumes:
  db:
  public:
  theia-data:
  npm-data:
  npm-letsencrypt:
  
networks:
  server:
    external: true
  backend:
    driver: bridge

See https://wiki.nox-rhea.org/tutoriaux/docker-related/docker-apache-php-mysql-ide-proxy⁠ for detailed explanation (in french)

⁠Notes

  • This image is suitable for production setups requiring PHP 8.3 and Apache (highly recommended to use frontend proxy).
  • Ensure your application files are stored in the public volume.

Tag summary

Content type

Image

Digest

sha256:bcac2f307…

Size

207.3 MB

Last updated

about 4 hours ago

docker pull saintfrater/php8-3-custom