Sign inSign up

infraunnes/php-fpm

By infraunnes

•Updated 4 months ago

PHP-FPM Stack developed by Infra UNNES https://unnes.ac.id/ictcenter

Image
Web servers
0

9.1K

infraunnes/php-fpm repository overview

⁠Docker Hub Repository Overview: Alpine Linux with PHP and PHP-FPM

Repository Name: infraunnes/php-fpm:8.4-alpine

Description:

This Docker image provides a lightweight Alpine Linux environment with PHP and PHP-FPM, suitable for running PHP applications. It includes essential PHP extensions and tools for development and deployment.

Key Features:

  • Alpine Linux Base: Minimal image size for efficient resource utilization.
  • PHP: Uses the latest PHP available in the alpine edge repository.
  • PHP-FPM: FastCGI Process Manager for high-performance PHP execution.
  • Essential PHP Extensions: Includes common extensions like curl, gd, mysqli, mbstring, zip, xml, and json.
  • Development Tools: Contains tools like git, curl, wget, make, rsync, nano, and mysql-client.
  • Composer: Pre-installed Composer for dependency management.
  • Tini: Process supervisor for proper signal handling.
  • Multi-Platform Support: Built with docker buildx for multi-architecture compatibility (amd64, arm64).

Usage:

  1. Pull the Image:

    docker pull infraunnes/php-fpm:8.4-alpine
    
  2. Run a Container:

    docker run -d -p 80:80 infraunnes/php-fpm:8.4-alpine
    
  3. Mount your application:

    docker run -d -p 80:80 -v /path/to/your/app:/var/www infraunnes/php-fpm:8.4-alpine
    
    • Replace /path/to/your/app with the local path to your PHP application.
  4. Access your application:

    Open your web browser and navigate to http://localhost.

Dockerfile Breakdown:

  • Base Image: alpine:edge provides a minimal Alpine Linux environment.
  • Dependencies: Installs essential PHP packages, extensions, and development tools using apk.
  • Composer Installation: Downloads and installs Composer using curl and php.
  • rootfs: Copies the application code from the rootfs directory into the container's root directory.
  • ENTRYPOINT: Sets tini as the entry point for proper process management.
  • CMD: Starts PHP-FPM in foreground mode.
  • EXPOSE: Exposes port 80 for HTTP access.
  • WORKDIR: Sets the working directory to /var/www.

Customization:

  • To install additional PHP extensions, add apk add php-<extension-name> to the Dockerfile.
  • To customize PHP-FPM settings, modify the www.conf file and copy it into the container.
  • To install nginx, add nginx to the apk add command, and add a nginx.conf file to the rootfs folder.

Tag summary

Content type

Image

Digest

sha256:d6b499434…

Size

82.1 MB

Last updated

4 months ago

docker pull infraunnes/php-fpm:8.5-alpine