Image Overview

Public PHP Image vs. Minimus Hardened PHP Image

PHP Image Overview

A PHP image packages the PHP runtime (Zend Engine), SAPI binaries (FPM, CLI), core extensions (PDO, mbstring, openssl), configuration files (php.ini, opcache settings) and commonly required system libraries; Composer is often available in build variants for dependency installation.

In containerized production it is typically run as PHP-FPM behind a web proxy or as a CLI worker for queues and scheduled jobs; teams layer application code and environment-specific config on top and rely on the image for consistent runtime behavior across deployments.

Teams evaluate a PHP hardened image in secure or regulated environments to reduce attack surface and improve auditability: hardened builds remove compilers and unnecessary packages, enforce non-root execution, restrict enabled PHP functions, apply timely CVE patches, and provide reproducible, signed artifacts for compliance.

Minimus PHP Image

CIS
NIST
FIPS 140-3
STIG

The Minimus PHP image differs from typical PHP container images by being built from scratch with only the essential components—runtime, required extensions and minimal init—rather than layering a full OS distribution and package manager. That design yields a reduced attack surface and produces an image that is faster, lighter, and easier to maintain for engineers who need predictable, minimal runtime environments.

Beyond size and composition, Minimus images are hardened to industry standards like NIST SP 800-190 and CIS Benchmarks; the Minimus hardened PHP image applies secure defaults, tightened filesystem permissions, runtime hardening and minimized tooling to simplify compliance reviews and reduce operational risk. This focused hardening streamlines maintenance and makes security controls more transparent for security-focused teams.

Get Started

Try the Minimus Hardened PHP Image

Get access to the Minimus platform, with thousands of hardened container images, supply chain protection, native compliance reporting, and seamless integrations to your existing development toolchain.
Secure, Minimal Container Images
Hardened to NIST and CIS standards with FIPS 140-3 and STIG ready images available.

Supply Chain Protection

Defend against malicious packages with advanced heuristic filtration

Custom Image Creation

Create your own hardened images with the packages, files and certs you need. Minimus handles updates automatically.

Get a Demo of Minimus

Just fill out the form, and we'll be in touch to schedule a demo of Minimus with one of our engineers.
Thank you! A member of our team will reach out shortly to schedule a personalized Minimus demo.
Oops! Something went wrong while submitting the form.
Frequently Asked Questions

PHP Container Image FAQ

Answers to common questions about PHP and the Minimus Hardened PHP Image
What is a PHP image?

In container terms, a runtime container image for PHP packages the PHP interpreter with a web server and common extensions, enabling quick deployment of PHP applications.

For production, consider a hardened PHP image to minimize surface area, reduce privileges, and keep dependencies lean.

FROM php:8.1-apache
COPY src/ /var/www/html/
How to display an image in PHP?

To display an image in PHP, embed an HTML <img> tag referencing the file or URL, or serve the image via a PHP script with the proper Content-Type.

Example:

<img src="images/photo.jpg" alt="Photo">

PHP script to serve image directly:

<?php
$path = 'images/photo.jpg';
header('Content-Type: image/jpeg');
readfile($path);
?>

For production, consider using a hardened PHP image.

What does a PHP file look like?

A PHP file is plain text with a .php extension. It may embed HTML and contain PHP blocks that run on the server. The server processes the PHP code and returns HTML to the client. In a container workflow, you might run code inside a hardened PHP image.

Example:

<?php
echo "Hello, world!";
?>

Notes: In production, configure PHP securely, disable error reporting, and run in a minimal, updated container image.

Can I replace my PHP image with the Minimus Hardened PHP Image?
Yes. The Minimus PHP image contains everything you need to run PHP successfully.
Does Minimus offer FIPS 140-3 images?
Yes, Minimus images are hardened to CIS and NIST standards, with FIPS 140-3 and STIG ready variants available.