php-v8js
PHP 8.4/8.5 with the V8Js extension (Google V8 JavaScript engine) — Debian & Alpine, amd64+arm64.
2.0K
Production-grade Docker images for PHP 8.4 and PHP 8.5 with the
phpv8/v8js extension preinstalled —
letting PHP execute JavaScript via Google's V8 engine. Composer 2
included. All tags are multi-arch (linux/amd64 + linux/arm64,
so they run natively on Apple Silicon Macs via Docker Desktop).
Source / Dockerfiles: https://github.com/marekskopal/php-v8js-docker
| PHP | Variant | OS | Tag |
|---|---|---|---|
| 8.5 | cli | Debian bookworm | latest, 8.5, 8.5-cli, 8.5-cli-bookworm |
| 8.5 | fpm | Debian bookworm | 8.5-fpm, 8.5-fpm-bookworm |
| 8.5 | apache | Debian bookworm | 8.5-apache, 8.5-apache-bookworm |
| 8.5 | cli | Alpine | 8.5-cli-alpine |
| 8.5 | fpm | Alpine | 8.5-fpm-alpine |
| 8.4 | cli | Debian bookworm | 8.4, 8.4-cli, 8.4-cli-bookworm |
| 8.4 | fpm | Debian bookworm | 8.4-fpm, 8.4-fpm-bookworm |
| 8.4 | apache | Debian bookworm | 8.4-apache, 8.4-apache-bookworm |
| 8.4 | cli | Alpine | 8.4-cli-alpine |
| 8.4 | fpm | Alpine | 8.4-fpm-alpine |
Tag shorthands follow the official php
convention: 8.5 == 8.5-cli-bookworm, 8.5-fpm == 8.5-fpm-bookworm.
# CLI: run a JS snippet from PHP
docker run --rm marekskopal/php-v8js:latest \
php -r 'echo (new V8Js)->executeString("[1,2,3].map(x=>x*x).reduce((a,b)=>a+b)"), PHP_EOL;'
services: php: image: marekskopal/php-v8js:8.5-fpm volumes: - ./app:/var/www/html
# Apache with mod_php
docker run --rm -p 8080:80 \
-v "$PWD/app":/var/www/html \
marekskopal/php-v8js:8.5-apache
The exact V8 version a running image was linked against is exposed at V8Js::V8_VERSION from PHP and as the v8.version / v8.source image labels.
https://github.com/marekskopal/php-v8js-docker/issues
Licensed MIT.
Content type
Image
Digest
sha256:98dd70fd7…
Size
206.6 MB
Last updated
about 1 month ago
docker pull marekskopal/php-v8js:8.5-zts