Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gemvc/docker

Repository files navigation

GEMVC Docker Images

Docker Pulls Docker Stars GitHub License

Official Docker images for GEMVC Framework providing optimized, ready-to-use environments for development and production.

New Mac developer variants are published as 1.0.0 for apache-mac, nginx-mac, swoole-mac, and stcms-mac.

πŸš€ Quick Start

Choose your preferred server configuration:

Nginx + PHP-FPM

FROM gemvc/docker:nginx-latest
# Copy your application
COPY . /var/www/html

Nginx Mac (Apple Silicon / Mac developer variant)

FROM gemvc/nginx-mac:latest
# Copy your application
COPY . /var/www/html

Apache + mod_php

FROM gemvc/docker:apache-latest
# Copy your application
COPY . /var/www/html

Apache Mac (Apple Silicon / Mac developer variant)

FROM gemvc/apache-mac:latest
# Copy your application
COPY . /var/www/html

OpenSwoole

FROM gemvc/docker:swoole-latest
# Copy your application
COPY . /var/www/html

OpenSwoole Mac (Apple Silicon / Mac developer variant)

FROM gemvc/swoole-mac:latest
# Copy your application
COPY . /var/www/html

Alpine (Lightweight)

FROM gemvc/docker:alpine-latest
# Copy your application
COPY . /var/www/html

STCMS Mac (Apple Silicon / Mac developer variant)

FROM gemvc/stcms-mac:latest
# Copy your application
COPY . /var/www/html

🏷️ Supported Tags

Tag Description Size
nginx-latest, nginx-php8.2 Nginx + PHP-FPM configuration ~400MB
apache-latest, apache-php8.2 Apache + mod_php configuration ~450MB
apache-mac-latest Apache Mac developer variant ~450MB
nginx-mac-latest Nginx Mac developer variant ~400MB
swoole-latest, swoole-php8.2 OpenSwoole configuration ~300MB
swoole-mac-latest OpenSwoole Mac developer variant ~300MB
stcms-mac-latest STCMS Mac developer variant ~520MB
alpine-latest, alpine-php8.2 Lightweight Alpine-based ~200MB

✨ Features

Pre-installed Extensions

  • βœ… PDO (MySQL, PostgreSQL)
  • βœ… Redis
  • βœ… OpCache
  • βœ… Composer

Performance Optimizations

  • βœ… OpCache configured for production
  • βœ… PHP-FPM tuned for high performance
  • βœ… Nginx/Apache optimized configurations
  • βœ… Memory limits adjusted for modern applications

Security

  • βœ… Production-hardened configurations
  • βœ… Regular security updates
  • βœ… Minimal attack surface
  • βœ… Built-in health checks

Development Experience

  • βœ… Ready-to-use environments
  • βœ… Consistent across team
  • βœ… Standard port mappings
  • βœ… Clear documentation

πŸ“¦ What's Included

All Images Include

  • PHP 8.2
  • Composer
  • PDO Extensions (MySQL, PostgreSQL)
  • Redis Extension
  • OpCache
  • Essential PHP Extensions
  • Health Check Support
  • Production Configurations

Variant-Specific Features

Nginx Variant

  • Nginx latest stable
  • PHP-FPM optimized
  • Upload limit: 64MB
  • Max execution time: 30s
  • Memory limit: 256MB

Apache Variant

  • Apache 2.4
  • mod_php configured
  • .htaccess support
  • URL rewriting enabled
  • Security rules included

Apache Mac Variant

  • Mac developer / Apple Silicon friendly naming
  • Same Apache + PHP-FPM optimized runtime
  • Supports multi-arch builds for Linux containers on Mac
  • Ideal for GEMVC backend development on Mac hosts

Nginx Mac Variant

  • Nginx + PHP-FPM for Mac hosts
  • Supports multi-arch builds for Apple Silicon
  • Composer ready with optimized PHP settings
  • Ideal for Mac backend developers

OpenSwoole Variant

  • OpenSwoole latest
  • Event-driven architecture
  • High-performance server
  • WebSocket support
  • Coroutine support

OpenSwoole Mac Variant

  • Apple Silicon-friendly OpenSwoole base image
  • Same performance tuning as standard variant
  • Supports multi-arch builds for Docker on Mac
  • Ideal for iOS/macOS API backend development

Alpine Variant

  • Alpine Linux base
  • Minimal image size
  • Same features as Nginx
  • Optimized for CI/CD

STCMS Mac Variant

  • Apache + PHP 8.2 for STCMS development on Mac
  • APCu caching and production-ready Apache settings
  • Supports multi-arch builds for Docker on Mac
  • Ideal for GEMVC STCMS developers using Apple Silicon

πŸ› οΈ Usage Examples

Basic Usage

# Pull the image
docker pull gemvc/docker:nginx-latest
# Run a container
docker run -d -p 80:80 --name my-gemvc-app gemvc/docker:nginx-latest

With Docker Compose

version: '3.8'
services:
 app:
 image: gemvc/docker:nginx-latest
 ports:
 - "80:80"
 volumes:
 - ./:/var/www/html
 environment:
 - PHP_MEMORY_LIMIT=256M
 - UPLOAD_MAX_FILESIZE=64M

Custom Configuration

FROM gemvc/docker:nginx-latest
# Custom PHP configuration
COPY php.ini /usr/local/etc/php/conf.d/custom.ini
# Custom Nginx configuration
COPY nginx.conf /etc/nginx/sites-available/default
# Your application
COPY . /var/www/html

πŸ”§ Configuration

Environment Variables

Variable Default Description
PHP_MEMORY_LIMIT 256M PHP memory limit
UPLOAD_MAX_FILESIZE 64M Maximum upload size
POST_MAX_SIZE 64M Maximum POST size
MAX_EXECUTION_TIME 30 Script timeout

Volumes

Path Purpose
/var/www/html Application files
/etc/nginx/sites-available Nginx configuration
/usr/local/etc/php/conf.d PHP configuration

🚨 Health Checks

All images include automatic health checks:

HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
 CMD curl -f http://localhost/ || exit 1

πŸ“ˆ Performance Tuning

OpCache Settings

opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1

πŸ”’ Security

  • Regular security updates
  • Minimal base images
  • No development tools in production
  • Proper file permissions
  • Security-focused configurations

πŸ“¦ Building from Source

# Clone the repository
git clone https://github.com/gemvc/docker.git
cd docker
# Build specific variant
cd nginx
docker build -t gemvc/docker:nginx-latest .

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹ Support

✨ Acknowledgements

  • GEMVC Framework Team
  • Docker Community
  • OpenSwoole Team
  • PHP Community

Built with ❀️ by the GEMVC Team

About

Official Docker images for GEMVC Framework with multiple server configurations and optimized environments

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /