Skip to content

Commit e00bf9b

Browse files
committed
feat(docs): add contribution usage examples and other useful information
1 parent d043d74 commit e00bf9b

File tree

1 file changed

+69
-9
lines changed

1 file changed

+69
-9
lines changed

README.md

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,74 @@
11
# php-nvm
22

3-
🐳 Generic docker image for PHP applications that contains nvm for handling multiple Node.js versions dynamically
3+
🐳 **php-nvm** is a generic, lightweight Docker image for PHP applications that includes [NVM](https://github.com/nvm-sh/nvm), allowing dynamic management of multiple Node.js versions at runtime.
44

5-
[![Docker Badge](https://img.shields.io/docker/pulls/ocreaper/php-nvm)](https://hub.docker.com/r/ocreaper/php-nvm/) ![Static Badge](https://img.shields.io/badge/nvm-v0.40.3-blue)
5+
[![Docker Pulls](https://img.shields.io/docker/pulls/ocreaper/php-nvm)](https://hub.docker.com/r/ocreaper/php-nvm/)
6+
![NVM Version](https://img.shields.io/badge/nvm-v0.40.3-blue)
67

8+
---
79

8-
| Tags | PHP version | Features |
9-
|------|-------------| - |
10-
| 8.0 | 8.0 | ✅ Everything. |
11-
| 8.1 | 8.1 | ✅ Everything. |
12-
| 8.2 | 8.2 | ✅ Everything. |
13-
| 8.3 | 8.3 | ✅ Everything. |
14-
| 8.4 | 8.4 | ✅ Everything. |
10+
## 🚀 Features
11+
12+
- ✅ PHP 8.x support (8.0–8.4)
13+
- ✅ Pre-installed [NVM](https://github.com/nvm-sh/nvm) for managing multiple Node.js versions
14+
- ✅ Ideal for modern full-stack PHP projects that require Node.js tooling (e.g. Webpack, Vite, etc.)
15+
- ✅ CI-friendly: small, clean, and consistently versioned
16+
- ✅ Useful system tools: `git`, `rsync`, `openssh-client`, `make`, `curl`, etc.
17+
- ✅ All images share the same consistent build logic
18+
19+
---
20+
21+
## 📦 Available Tags
22+
23+
| Tag | PHP Version | Included Tools |
24+
|------|-------------|----------------------------------------|
25+
| 8.0 | 8.0 | ✅ PHP, Composer, NVM, Node.js via NVM |
26+
| 8.1 | 8.1 | ✅ PHP, Composer, NVM, Node.js via NVM |
27+
| 8.2 | 8.2 | ✅ PHP, Composer, NVM, Node.js via NVM |
28+
| 8.3 | 8.3 | ✅ PHP, Composer, NVM, Node.js via NVM |
29+
| 8.4 | 8.4 | ✅ PHP, Composer, NVM, Node.js via NVM |
30+
31+
> ℹ️ The exact Node.js version is not preinstalled — use `nvm install` as needed in your Dockerfile or entrypoint script.
32+
33+
---
34+
35+
## 🧪 Usage
36+
37+
### 🐋 Example Dockerfile
38+
39+
```Dockerfile
40+
FROM ocreaper/php-nvm:8.3
41+
42+
# Install Node.js 18 using NVM
43+
RUN source ~/.nvm/nvm.sh && \
44+
nvm install 18 && \
45+
nvm use 18 && \
46+
node -v && npm -v
47+
48+
# Set up your app
49+
COPY . /app
50+
WORKDIR /app
51+
RUN composer install
52+
```
53+
54+
### 💻 Run it interactively
55+
56+
```sh
57+
docker run -it --rm ocreaper/php-nvm:8.3 bash
58+
```
59+
60+
## 🤝 Contributing
61+
62+
Any contributions are welcomed!
63+
64+
Use Conventional Commits with a required scope:
65+
66+
- ✅ feat(8.4): add PHP 8.4 support
67+
- ✅ fix(8.3): correct NVM installation path
68+
69+
GitHub Actions will:
70+
71+
- ✅ Enforce PR title formatting
72+
- ✅ Ensure the Docker image builds successfully
73+
74+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full contribution guidelines.

0 commit comments

Comments
 (0)