Skip to content

ocReaper/php-nvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-nvm

🐳 php-nvm is a generic, lightweight Docker image for PHP applications that includes NVM, allowing dynamic management of multiple Node.js versions at runtime.

Docker Pulls NVM Version


πŸš€ Features

  • βœ… PHP 8.x support (8.0–8.4)
  • βœ… 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

πŸ“¦ Available Tags

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

ℹ️ The exact Node.js version is not preinstalled β€” use nvm install as needed in your Dockerfile or entrypoint script.


πŸ§ͺ Usage

πŸ‹ Example Dockerfile

FROM ocreaper/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 install

πŸ’» Run it interactively

docker run -it --rm ocreaper/php-nvm:8.3 bash

🀝 Contributing

Any 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.

About

Generic PHP image with nvm for handling multiple Node.js versions dynamically

Topics

Resources

Contributing

Stars

Watchers

Forks