PHP is a general-purpose scripting language geared towards web development.
10K+
ubuntu/php is a rock for PHP maintained by Canonical.
PHP is a general-purpose scripting language well-suited for Web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
NOTE: These tags follow a specific naming convention that respects the concept of channels.
| Tags | Supported until | Version | Base | Architectures | |
|---|---|---|---|---|---|
8.3-24.04_stable | aliases8.3-24.04, 8.3-24.04_beta, 8.3-24.04_candidate, 8.3-24.04_edge | 05/2029 | 8.3 | 24.04 | s390x, amd64, ppc64le, arm64 |
8.5-26.04_edge | aliases8.5-26.04_edge | 05/2031 | 8.5 | 26.04 | ppc64le, amd64, arm64, s390x |
| Tags | Support ended on | Upgrade Path | |
|---|---|---|---|
8.4-25.04_stable | aliases8.4-25.048.4-25.04_beta8.4-25.04_candidate8.4-25.04_edge | 01/2026 | - |
8.4-25.10_edge | aliases8.4-25.10_edge | 07/2026 | - |
This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.
To view the Pebble services and checks defined in this rock:
docker run --rm ubuntu/php:8.4-25.04_stable plan
To run this rock, use any of the usual container runtimes, for example, docker:
docker run --name php-container \
ubuntu/php:8.4-25.04_stable \
exec php <args>
PHP will execute any given instruction, for example running php code from input:
docker run --rm ubuntu/php:8.3-24.04_edge exec php -r "echo 'hello, world! In PHP!';"
Or setting up a php server for development purposes:
docker run -d --rm --name php-container -p 8080:8080 -v /my-app:/app ubuntu/php:8.3-24.04_edge exec php -S 0.0.0.0:8080 -t /app
A list of all the available options can be queried by running the image with the -h switch.
To view the logs of the running container, run:
docker exec php-container pebble logs
Or, for a specific service:
docker exec php-container pebble logs <service>
Rocks may have predefined health checks that you can list by running:
docker exec php-container pebble checks
The overall health of your container can be inspected via:
docker exec php-container pebble health
Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with Canonical’s IP Policy.
Content type
Image
Digest
sha256:62fce6a19…
Size
16.6 MB
Last updated
2 days ago
docker pull ubuntu/php:8.5-26.04_edgePulls:
359
Last week