Skip to content

Commit 1671643

Browse files
authoredFeb 9, 2019
Merge pull request #21 from devilbox/release-0.20
Reflect Modules in README
2 parents 938f9a9 + e17f3de commit 1671643

File tree

4 files changed

+67
-5
lines changed

4 files changed

+67
-5
lines changed
 

‎.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ install:
4747
before_script:
4848
- make build
4949
- make test
50+
- make update-readme
51+
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
5052

5153

5254
###

‎Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ TAG = latest
55

66
.PHONY: build rebuild test tag pull login push enter
77

8+
update-readme:
9+
cat "./README.md" \
10+
| perl -00 -pe "s/<!-- modules -->.*<!-- \/modules -->/<!-- modules -->\n$$(./tests/get-modules.sh)\n<!-- \/modules -->/s" \
11+
> "./README.md.tmp"
12+
yes | mv -f "./README.md.tmp" "./README.md"
13+
814
build:
915
docker build -t $(IMAGE) -f $(DIR)/$(FILE) $(DIR)
1016

‎README.md

+42-5
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@
1010

1111
This repository will provide you a fully functional PHP-FPM 7.4 Docker image built from [official sources](https://github.com/php/php-src) nightly. It provides the base for [Devilbox PHP-FPM Docker images](https://github.com/devilbox/docker-php-fpm).
1212

13-
1413
| Docker Hub | Upstream Project |
1514
|------------|------------------|
1615
| <a href="https://hub.docker.com/r/devilbox/php-fpm-7.4"><img height="82px" src="http://dockeri.co/image/devilbox/php-fpm-7.4" /></a> | <a href="https://github.com/cytopia/devilbox" ><img height="82px" src="https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png" /></a> |
1716

18-
1917
## Similar Base Images
2018

2119
* [PHP-FPM 5.2](https://github.com/devilbox/docker-php-fpm-5.2)
2220
* [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3)
2321
* [PHP-FPM 8.0](https://github.com/devilbox/docker-php-fpm-8.0)
2422
* [PHP-FPM](https://github.com/devilbox/docker-php-fpm) (all PHP versions)
2523

26-
2724
## Build
2825

2926
```bash
@@ -37,7 +34,6 @@ make rebuild
3734
make test
3835
```
3936

40-
4137
## Usage
4238

4339
Add the following `FROM` line into your Dockerfile:
@@ -46,6 +42,48 @@ Add the following `FROM` line into your Dockerfile:
4642
FROM devilbox/php-fpm-7.4:latest
4743
```
4844

45+
## Available Modules
46+
47+
If you need a dockerized version of **PHP 7.4** or **PHP-FPM 7.4** which provides a vast amount of
48+
modules enabled by default visit: **[devilbox/docker-php-fpm](https://github.com/devilbox/docker-php-fpm)**
49+
50+
<!-- modules -->
51+
| Module | Built-in |
52+
|--------------|-----------|
53+
| Core ||
54+
| ctype ||
55+
| curl ||
56+
| date ||
57+
| dom ||
58+
| fileinfo ||
59+
| filter ||
60+
| ftp ||
61+
| hash ||
62+
| iconv ||
63+
| json ||
64+
| libxml ||
65+
| mbstring ||
66+
| mysqlnd ||
67+
| openssl ||
68+
| pcre ||
69+
| PDO ||
70+
| pdo_sqlite ||
71+
| Phar ||
72+
| posix ||
73+
| readline ||
74+
| Reflection ||
75+
| session ||
76+
| SimpleXML ||
77+
| sodium ||
78+
| SPL ||
79+
| sqlite3 ||
80+
| standard ||
81+
| tokenizer ||
82+
| xml ||
83+
| xmlreader ||
84+
| xmlwriter ||
85+
| zlib ||
86+
<!-- /modules -->
4987

5088
## Example
5189

@@ -78,7 +116,6 @@ docker run -d --rm --name devilbox-nginx-stable \
78116

79117
Open up your browser at http://127.0.0.1:8080
80118

81-
82119
## License
83120

84121
**[MIT License](LICENSE)**

‎tests/get-modules.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -u
5+
set -o pipefail
6+
7+
MODULES="$( docker run --rm -t --entrypoint=php devilbox/php-fpm-7.4 -m \
8+
| grep -vE '(^\[)|(^\s*$)' \
9+
| sort -u
10+
)"
11+
12+
echo "| Module | Built-in |"
13+
echo "|--------------|-----------|"
14+
echo "${MODULES}" | while read line; do
15+
line="$( echo "${line}" | sed 's/\r//g' | xargs )"
16+
printf "| %-12s | ✔ |\n" "${line}"
17+
done

0 commit comments

Comments
 (0)
Failed to load comments.