Ubuntu 24.04 + PHP 8.3 FPM + Nginx base for Laravel: Composer, Node 20 & Supervisor
123
Ubuntu 24.04 · PHP 8.3-FPM · Nginx · Laravel-oriented runtime — application not included.
This image is meant as a FROM base: install dependencies and bake your Laravel app in a child image or pipeline. Ships with Composer and Node.js 20 so you can run composer install and frontend builds without extra tooling layers unless you trim them yourself.
public/ document root (try_files, PHP-FPM socket, Laravel-friendly timeouts)/health (plain text OK response)| Port | Service |
|---|---|
| 80 | HTTP (Nginx) |
| 22 | SSH (optional ops use; tighten for production) |
docker run --rm -p 8080:80 your-namespace/your-repo:tag
curl -sf http://localhost:8080/health
Default content at / is a small placeholder until you mount or copy a real public/.
FROM your-namespace/your-repo:tag
WORKDIR /var/www/laravel
COPY --chown=www-data:www-data . .
RUN composer install --no-dev --optimize-autoloader --no-interaction
# If you use Vite/Mix assets:
RUN if [ -f package.json ]; then npm ci && npm run build; fi
# App-specific permissions, Supervisor programs, env, etc.
Bring your .env, encryption key, DB/Redis URLs, and any worker / Reverb processes in this layer — the base deliberately stays generic.
| Argument | Purpose |
|---|---|
BASE_SSH_USER | Login name for sudo/SSH user (default sysadmin) |
BASE_SSH_PASSWORD | SSH password — always override for anything beyond local dev |
docker build \
--build-arg BASE_SSH_USER=sysadmin \
--build-arg BASE_SSH_PASSWORD='your-strong-password' \
-t your-namespace/your-repo:tag .
Optional local build/run:
docker compose up --build -d
Maps 3082 → 80 and 3023 → 22 by default (docker-compose.yml).
Content type
Image
Digest
sha256:f6387ae28…
Size
326.3 MB
Last updated
5 months ago
docker pull pinesand/ub-php-nginx:1.0