Sign inSign up

anubhavgicpl/phponsteriods

By anubhavgicpl

•Updated almost 2 years ago

A Arch Linux is the base image used here kindly make sure your familiar with it.

Image
Languages & frameworks
0

1.5K

anubhavgicpl/phponsteriods repository overview

⁠PHP on Steroids

A security-hardened PHP Docker image collection, forked from nubs/php-minimal with enhanced security features and modern Docker practices.

Docker Pulls Docker Stars Latest Version

⁠Overview

This Docker image provides a security-focused PHP environment with carefully configured restrictions and optimizations. It's designed for running PHP applications in production with enhanced security controls.

⁠Security Features
  • Restricted PHP Functions:
    • Disabled: system, shell_exec, passthru, proc_open, popen, ini_set
    • Prevents common command execution vulnerabilities
  • Resource Controls:
    • Memory limit: 1MB (configurable)
    • CPU usage restrictions
    • Execution time limits
  • Security Hardening:
    • Error display disabled (logged instead)
    • URL and file opening disabled
    • Non-root user execution
    • Minimal extension set

⁠Quick Start

# Pull the latest version
docker pull anubhavgicpl/phponsteriods

# Run with basic configuration
docker run -d --security-opt=no-new-privileges \
    --cpu-quota=50000 \
    --memory=128m \
    anubhavgicpl/phponsteriods

⁠Docker Compose Usage

version: '3.8'

services:
  php:
    image: anubhavgicpl/phponsteriods:latest
    security_opt:
      - no-new-privileges
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 128M
    volumes:
      - ./app:/var/www/html:ro

⁠Security Configuration

⁠Custom PHP Configuration

You can override the default security settings by mounting your own php.ini:

docker run -v ./custom-php.ini:/usr/local/etc/php/php.ini:ro anubhavgicpl/phponsteriods
⁠Permission Management

The container runs as non-root (UID 1000). When using volume mounts, ensure proper permissions:

# Set correct permissions on host
chown -R 1000:1000 ./app
chmod -R g+w ./app

⁠Available Tags

  • latest: Current stable version
  • x.y.z: Specific version releases
  • Check Docker Hub⁠ for all available tags

⁠Migration from nubs/php-minimal

If you're migrating from nubs/php-minimal, note these changes:

  • Enhanced security defaults
  • Updated base images
  • Modern Docker best practices
  • Additional security features

⁠Security Reporting

For security issues, please email [[email protected]⁠].

⁠License

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

⁠Credits

Original work by nubs/php-minimal⁠

Tag summary

Content type

Image

Digest

sha256:63e02d5ac…

Size

629.9 MB

Last updated

almost 2 years ago

docker pull anubhavgicpl/phponsteriods:7.0.15