Sign inSign up

ocreaper/php-nvm

By ocreaper

โ€ขUpdated about 1 year ago

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

Image
1

473

ocreaper/php-nvm repository overview

โ 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

TagPHP VersionIncluded Tools
8.08.0โœ… PHP, Composer, NVM, Node.js via NVM
8.18.1โœ… PHP, Composer, NVM, Node.js via NVM
8.28.2โœ… PHP, Composer, NVM, Node.js via NVM
8.38.3โœ… PHP, Composer, NVM, Node.js via NVM
8.48.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!

See the project on GitHubโ  for full contribution guidelines.

Tag summary

Content type

Image

Digest

sha256:22423eb23โ€ฆ

Size

241.1 MB

Last updated

about 1 year ago

docker pull ocreaper/php-nvm:8.4