Docker Template Stack PHP

A DTS container for PHP projects

View project on GitHub

PHP Development - Docker & Swarm Container

MIT License Commercial Services Available

Introduction

This is a template Docker development and Swarm container for PHP developers. To get started with this container for your PHP project (including Composer and PHPUnit), see the quick setup reference.

  1. Debian container with Apache, PHP, PHP-FPM (CGI gateway), PHPUnit, Symfony, and Codeception (TODO: AddOn)
  2. Instructions for adding additional PHP versions
  3. Instructions for creating a development container - Use this to create and start a local container for development and testing.
  4. Instructions for configuring PHP debugging (Xdebug)
  5. Instructions for creating an optional Swarm, which involves:
  • Install Multipass (see Multipass)
  • Create multiple virtual machines with Multipass (required for the swarm)
  • Initialize the swarm and define VMs as Docker Manager or Docker Worker nodes
  • Create a Docker image for the swarm
  • Publish the image to a registry (Docker Hub)
  • Deploy the swarm service (pulling the image from Docker Hub)

You can use this container to develop your PHP based application, a simple sample application is available in the directory: \ApachePHPWebService\app. Or use it to test the docker swarm functionality.

For the first stable release, use the release/1.0 template branch

Where to Start

More documents can be found in the Howtos directory. It contains:

  1. How to create a development container - Set up your local development environment
  2. How to create a Swarm - Deploy multiple container instances
  3. How to install other PHP versions - Add alternative PHP versions
  4. How to configure debugging - Set up Xdebug and debugging tools
  5. Document root adjustments in: /usr/local/apache2/conf/extra/httpd-vhosts.conf

License
This file is part of: PHP Development Template Stack Copyright (c) 2025-2026 Nico Jan Eelhart.This repository is MIT licensed and free to use. For optional commercial support, customization, training, or long-term maintenance, see COMMERCIAL.md.



─── ✦ ───

Home Sites
















Maintained by NicoJanE. Generated by GitHub Pages.