🐳 php-nvm is a generic, lightweight Docker image for PHP applications that includes NVM, allowing dynamic management of multiple Node.js versions at runtime.
- ✅ PHP 8.x support (8.0–8.5, the end-of-life 8.0 tag is frozen)
- ✅ Multi-arch images for
linux/amd64andlinux/arm64(Apple Silicon / M1 compatible) - ✅ Pre-installed NVM for managing multiple Node.js versions
- ✅ Ideal for modern full-stack PHP projects that require Node.js tooling (e.g. Webpack, Vite, etc.)
- ✅ CI-friendly: small, clean, and consistently versioned
- ✅ Useful system tools:
git,rsync,openssh-client,make,curl, etc. - ✅ All images share the same consistent build logic
| Tag | PHP Version | Included Tools |
|---|---|---|
| 8.0 | 8.0 | ✅ PHP, Composer, NVM, Node.js via NVM |
| 8.1 | 8.1 | ✅ PHP, Composer, NVM, Node.js via NVM |
| 8.2 | 8.2 | ✅ PHP, Composer, NVM, Node.js via NVM |
| 8.3 | 8.3 | ✅ PHP, Composer, NVM, Node.js via NVM |
| 8.4 | 8.4 | ✅ PHP, Composer, NVM, Node.js via NVM |
| 8.5 | 8.5 | ✅ PHP, Composer, NVM, Node.js via NVM |
ℹ️ Images include NVM (v0.40.5). The exact Node.js version is not preinstalled — use
nvm installas needed in your Dockerfile or entrypoint script.
🔄 The images are rebuilt on every push to
masterand every Monday, so the updates of the officialphpimages (PHP security releases included) reach the tags without a code change. A rebuild can also be started manually from the Actions tab (Build and publish images → Run workflow). PHP 8.0 and 8.1 are end of life and no longer receive PHP security fixes. The8.1tag is still rebuilt, but the8.0tag is frozen: its Dockerfile no longer builds (theapt updatestep fails on the Debian 11 base image), so it is not part of the build matrix anymore and stays at its last image (PHP 8.0.30, built on 2026-06-19), which is still on Docker Hub.
FROM ycodigitalagency/php-nvm:8.3
# Install Node.js 18 using NVM
RUN source ~/.nvm/nvm.sh && \
nvm install 18 && \
nvm use 18 && \
node -v && npm -v
# Set up your app
COPY . /app
WORKDIR /app
RUN composer installdocker run -it --rm ycodigitalagency/php-nvm:8.3 bashAny contributions are welcomed!
Use Conventional Commits with a required scope:
- ✅ feat(8.4): add PHP 8.4 support
- ✅ fix(8.3): correct NVM installation path
GitHub Actions will:
- ✅ Enforce PR title formatting
- ✅ Ensure the Docker image builds successfully
See CONTRIBUTING.md for full contribution guidelines.
Project: https://github.com/Y-collective/php-nvm
Huge thanks to ocReaper for the original idea, foundation, and code that made this project possible. Your work gave this project its starting point, and we deeply appreciate the effort you put into it.