Skip to content
/ docker Public

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

License

Notifications You must be signed in to change notification settings

gemvc/docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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.

πŸš€ Quick Start

Choose your preferred server configuration:

Nginx + PHP-FPM

FROM gemvc/docker:nginx-latest

# Copy your application
COPY . /var/www/html

Apache + mod_php

FROM gemvc/docker:apache-latest

# Copy your application
COPY . /var/www/html

OpenSwoole

FROM gemvc/docker:swoole-latest

# Copy your application
COPY . /var/www/html

Alpine (Lightweight)

FROM gemvc/docker:alpine-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
swoole-latest, swoole-php8.2 OpenSwoole configuration ~300MB
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

OpenSwoole Variant

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

Alpine Variant

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

πŸ› οΈ 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

No packages published