Skip to content

feat: devcontainer.json, explicit sshd_config, Xdebug 3 docs#115

Merged
jorge07 merged 2 commits intojorge07:masterfrom
josecarlospeer-cloud:feat/devcontainer-docs
Feb 22, 2026
Merged

feat: devcontainer.json, explicit sshd_config, Xdebug 3 docs#115
jorge07 merged 2 commits intojorge07:masterfrom
josecarlospeer-cloud:feat/devcontainer-docs

Conversation

@josecarlospeer-cloud
Copy link
Contributor

Closes #104

.devcontainer/devcontainer.json

Modern VS Code Dev Containers config — open the project, click Reopen in Container, done. Pre-installs php-debug + Intelephense, forwards ports 9003 (Xdebug) and 22 (SSH), sets the PHP executable path.

SSH sshd_config

Replaces the sed -i s/#PermitRootLogin... hack with an explicit config file shipped via devfs/etc/ssh/sshd_config (all 4 PHP versions). The ADD devfs / already happens after the RUN layer, so the file is cleanly installed without brittle regex patching.

Settings: PermitRootLogin yes, PasswordAuthentication yes (IDE compat), PubkeyAuthentication yes, TCPKeepAlive/ClientAlive for stable IDE sessions, AllowTcpForwarding/GatewayPorts for remote debug port forwarding.

doc/IDE.md

Rewritten from PHP 7.x/Xdebug 2 era:

  • VS Code workflow with complete .vscode/launch.json
  • PHPStorm SSH setup with current UI paths and Xdebug 3 config
  • Xdebug 2 → 3 migration table (port 9000→9003, trigger env, ini keys)
  • CLI debugging examples using docker exec

Verification

Build-tested locally — 8.3 dev image, /etc/ssh/sshd_config confirmed present with expected settings.

.devcontainer/devcontainer.json (new)
  Modern VS Code Dev Containers config. Uses jorge07/alpine-php:8.3-dev,
  forwards ports 22 and 9003, pre-installs php-debug + Intelephense,
  sets php.validate.executablePath and intelephense.phpVersion.

devfs/etc/ssh/sshd_config (new, all 4 versions)
  Replaces the brittle 'sed -i s/#PermitRootLogin...' hack with an
  explicit, self-documenting sshd_config. Settings:
    - PermitRootLogin yes, PasswordAuthentication yes (IDE SSH compat)
    - PubkeyAuthentication yes (allows key-based auth as alternative)
    - TCPKeepAlive + ClientAlive (stable IDE sessions)
    - AllowTcpForwarding + GatewayPorts (remote debug port forwarding)
  Dockerfile sed line removed from all four PHP versions.

doc/IDE.md (rewritten)
  Updated from PHP 7.x/Xdebug 2 era to current:
    - VS Code Dev Containers workflow with launch.json config
    - PHPStorm SSH remote interpreter setup (modern UI paths)
    - Xdebug 3 trigger mode: XDEBUG_SESSION env var, port 9003
    - Side-by-side Xdebug 2 vs 3 config table
    - CLI debugging examples with docker exec

Build-tested locally: 8.3 dev image, sshd_config confirmed present.

Closes jorge07#104
…3 quickstart

Replaces the minimal 'Documentation' link with inline docs covering:
- Image table (PHP version, Alpine, arch, registries)
- Quick start for both production and dev images
- VS Code Dev Container 3-step setup (devcontainer.json)
- Xdebug launch.json config
- PHPStorm SSH remote interpreter setup
- Xdebug 3 key settings + migration note
- Full PHP extensions list (all images)
- GHCR badge added alongside Docker Hub
@jorge07 jorge07 merged commit e32c9d2 into jorge07:master Feb 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 5: Dev image improvements

2 participants