Official Docker images for GEMVC Framework providing optimized, ready-to-use environments for development and production.
Choose your preferred server configuration:
FROM gemvc/docker:nginx-latest
# Copy your application
COPY . /var/www/htmlFROM gemvc/docker:apache-latest
# Copy your application
COPY . /var/www/htmlFROM gemvc/docker:swoole-latest
# Copy your application
COPY . /var/www/htmlFROM gemvc/docker:alpine-latest
# Copy your application
COPY . /var/www/html| 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 |
- β PDO (MySQL, PostgreSQL)
- β Redis
- β OpCache
- β Composer
- β OpCache configured for production
- β PHP-FPM tuned for high performance
- β Nginx/Apache optimized configurations
- β Memory limits adjusted for modern applications
- β Production-hardened configurations
- β Regular security updates
- β Minimal attack surface
- β Built-in health checks
- β Ready-to-use environments
- β Consistent across team
- β Standard port mappings
- β Clear documentation
- PHP 8.2
- Composer
- PDO Extensions (MySQL, PostgreSQL)
- Redis Extension
- OpCache
- Essential PHP Extensions
- Health Check Support
- Production Configurations
- Nginx latest stable
- PHP-FPM optimized
- Upload limit: 64MB
- Max execution time: 30s
- Memory limit: 256MB
- Apache 2.4
- mod_php configured
- .htaccess support
- URL rewriting enabled
- Security rules included
- OpenSwoole latest
- Event-driven architecture
- High-performance server
- WebSocket support
- Coroutine support
- Alpine Linux base
- Minimal image size
- Same features as Nginx
- Optimized for CI/CD
# 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-latestversion: '3.8'
services:
app:
image: gemvc/docker:nginx-latest
ports:
- "80:80"
volumes:
- ./:/var/www/html
environment:
- PHP_MEMORY_LIMIT=256M
- UPLOAD_MAX_FILESIZE=64MFROM 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| 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 |
| Path | Purpose |
|---|---|
/var/www/html |
Application files |
/etc/nginx/sites-available |
Nginx configuration |
/usr/local/etc/php/conf.d |
PHP configuration |
All images include automatic health checks:
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost/ || exit 1opcache.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- Regular security updates
- Minimal base images
- No development tools in production
- Proper file permissions
- Security-focused configurations
# 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 .- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π« Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: GEMVC Docs
- GEMVC Framework Team
- Docker Community
- OpenSwoole Team
- PHP Community
Built with β€οΈ by the GEMVC Team