Generic PHP image with nvm for handling multiple Node.js versions dynamically
473
๐ณ php-nvm is a generic, lightweight Docker image for PHP applications that includes NVMโ , allowing dynamic management of multiple Node.js versions at runtime.
git, rsync, openssh-client, make, curl, etc.| 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 installas needed in your Dockerfile or entrypoint script.
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
docker run -it --rm ocreaper/php-nvm:8.3 bash
Any contributions are welcomed!
See the project on GitHubโ for full contribution guidelines.
Content type
Image
Digest
sha256:22423eb23โฆ
Size
241.1 MB
Last updated
about 1 year ago
docker pull ocreaper/php-nvm:8.4