udx-worker-php
Powered by UDX Worker, this Docker image runs PHP apps on Nginx, streamlining dev and deployment.
5.2K
Secure, containerized PHP runtime built on UDX Worker for repeatable web and automation workloads.
latestUDX Worker PHP extends usabilitydynamics/udx-worker with a production-ready PHP stack: PHP-FPM + NGINX, supervised services, and the same secure runtime model used by the base image.
udx user by default.8.4 runtime (php-fpm, php-cli) with common extensions./var/www.php-fpm and nginx.mkdir -p my-php-worker/.config/worker my-php-worker/app
cd my-php-worker
cat > app/index.php <<'PHP'
<?php
header('Content-Type: text/plain');
echo "udx-worker-php is running\n";
PHP
kind: workerService
version: udx.io/worker-v1/service
services:
- name: "php-fpm"
command: "/usr/local/bin/start-php-fpm.sh"
autostart: true
autorestart: true
envs:
- "PHP_VERSION=8.4"
- name: "nginx"
command: "/usr/local/bin/start-nginx.sh"
autostart: true
autorestart: true
Save this as .config/worker/services.yaml.
docker run -d \
--name my-php-worker \
-p 8080:80 \
-v "$(pwd)/.config/worker:/home/udx/.config/worker:ro" \
-v "$(pwd)/app:/var/www" \
usabilitydynamics/udx-worker-php:latest
docker logs -f my-php-worker
Then open: http://localhost:8080
docker exec my-php-worker worker service list
docker exec my-php-worker worker service logs php-fpm
docker exec my-php-worker worker service logs nginx
Use Worker Deploy (@udx/worker-deployment) to replace long docker run flags with a simple deploy.yml + worker run workflow.
Installed CLI:
npm install -g @udx/worker-deployment
worker config
worker run
No-install (npx) mode:
npx @udx/worker-deployment worker config
npx @udx/worker-deployment worker run
If you prefer, you can also run the image directly with docker run.
Minimal deploy.yml:
kind: workerDeployConfig
version: udx.io/worker-v1/deploy
config:
image: "usabilitydynamics/udx-worker-php:latest"
volumes:
- "./.config/worker:/home/udx/.config/worker:ro"
- "./app:/var/www"
Runtime files (mounted inside container):
/home/udx/.config/worker/worker.yaml (runtime config, env, secrets)/home/udx/.config/worker/services.yaml (long-running services)Application files:
/var/www (your PHP application code)AZURE_CREDSAWS_CREDSGCP_CREDSValues can be JSON, Base64-encoded JSON, or a file path.
MIT License. See https://github.com/udx/worker-php/blob/latest/LICENSE.
Content type
Image
Digest
sha256:98e97901b…
Size
341.8 MB
Last updated
12 days ago
docker pull usabilitydynamics/udx-worker-php