Compare commits

...

230 Commits
0.86 ... 0.127

Author SHA1 Message Date
cytopia
b0c3afc0d4 Merge pull request #208 from devilbox/release-0.127
Release 0.127
2021-05-28 02:56:47 +02:00
cytopia
5ddf4a044a Fix README 2021-05-27 19:45:03 +02:00
cytopia
32a7cee28c Update README 2021-05-27 18:30:35 +02:00
cytopia
1b12438855 Update nightly tag 2021-05-27 18:30:23 +02:00
cytopia
c40619c7c0 Add module: (pdo_)sqlsrv 2021-05-27 13:27:22 +02:00
cytopia
d97348f457 Merge pull request #207 from devilbox/release-0.126
Release v0.126
2021-05-26 10:19:57 +02:00
cytopia
f86556c72d Added Homebrew 2021-05-26 08:09:34 +02:00
cytopia
8e94d09e39 Merge pull request #206 from llaville/feature/homebrew
Add Homebrew to replace Linuxbrew
2021-05-26 08:08:10 +02:00
Laurent Laville
7df4f04a04 add Homebrew to replace Linuxbrew (deprecated and removed) 2021-05-21 18:14:43 +02:00
Laurent Laville
0c664d770e Merge pull request #3 from devilbox/master
Sync Forked Repo
2021-05-21 16:10:54 +02:00
cytopia
e087ed33cc Merge pull request #205 from devilbox/release-0.125
Release 0.125
2021-05-19 22:57:13 +02:00
cytopia
2ac845ab74 Update project files 2021-05-19 21:43:25 +02:00
cytopia
6634169b3f Pin wp-cli version for PHP 5.4 and 5.5 2021-05-19 21:43:09 +02:00
cytopia
f9113317fc Replace wget with curl for header download 2021-05-19 20:27:20 +02:00
cytopia
518d0d908d Pin Ansible to specific version 2021-05-19 20:09:42 +02:00
cytopia
58aa3c6abf Update workflows 2021-05-19 19:48:22 +02:00
cytopia
8d89ed4b02 Re-added opcache for PHP 8.1 2021-05-19 19:46:01 +02:00
cytopia
25e0e12fe9 Merge pull request #204 from devilbox/release-0.124
Release 0.124
2021-05-17 16:12:45 +02:00
cytopia
15ff7ff2dc Fix: add missing .so ext to mod load 2021-05-17 13:59:51 +02:00
cytopia
36a3016370 Ensure to have phalcon ext on while verifying phalcon tools 2021-05-16 19:18:42 +02:00
cytopia
bf81b816c4 Fix drupal builds for PHP 7.0 and 7.1 2021-05-16 17:31:28 +02:00
cytopia
a6e27c1dcd Fix work issues for PHP 7.0 and 7.1 2021-05-16 17:04:11 +02:00
cytopia
712ad5c66a Fix all work images 2021-05-16 16:49:14 +02:00
cytopia
59c30b8f24 Fix all mods images 2021-05-16 14:41:01 +02:00
cytopia
d903951329 Fix broken builds 2021-05-16 13:03:39 +02:00
cytopia
89d71a694b Fixed linting 2021-05-16 12:18:21 +02:00
cytopia
1d3a03c389 Disable linuxbrew 2021-05-16 12:14:45 +02:00
cytopia
bc526403dd Fix Ansible generation 2021-05-16 12:12:58 +02:00
cytopia
282c019eb3 Merge pull request #191 from devilbox/release-0.123
Release 0.123
2020-12-19 15:56:53 +01:00
cytopia
74030c5c91 xdebug: set start_with_request to default 2020-12-19 11:07:45 +01:00
cytopia
6be20c28e6 Fixed PHP Xdebug v3 defaults 2020-12-19 10:16:46 +01:00
cytopia
28d7ab632e Merge pull request #190 from devilbox/release-0.122
Release 0.122
2020-12-12 16:44:49 +01:00
cytopia
395e4d30b4 Repository settings 2020-12-12 15:24:52 +01:00
cytopia
d93387f207 Adjust Readme to reflect GitHub Actions 2020-12-12 15:18:21 +01:00
cytopia
c5e3e7257f Update CHANGELOG 2020-12-12 15:14:40 +01:00
cytopia
0f7ea87328 Enable push to Dockerhub 2020-12-12 15:13:50 +01:00
cytopia
66b7586eae Add linting 2020-12-12 15:12:52 +01:00
cytopia
2d4c8647e1 Remove travis.yml config 2020-12-12 14:36:49 +01:00
cytopia
f0bb67cbc2 Ensure to pull latest base images during CI 2020-12-12 14:34:10 +01:00
cytopia
1b312bce33 Fix Docker image tags 2020-12-12 14:24:56 +01:00
cytopia
6aafdd7023 Fix Docker Login 2020-12-12 14:08:10 +01:00
cytopia
48380c5d98 Fix linting job 2020-12-12 14:03:04 +01:00
cytopia
5506d68f1f Fix checkout 2020-12-12 14:01:00 +01:00
cytopia
88aeca57aa Prepare GitHub Actions 2020-12-12 13:57:19 +01:00
cytopia
ec8fc4eab6 Added various extensions to PHP 8.0 and PHP 8.1 2020-12-11 17:08:14 +01:00
cytopia
f6015c766a Added various modules to PHP 8.0 2020-12-11 15:35:42 +01:00
cytopia
f0c625d951 Merge pull request #188 from devilbox/release-0.121
Release 0.121
2020-12-10 13:03:28 +01:00
cytopia
a0332b964e Compile redis with msgpack and igbinary 2020-12-09 12:40:17 +01:00
cytopia
7c1ceabf97 Merge pull request #185 from devilbox/release-0.120
Release 0.120
2020-12-04 18:09:38 +01:00
cytopia
9bc2f1ca31 Fix zsh for PHP 5.6 and 7.0 2020-12-03 09:45:18 +01:00
cytopia
e51d28fcbe Merge pull request #184 from devilbox/release-0.119
Release 0.119
2020-12-01 19:08:03 +01:00
cytopia
a002d3aa19 CI: Added more waiting time in between retries 2020-12-01 11:00:33 +01:00
cytopia
114f1b597d Fixed zsh install for PHP 5.6 and 7.0 2020-12-01 11:00:13 +01:00
cytopia
0b37f92cbb Fixed drupal (drupal console launcher) for PHP 5.5, 5.6, 7.0 and 7.1 2020-12-01 09:45:21 +01:00
cytopia
6616f336cf Merge pull request #183 from devilbox/release-0.118
Release 0.118
2020-11-30 10:56:31 +01:00
cytopia
30f18d858e Fix SLUG and TYPE for GitHub Actions 2020-11-29 13:38:54 +01:00
cytopia
abd10c104b Fix xdebug version for PHP 7.0 2020-11-29 10:48:43 +01:00
cytopia
9f18603b4d Fix typo in git checkout 2020-11-29 09:58:43 +01:00
cytopia
d328e8aa67 Adjust GitHub Actions workflow 2020-11-29 09:58:20 +01:00
cytopia
9bddaad387 Fix GitHub Actions nightly workflow 2020-11-29 09:42:03 +01:00
cytopia
3cdede3519 Fixed mdl rubygem 2020-11-29 09:24:41 +01:00
cytopia
dc98c5cefe Update PHP modules 2020-11-29 09:19:43 +01:00
cytopia
62c65d19e7 Merge pull request #181 from devilbox/release-0.117
Release 0.117
2020-11-21 19:57:59 +01:00
cytopia
b0c7655aca Add custom supervisor config mountpoint 2020-11-21 15:15:02 +01:00
cytopia
6f93613c34 Fix GitHub Actions env vars 2020-11-21 14:46:28 +01:00
cytopia
6f359ab366 Add .composer/vendir/bin to PATH variable 2020-11-21 14:40:05 +01:00
cytopia
add92d6102 Merge pull request #179 from devilbox/release-0.116
Release 0.116
2020-11-13 18:37:08 +01:00
cytopia
cdb09fcbee Fix to disable PHP modules without trailing *.so ext 2020-11-13 12:58:26 +01:00
cytopia
6ecd75d59b Merge pull request #178 from devilbox/release-0.115
Release 0.115
2020-11-13 03:14:23 +01:00
cytopia
04c051e72f Don't fail on uid/gid change 2020-11-13 01:34:56 +01:00
cytopia
d926629879 Allow big uid/gid 2020-11-12 21:19:50 +01:00
cytopia
3ca7d92844 Merge pull request #177 from devilbox/release-0.114
Release 0.114
2020-11-06 21:50:54 +01:00
cytopia
8864095f8b Add PHP 8.1 2020-11-06 15:38:24 +01:00
cytopia
d8be1a89bb Update CHANGELOG 2020-11-06 14:41:43 +01:00
cytopia
b15ae8fc84 Fix bug with gd-jis 2020-11-06 14:05:54 +01:00
cytopia
f3669b1bed Update composer to version 2.x 2020-11-06 13:34:22 +01:00
cytopia
fb36b7151f Re-enable mongodb for PHP 8.0 2020-11-05 12:00:34 +01:00
cytopia
e09e02a7b0 Merge pull request #175 from devilbox/release-0.113
Fix nightly pipeline
2020-09-18 10:46:03 +02:00
cytopia
8f2a9524fe Fix nightly pipeline 2020-09-18 10:45:28 +02:00
cytopia
332d03010c Merge pull request #172 from devilbox/release-0.112
Release 0.112
2020-09-16 03:08:42 +02:00
cytopia
d9b205f2f1 CI: increase retries 2020-09-16 00:26:27 +02:00
cytopia
42df419376 CI: Ensure travis retries during push 2020-09-15 23:25:10 +02:00
cytopia
4be4c2eded More verbose CI output 2020-09-15 18:28:54 +02:00
cytopia
6a49ffce10 Adjust workflows 2020-09-15 15:46:48 +02:00
cytopia
ca6b176620 Fixes #169: Missing locale-gen binary 2020-09-15 15:30:27 +02:00
cytopia
7019b00e55 Fix apt packages for PHP 7.0 2020-09-15 15:30:23 +02:00
cytopia
c40082e886 Added xlswriter extension 2020-09-15 15:30:19 +02:00
cytopia
3f89c534e4 Added vips extension 2020-09-15 15:30:15 +02:00
cytopia
c65bd0653b Fix variables 2020-09-15 15:06:03 +02:00
cytopia
89edcd20d8 Set correct branch/tag 2020-09-15 15:00:32 +02:00
cytopia
fd0594e3c1 Fix GitHub Actions 2020-09-15 14:48:16 +02:00
cytopia
bef26e8c27 Fix checkout 2020-09-15 14:41:55 +02:00
cytopia
f60c0e8fea Fix workflow run 2020-09-15 14:33:45 +02:00
cytopia
1fc03c7b0d Fix workflow file 2020-09-15 14:32:40 +02:00
cytopia
a782cf22ab GitHub Actions Fix schedule 2020-09-15 14:19:06 +02:00
cytopia
51808ccc1b Merge pull request #174 from devilbox/github-actions
Test GitHub actions
2020-09-15 14:05:14 +02:00
cytopia
6f901d4bc7 Test GitHub actions 2020-09-15 14:04:48 +02:00
cytopia
b721b3b5ae Merge pull request #173 from devilbox/github-actions
Test GitHub actions
2020-09-15 13:54:54 +02:00
cytopia
ebd7c5ec37 Test GitHub actions 2020-09-15 13:53:09 +02:00
cytopia
050322cf02 Merge pull request #171 from devilbox/release-0.111
Release v0.111
2020-09-13 15:41:18 +02:00
cytopia
5227af8e4c Re-adding xdebug for PHP 8.0 2020-09-13 11:30:37 +02:00
cytopia
9e247307ad Merge pull request #170 from devilbox/release-0.110
Release v0.110
2020-09-13 11:16:48 +02:00
cytopia
b095b04ec3 Fix laravel symlink location for PHP 7.2 2020-09-12 17:39:20 +02:00
cytopia
5684fac8a2 Fixes laravel installer for PHP 7.2 2020-09-12 12:54:07 +02:00
cytopia
eb6799ad29 Fix download for drupal console 2020-09-12 11:48:21 +02:00
cytopia
1c53a0fd68 Merge pull request #168 from devilbox/release-0.109
Fix absolute path in tests
2020-08-09 14:47:03 +02:00
cytopia
fabc29299c Fix absolute path in tests 2020-08-09 13:07:53 +02:00
cytopia
83b4cb6b43 Merge pull request #167 from devilbox/release-0.108
Release 0.108
2020-08-08 18:11:27 +02:00
cytopia
dc438b0aad Fixes policy.xml for Imagick 2020-08-08 12:16:37 +02:00
cytopia
c8bd21ebbe Update CHANGELOG 2020-08-08 12:03:13 +02:00
cytopia
b2476e3851 Add gsfonts, mupdf and mupdf-tools 2020-08-08 12:02:39 +02:00
cytopia
c06a3d2237 Fix Redis for PHP 8.0 2020-08-08 12:02:04 +02:00
cytopia
ce4f022c70 Update CHANGELOG 2020-08-08 11:12:20 +02:00
cytopia
9c5326dc0f Stricter version check for installed tools 2020-08-08 11:11:35 +02:00
cytopia
2701a524b9 Fixed MongoDB module for PHP 5.6 2020-08-08 11:10:22 +02:00
cytopia
acea0ac0fe Fixed Ansible installation 2020-08-08 11:09:19 +02:00
cytopia
3153b329f1 Added imagick PDF support (via ghostscript) 2020-08-08 11:08:05 +02:00
cytopia
10285279c7 Merge pull request #159 from devilbox/release-0.107
Release 0.107
2020-06-27 23:36:51 +02:00
cytopia
0a04342e46 Adding certbot binary 2020-06-27 18:46:50 +02:00
cytopia
dad684bfd1 Re-added imap for PHP 7.4 2020-06-27 16:23:07 +02:00
cytopia
9fabcf3b71 Fixes imagick segfault by setting its threads to 1 2020-06-27 15:52:01 +02:00
cytopia
0669d92289 Adjust travis.yml 2020-06-27 12:16:48 +02:00
cytopia
6d2053878a Fix broken pipelines 2020-06-26 10:00:26 +02:00
cytopia
c3f46d3706 Fix push to Dockerhub 2020-04-07 12:01:29 +02:00
cytopia
de9642c2b5 Merge pull request #157 from devilbox/release-0.106
Release 0.106
2020-03-18 13:58:09 +01:00
cytopia
6fa341748b Disable PHP-FPM 8.0 uploadprogress module due to startup warnings 2020-03-18 10:03:45 +01:00
cytopia
5f719f60ce Fix build of PHP-FPM 8.0 uploadprogress module 2020-03-18 07:35:45 +01:00
cytopia
ffc8df1906 Fix build of PHP-FPM 7.4 snmp module 2020-03-18 07:13:11 +01:00
cytopia
186bf71519 Merge pull request #153 from anatolinicolae/master
Add sorting for startup files
2020-03-18 06:57:32 +01:00
cytopia
422e559ee3 Merge branch 'master' into master 2020-02-08 18:45:22 +01:00
cytopia
eb85e3e288 Merge pull request #155 from devilbox/release-0.105
Release 0.105
2020-02-06 07:55:17 +01:00
cytopia
5ed5dd2503 Use COMPOSER_MEMORY_LIMIT env var 2020-02-05 17:52:18 +01:00
cytopia
1225d564a7 Fix sqlsrv install for PHP 7.1 2020-02-04 19:13:13 +01:00
cytopia
a4102e3d7f Update changelog 2020-02-04 18:13:36 +01:00
cytopia
982dd44701 Add phalcon binary to PHP 7.3 and 7.4 2020-02-04 18:13:22 +01:00
cytopia
bc851cca0f Fix build of pdo_sqlsrv for PHP 7.1 2020-02-04 17:36:03 +01:00
cytopia
ef5b2ed58c Fix composer install 2020-02-04 17:33:21 +01:00
Anatoli Nicolae
cbd4f58876 Add sorting for startup files
Alphanumerically sort files found in /startup.1.d and /startup.2.d directories, to prevent non regular script execution.

Signed-off-by: Anatoli Nicolae <desk@anatolinicolae.com>
2020-01-29 15:09:56 +01:00
cytopia
fd6550627d Merge pull request #152 from devilbox/release-0.104
Release 0.104
2020-01-17 12:16:32 +01:00
cytopia
af150ba371 Fix xdebug install for PHP 7.0 2020-01-17 09:38:48 +01:00
cytopia
47800a7ede Merge pull request #151 from devilbox/release-0.103
Release v0.103
2020-01-14 20:32:06 +01:00
cytopia
d977d941ac Add PHP yaml module 2020-01-14 17:39:37 +01:00
cytopia
2ae551e5a5 Merge pull request #150 from devilbox/UPDATE-README
Update available tools
2020-01-09 13:12:14 +01:00
cytopia
37747d392a Update available tools 2020-01-09 13:13:53 +01:00
cytopia
0a5aadd2a2 Merge pull request #149 from devilbox/release-0.102
Release 0.102
2020-01-09 13:10:07 +01:00
cytopia
64c41f7786 Replace scss-lint with stylelint 2020-01-08 15:44:08 +01:00
cytopia
8bef4c7167 Fixes #144 Adding CHANGELOG 2020-01-08 13:31:56 +01:00
cytopia
58ecd35153 Fixes #123 Replace Ruby Sass with Dart Sass 2020-01-08 13:30:08 +01:00
cytopia
55a1333d58 Merge pull request #147 from devilbox/release-0.101
Release v0.101
2020-01-05 15:20:39 +01:00
cytopia
fa1ec623d7 Change symfony cli from i686 to amd64 2020-01-05 13:37:53 +01:00
cytopia
faa10b9512 Consolidate curl commands 2020-01-05 13:31:35 +01:00
cytopia
fc6df6bdaf Use latest Symfony version 2020-01-05 13:28:48 +01:00
cytopia
649f667f45 Merge pull request #146 from devilbox/release-0.100
Release v0.100
2020-01-04 22:30:02 +01:00
cytopia
0cbd58141d Fix wget download 2020-01-04 21:22:39 +01:00
cytopia
965db7f0d5 Allow chown homedir to fail (e.g.: for read-only sub-mount) 2020-01-04 21:03:29 +01:00
cytopia
172baf9743 Merge pull request #145 from devilbox/release-0.99
Add phpmd binary
2020-01-04 20:51:41 +01:00
cytopia
fc5e5e21e5 Ensure unwanted artifacts are removed during build 2020-01-04 20:52:31 +01:00
cytopia
529a33f1a0 Fix phpredis for PHP 8.0 2020-01-04 19:18:35 +01:00
cytopia
cc77461311 Fix missing backslash in Docker command 2020-01-04 18:35:29 +01:00
cytopia
f04a5ec693 Fix phpredis module for PHP 7.4 and 8.0 2020-01-04 18:32:01 +01:00
cytopia
90495fab70 Add phpmd binary 2020-01-04 18:17:09 +01:00
cytopia
f8f485b0bb Merge pull request #143 from devilbox/release-0.98
Release v0.98
2019-12-31 19:06:26 +01:00
cytopia
3ad0330bca Add -o option to mhsendmail 2019-12-31 16:30:59 +01:00
cytopia
2587886b24 Fixes #105 Allow to start postfix without Email catch-all 2019-12-31 15:47:36 +01:00
cytopia
3ce6ed507b Merge pull request #142 from devilbox/release-0.97
Use official PHP 7.4 image
2019-12-28 19:38:39 +01:00
cytopia
f05301572d Add solr and ssh2 PHP modules 2019-12-28 17:39:12 +01:00
cytopia
40d76f355f Use official PHP 7.4 image 2019-12-28 15:59:15 +01:00
cytopia
9c1e49b814 Merge pull request #141 from devilbox/release-0.96
Release v0.96
2019-12-28 03:00:34 +01:00
cytopia
c1aa814206 Update modules in README 2019-12-27 17:22:19 +01:00
cytopia
a382745a2f Fix phalcon-devtools install 2019-12-27 17:19:45 +01:00
cytopia
d9d6f2d157 Fix deployer install 2019-12-27 14:56:47 +01:00
cytopia
9c82fb08c3 Fix Phalcon PHP module 2019-12-27 14:40:37 +01:00
cytopia
91733db9e9 Fix npm install 2019-12-27 13:30:55 +01:00
cytopia
41fec62672 Fix pecl install 2019-12-27 11:43:23 +01:00
cytopia
3e9e00e0c2 Merge pull request #136 from devilbox/release-0.95
Release 0.95
2019-11-29 09:36:04 +01:00
cytopia
d4a16ba3b3 Fix laravel cli 2019-11-28 11:49:50 +01:00
cytopia
fb7a3e8bff Merge pull request #135 from devilbox/release-0.94
Release 0.94
2019-11-22 00:05:32 +01:00
cytopia
dc7336fa3d Show tests that are skipped 2019-11-21 22:01:15 +01:00
cytopia
0750ec9339 imagick integration tests 2019-11-21 17:22:36 +01:00
cytopia
c360bec703 Update phalcon module 2019-11-21 17:22:22 +01:00
cytopia
1ec8a494e4 Add enchant to 7.3 2019-11-21 16:05:03 +01:00
cytopia
883a897420 Add enchant to 7.4 and 8.0 2019-11-21 15:56:49 +01:00
cytopia
7f018000be Merge pull request #134 from devilbox/release-0.93
Release 0.93
2019-11-19 09:19:08 +01:00
cytopia
7f3a6f3e64 Disable imagick for 5.3, 5.4 and 5.5 due to segfaults 2019-11-18 23:48:06 +01:00
cytopia
83124e8632 Add more gd tests 2019-11-18 17:58:00 +01:00
cytopia
806b408878 Only check imagick against supported versions 2019-11-18 17:44:11 +01:00
cytopia
3d15aea68b Fix gd for PHP 7.4 and PHP 8.0 2019-11-18 16:52:55 +01:00
cytopia
db7c4e6334 Add module integration tests 2019-11-18 16:52:35 +01:00
cytopia
2c6e013fad Adding Ghostscript 2019-11-17 22:48:50 +01:00
cytopia
b35f3a822c Merge pull request #132 from fschndr/master
Fixed typo in MySQL backup example
2019-11-16 13:23:32 +01:00
Fabian
f20932ce74 Fixed typo in MySQL backup example
The container-side path of the volume had a typo in the README.md example.
2019-11-13 10:51:52 +01:00
cytopia
78d39e57f0 Merge pull request #131 from devilbox/release-0.92
Release 0.92
2019-11-09 17:07:32 +01:00
cytopia
6b666d029b Enable more extensions 2019-11-09 14:45:11 +01:00
cytopia
85b743c822 Enable xdebug for PHP 7.4 2019-11-09 11:46:42 +01:00
cytopia
2643b28775 Refs #121 Allow to overwrite CMD and have custom startup commands 2019-11-09 00:17:31 +01:00
cytopia
bbe1b43474 Prepare Nightly builds 2019-11-08 20:32:31 +01:00
cytopia
83f57430e5 Merge pull request #130 from devilbox/github-actions
Prepare push phase
2019-11-08 19:29:33 +01:00
cytopia
696faf598d Prepare push phase 2019-11-08 09:42:06 +01:00
cytopia
a0a0738205 Merge pull request #129 from devilbox/github-actions-fix
Fix variable replacement in GitHub actions
2019-11-06 15:50:16 +01:00
cytopia
020d778fca Fix variable replacement in GitHub actions 2019-11-06 15:51:20 +01:00
cytopia
cd7424d1f6 Merge pull request #128 from devilbox/release-0.91
Release 0.91
2019-11-06 14:48:29 +01:00
cytopia
5ef91da97f CI: Prepare push conditions 2019-11-06 09:43:11 +01:00
cytopia
f59dd5bf6c Merge pull request #127 from devilbox/release-0.90
Release 0.90
2019-11-04 18:31:27 +01:00
cytopia
bc01b396a1 Shorten build time on Travis to be within limits 2019-11-04 10:24:26 +01:00
cytopia
dd78ed0b71 Update README.md 2019-11-04 03:18:25 +01:00
cytopia
ec7e1cb622 Speed up Dockerfile generation 2019-11-04 01:09:10 +01:00
cytopia
91741aaf7f Fix phalcon install 2019-11-04 00:53:24 +01:00
cytopia
87234a6f46 Simplify GitHub Action workflow 2019-11-04 00:53:06 +01:00
cytopia
a6236b19c7 Fix work images 2019-11-03 22:48:51 +01:00
cytopia
67017e494e Make RUN commands more strict 2019-11-03 18:20:23 +01:00
cytopia
31864f8335 Fix mod images 2019-11-03 17:42:41 +01:00
cytopia
7585081644 Move builds to GitHub Actions 2019-11-02 21:00:27 +01:00
cytopia
3e8b4856d1 Dockerize generate command to remove local dependencies 2019-11-02 14:37:45 +01:00
cytopia
46d1c48104 Update yamllint 2019-11-02 14:37:21 +01:00
cytopia
47d2d1f9f5 Merge pull request #120 from devilbox/release-0.89
Release 0.89
2019-06-10 11:50:41 +02:00
cytopia
019c3b82d8 Disable DrupalConsole for PHP 8.0 2019-06-09 14:30:54 +02:00
cytopia
1817f84301 FFI is now already available in PHP 8.0 base image 2019-06-09 09:15:12 +02:00
cytopia
3fd1652455 Disable Phalcon for PHP 7.3 as it currently core-dumps 2019-06-09 09:13:48 +02:00
cytopia
e75b7cb54c Merge pull request #117 from devilbox/release-0.88
Feature update
2019-05-20 18:08:05 +02:00
cytopia
d68b8dcff0 Fix OAuth module name in README 2019-05-20 09:53:07 +02:00
cytopia
5bd9466995 Add nvm path to default bash config 2019-05-20 09:50:54 +02:00
cytopia
2b53dcab7a Add tool: yq 2019-05-20 09:17:20 +02:00
cytopia
d286467a6f Disable enchant php module for php 7.4 and 8.0 2019-05-20 09:14:44 +02:00
cytopia
d87857e598 Add oauth module 2019-05-20 09:13:54 +02:00
cytopia
a9c8d4fbbe Add composer prestissimo 2019-05-19 10:09:53 +02:00
cytopia
be4492795b Add zlib1g-dev library 2019-05-19 08:49:04 +02:00
cytopia
5a10077fe2 Allow symlinks for autostart scripts 2019-05-19 08:42:07 +02:00
cytopia
3075f2afca Merge pull request #115 from devilbox/release-0.87
Fix scss_lint install
2019-05-12 15:08:00 +02:00
cytopia
36355c3d60 Disable Interbase for PHP 7.4 and 8.0 2019-05-12 13:18:36 +02:00
cytopia
80f8557962 Fix scss_lint install 2019-05-11 16:41:39 +02:00
125 changed files with 18614 additions and 8407 deletions

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: [cytopia]
patreon: devilbox

347
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,347 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: build
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:
# Runs on Push
push:
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
build:
name: "[ PHP-${{ matrix.version }} ]"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
version:
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set variables
id: vars
run: |
# Retrieve git info (tags, etc)
git fetch --all
# Branch, Tag or Commit
GIT_TYPE="$( \
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
| sh \
| grep '^GIT_TYPE' \
| sed 's|.*=||g' \
)"
# Branch name, Tag name or Commit Hash
GIT_SLUG="$( \
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
| sh \
| grep '^GIT_NAME' \
| sed 's|.*=||g' \
)"
# Docker Tag
if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then
DOCKER_TAG_BASE="${VERSION}-base"
DOCKER_TAG_MODS="${VERSION}-mods"
DOCKER_TAG_PROD="${VERSION}-prod"
DOCKER_TAG_WORK="${VERSION}-work"
else
DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}"
DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}"
DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}"
DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}"
fi
# Output
echo "GIT_TYPE=${GIT_TYPE}"
echo "GIT_SLUG=${GIT_SLUG}"
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
# Export variable
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV}
echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV}
env:
VERSION: ${{ matrix.version }}
# ------------------------------------------------------------
# Base
# ------------------------------------------------------------
- name: Build Base
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make _pull-base-image VERSION=${VERSION}
retry make build-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Base
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Mods
# ------------------------------------------------------------
- name: Build Mods
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Mods
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Prod
# ------------------------------------------------------------
- name: Build Prod
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Prod
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Work
# ------------------------------------------------------------
- name: Build Work
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Work
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Diff README.md
# ------------------------------------------------------------
- name: Diff README.md
run: |
make gen-readme VERSION=${VERSION}
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
env:
VERSION: ${{ matrix.version }}
# ------------------------------------------------------------
# Deploy
# ------------------------------------------------------------
- name: Publish images (only repo owner)
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
# Output
echo "GIT_TYPE=${GIT_TYPE}"
echo "GIT_SLUG=${GIT_SLUG}"
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
# Tag image
retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}"
retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}"
retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}"
retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}"
docker images
# Login
retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}
# Push
retry make push TAG=${DOCKER_TAG_BASE}
retry make push TAG=${DOCKER_TAG_MODS}
retry make push TAG=${DOCKER_TAG_PROD}
retry make push TAG=${DOCKER_TAG_WORK}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
&& (
(github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
||
(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-'))
)

55
.github/workflows/linting.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: lint
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
# ------------------------------------------------------------
# Lint repository
# ------------------------------------------------------------
- name: Lint Files
run: |
make lint-files
- name: Lint Yaml
run: |
make lint-yaml
- name: Lint workflow
run: |
make lint-workflow
- name: Lint Changelog
run: |
make lint-changelog
- name: Diff generated Docker files
run: |
make gen-dockerfiles
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }

350
.github/workflows/nightly.yml vendored Normal file
View File

@@ -0,0 +1,350 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: nightly
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs daily
schedule:
- cron: '0 0 * * *'
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
nightly:
name: "[ PHP-${{ matrix.version }} ] (ref: ${{ matrix.refs }})"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
version:
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
refs:
- 'master'
- '0.127'
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ matrix.refs }}
- name: Set variables
id: vars
run: |
# Retrieve git info (tags, etc)
git fetch --all
# Branch, Tag or Commit
GIT_TYPE="$( \
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
| sh \
| grep '^GIT_TYPE' \
| sed 's|.*=||g' \
)"
# Branch name, Tag name or Commit Hash
GIT_SLUG="$( \
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
| sh \
| grep '^GIT_NAME' \
| sed 's|.*=||g' \
)"
# Docker Tag
if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then
DOCKER_TAG_BASE="${VERSION}-base"
DOCKER_TAG_MODS="${VERSION}-mods"
DOCKER_TAG_PROD="${VERSION}-prod"
DOCKER_TAG_WORK="${VERSION}-work"
else
DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}"
DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}"
DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}"
DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}"
fi
# Output
echo "GIT_TYPE=${GIT_TYPE}"
echo "GIT_SLUG=${GIT_SLUG}"
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
# Export variable
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV}
echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV}
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV}
env:
VERSION: ${{ matrix.version }}
# ------------------------------------------------------------
# Base
# ------------------------------------------------------------
- name: Build Base
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make _pull-base-image VERSION=${VERSION}
retry make build-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Base
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Mods
# ------------------------------------------------------------
- name: Build Mods
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Mods
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Prod
# ------------------------------------------------------------
- name: Build Prod
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Prod
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Work
# ------------------------------------------------------------
- name: Build Work
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make build-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
- name: Test Work
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
retry make test-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# ------------------------------------------------------------
# Diff README.md
# ------------------------------------------------------------
- name: Diff README.md
run: |
make gen-readme VERSION=${VERSION}
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
env:
VERSION: ${{ matrix.version }}
# ------------------------------------------------------------
# Deploy
# ------------------------------------------------------------
- name: Publish images (only repo owner)
run: |
retry() {
for n in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
if eval "${*}"; then
echo "[SUCC] ${n}/${RETRIES}";
return 0;
fi;
sleep ${PAUSE};
echo "[FAIL] ${n}/${RETRIES}";
done;
return 1;
}
# Output
echo "GIT_TYPE=${GIT_TYPE}"
echo "GIT_SLUG=${GIT_SLUG}"
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
# Tag image
retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}"
retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}"
retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}"
retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}"
docker images
# Login
retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}
# Push
retry make push TAG=${DOCKER_TAG_BASE}
retry make push TAG=${DOCKER_TAG_MODS}
retry make push TAG=${DOCKER_TAG_PROD}
retry make push TAG=${DOCKER_TAG_WORK}
env:
VERSION: ${{ matrix.version }}
RETRIES: 20
PAUSE: 10
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
&& (
(github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
||
(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-'))
)

View File

@@ -1,144 +0,0 @@
---
###
### Travis settings
###
sudo: required
language: python
services:
- docker
###
### Build Matrix
###
env:
global:
- IMAGE: devilbox/php-fpm
# travis encrypt DOCKER_USERNAME=user
# travis encrypt DOCKER_PASSWORD=pass
# Must be regenerated when repository name/owner changes
# DOCKER_USERNAME
- secure: "Y7xt3qZW9Zwrsgdd/aCf8ZqA7I039506ZDf/u/WVzGwNHta5YJJ7XYy8XG7XugyqGGXRVpfBiaqmDH4xsPLXyHXdOt2G38GXZHZXIgJOiEJ6aUfpdUxyeu8XIXkD2MDMmc3Kb27Yub/OadxRMLWEflzRnSXXs3KJ8TsbPHh0yRWDMsmHYOYl16gDGUX1izLkEx4J+9iA3+JwIFZk8by/OUuIIQ93bSNORpwHT8A1j7Y1kh8kYkPZ6nRxWO8xrc2wI1Rbp0X+ivLnOotxDZo53UI/0KroeSckDpoWfoz+B7mP+M+5B6kGlI2pKDNQB/ErYvnya6PdtFSS9skbvepR4tBhUOZDDY7NMRg9m3w0b9T1no+g3A4LBGXy6+OZZoiYAGy9LvqMhFkINqbBhRBX+mZhtG0pNXunfcu5dk81Ni/XpXDiy9JU98jItwsRj4SeaPfSt0LUNNXMS/fEwZyTy6TihN1CM3krJpV30Ic5rN64FRnrRjUuNU4lJ/W36yUhM29gb13ahh+f7sDsYoCzMwDM9HFe0YLb3ar3mW1lb3FuUugU2f2EupgCPY60X2XrY9aSgCfbdiVsA84dbLtRfHTPG7UbEcJW5RH8HS+9qVZBK+AcPqon9jbOJRVh7q99YW+R8X/XeyYpz7amacVmRus80+toZ16bbU7D2Qgjdek="
# DOCKER_PASSWORD
- secure: "ZRrVOVOkSCS2UxEi1HNF1iKefK4sDT/sPRl1HxMQjLnRRaAMdG0aRnBwQf2YAM2qzhCfN85qt6zZtC4awc2mHiZ88JrAZxBjK6xj4BwOyLbDuzpBsKXnx8Nix+wyYYKSjsC3LOYrsUe+4rvkw3tVvVaX8G2llojwdksF34VDmmHBmzCG/Bsexk7UqC+qw0PZm7BtctQO+IL0btmMDijRDElxfR+AuPvf9JdkhYzw9TOO7Jqd53NssNVGyL+XSV0dfGn8PkZTp1e8D+28pLK4oGVog+Wk7Cq94hSGjk5AkWKvL5441rupG1AA8K3njeDNMKdov4o+dmnkAH7Jh8tjShMhNhoxHce3IzpczjhoE1EyYQcyPf1qdfhV35Xv096iWX5809pp1MZF2oE5eism8JaU9NpGClryVbKVKtup8ko9/tCqz01Czq5Vue40feMkGtdePulg59OhyyPLYldsObw8QlZydkrmgVZe6b+GyybeiHraTfDq4pvTgUrC4Cmm5J3IB5Ig1THEiYKHfRJ5hSSMDDODeBXc8Xh6mFssEVshNx/jbUQWuAVYQFw/GIquVHxr6btbevrWIoD+zmqcc0L98u9pYH8w7b+gMgVJNCC4QQz2NCGGWw9l9/TmLrKJgeXbG18n8D314le1zuna6/VfH9pXIlbNO4hgz5NLHJk="
matrix:
- PHP=5.2
- PHP=5.3
- PHP=5.4
- PHP=5.5
- PHP=5.6
- PHP=7.0
- PHP=7.1
- PHP=7.2
- PHP=7.3
- PHP=7.4
- PHP=8.0
###
### Install requirements
###
install:
# Get newer docker version
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi done
- docker version
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo /etc/init.d/httpd stop || true
- sudo /etc/init.d/memcached stop || true
- sudo /etc/init.d/mongodb stop || true
- sudo /etc/init.d/mysql stop || true
- sudo /etc/init.d/nginx stop || true
- sudo /etc/init.d/postgresql stop || true
- sudo /etc/init.d/redis stop || true
- sudo service httpd stop || true
- sudo service memcached stop || true
- sudo service mongodb stop || true
- sudo service mysql stop || true
- sudo service nginx stop || true
- sudo service postgresql stop || true
- sudo service redis stop || true
- netstat -tulpn
###
### Check generation changes, build and test
###
before_script:
# Regenerate Dockerfiles and make sure nothing has changed (every stage)
- pip install ansible
- make generate
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
# Build (multiple tries due to network outages)
- max=100; i=0; while [ $i -lt $max ]; do if make build-base-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-base-${PHP//.}
- max=100; i=0; while [ $i -lt $max ]; do if make build-mods-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-mods-${PHP//.}
- max=100; i=0; while [ $i -lt $max ]; do if make build-prod-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-prod-${PHP//.}
- max=100; i=0; while [ $i -lt $max ]; do if make build-work-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
- make test-work-${PHP//.}
# Test if PHP modules have changed
- ./build/gen-readme.sh "${PHP}"
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
###
### Push to Dockerhub
###
script:
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin &&
if [ "${TRAVIS_BRANCH}" == "master" ]; then
echo "Pushing latest";
until docker push "${IMAGE}:${PHP}-base"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-mods"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-prod"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-work"; do sleep 1; done;
elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then
echo "Pushing branch ${TRAVIS_BRANCH}";
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}" &&
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}" &&
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}" &&
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}" &&
until docker push "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}"; do sleep 1; done;
elif [ -n "${TRAVIS_TAG}" ]; then
echo "Pushing tag ${TRAVIS_TAG}";
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_TAG}" &&
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}" &&
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}" &&
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_TAG}" &&
until docker push "${IMAGE}:${PHP}-base-${TRAVIS_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-work-${TRAVIS_TAG}"; do sleep 1; done;
elif [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then
if MY_TAG="$( git describe --exact-match "$(git rev-parse HEAD)" 2>/dev/null )"; then
echo "Pushing cron tag ${MY_TAG}";
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${MY_TAG}" &&
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${MY_TAG}" &&
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${MY_TAG}" &&
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${MY_TAG}" &&
until docker push "${IMAGE}:${PHP}-base-${MY_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-mods-${MY_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-prod-${MY_TAG}"; do sleep 1; done;
until docker push "${IMAGE}:${PHP}-work-${MY_TAG}"; do sleep 1; done;
fi
else
echo "Skipping push to dockerhub on normal branches";
fi
else
echo "Skipping push to dockerhub on PR";
fi

View File

@@ -11,3 +11,4 @@ rules:
require-starting-space: false
min-spaces-from-content: 1
line-length: disable
truthy: disable

242
CHANGELOG.md Normal file
View File

@@ -0,0 +1,242 @@
# Changelog
## Unreleased
## Release 0.127
#### Changed
- Adding `pdo_sqlsrv` to more PHP versions
## Release 0.126
#### Changed
- Added Homebrew for all versions
## Release 0.125
#### Changed
- Re-added `opcache` for PHP 8.1
- Pin `ansible` version for all work images
- Pin `wp-cli` version for PHP 5.4 and 5.5
## Release 0.124
#### Fixed
- Fixed `pdo_sqlsrv` version for PHP 7.2
- Fixed `sqlsrv` version for PHP 7.2
- Fixed `swoole` version for PHP 7.1
- Fixed pip installation
#### Changed
- Removed `opcache` for PHP 8.1
- Removed `xlswriter` for PHP 8.1
- Removed `linuxbrew` for all versions
- [#201](https://github.com/devilbox/docker-php-fpm/issues/201) Deactivated `psr` and `phalcon` by default
- Removed `drush9` from PHP 7.0 and 7.1
- Removed `drupalconsole` from PHP 7.0 and 7.1
## Release 0.123
#### Fixed
- Fixex `redis` module compilation for PHP 8.1
- Fixed PHP Xdebug v3 defaults to:
```ini
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000
```
#### Changed
- Removed `pdo_dblib` from PHP 8.1 due to errors
## Release 0.122
#### Added
- Added `apcu`, `blackfire`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.0
- Added `apcu`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.1
#### Changed
- Migrate from Travis CI to GitHub Actions
## Release 0.121
#### Fixed
- Fixed `msgpack` install for PHP 7.0 - 7.4
#### Changed
- Compile `redis` extension with `msgpack` and `igbinary`
## Release 0.120
#### Fixed
- Fixed `zsh` install for PHP 5.6 and 7.0
## Release 0.119
#### Fixed
- Fixed `drupal` (drupal console launcher) for PHP 5.5, 5.6, 7.0 and 7.1
- Fixed `zsh` install for PHP 5.6 and 7.0
## Release 0.118
#### Fixed
- Fixed `mdl` rubygem
#### Added
- [#182](https://github.com/devilbox/docker-php-fpm/issues/182) Added `ioncube` to PHP 7.4
- Added `sqlsrv` to PHP 7.4
#### Changed
- Updated xdebug to latest possible version
## Release 0.117
#### Fixed
- [#755](https://github.com/cytopia/devilbox/issues/755) Add .composer/vendir/bin to $PATH variable
#### Added
- [#692](https://github.com/cytopia/devilbox/issues/692) Add custom supervisor config mountpoint
## Release 0.116
#### Fixed
- [#749](https://github.com/cytopia/devilbox/issues/749) Fix to disable PHP modules without trailing `*.so` extension
## Release 0.115
#### Fixed
- [#703](https://github.com/cytopia/devilbox/issues/703) Don't fail on uid/gid change
## Release 0.114
#### Fixed
- Use latest PHP 8.0 image
- Disabled gd-jis: https://bugs.php.net/bug.php?id=73582
#### Added
- Add PHP 8.1
- PHP module mongodb is added to PHP 8.0
#### Changed
- Composer is updated to v2 (/usr/local/bin/composer)
- Composer is available as v1 and v2 (/usr/local/bin/composer-[12])
## Release 0.113
#### Fixed
- Fixes nightly build pipeline
## Release 0.112
#### Fixed
- Fixes [166](https://github.com/devilbox/docker-php-fpm/issues/166) Missing `locale-gen` binary
#### Added
- Added vips extension
- Added xlswriter extension
## Release 0.111
#### Added
- Added xdebug for PHP 8.0
## Release 0.110
#### Fixed
- [169](https://github.com/devilbox/docker-php-fpm/issues/169) Fixes download for drupal console
- Fixes laravel installer for PHP 7.2
## Release 0.109
#### Fixed
- Fixed absolute paths in tests
## Release 0.108
#### Added
- Added ghostscript
- Added gsfonts
- Added imagick PDF support (via ghostscript)
- Added mupdf and mupdf-tools
#### Fixed
- Fixes Ansible installation
- Fixes MongoDB for PHP 5.6
- Fixes Redis for PHP 8.0
- Fixes policy.xml for Imagick
#### Changed
- Stricter version check for installed tools
## Release 0.107
#### Fixed
- Fixes login to Dockerhub for CI jobs
- Fixes imagick segfault by setting its threads to 1
#### Added
- Re-added imap for PHP 7.4
- Adding `certbot` binary
## Release 0.106
#### Fixed
- [#153](https://github.com/devilbox/docker-php-fpm/pull/153) Use numeric order for startup files
- Fix build of PHP-FPM 7.4 snmp module
- Disable PHP-FPM 8.0 uploadprogress module due to startup warnings
## Release 0.105
#### Fixed
- Fix pdo_sqlsrv install for PHP 7.1
- Fix sqlsrv install for PHP 7.1
- Fix composer memory issues during install
#### Added
- `phalcon` binary for PHP 7.3 and 7.4
## Release 0.104
#### Fixed
- Fix xdebug install for PHP 7.0
## Release 0.103
#### Added
- Add PHP [yaml](https://pecl.php.net/package/yaml) module
## Release 0.102
#### Added
- [#144](https://github.com/devilbox/docker-php-fpm/issues/144) Added CHANGELOG
#### Changed
- [#123](https://github.com/devilbox/docker-php-fpm/issues/123) Added Dart Sass and removed Ruby Sass
- Replace [scss-lint](https://github.com/sds/scss-lint) with [stylelint](https://github.com/stylelint/stylelint)

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.2 Image" \
image="devilbox/php-fpm" \
tag="5.2-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.2-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,14 +43,14 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -51,7 +59,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -73,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -99,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.3 Image" \
image="devilbox/php-fpm" \
tag="5.3-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.3-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,14 +43,14 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -51,7 +59,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -73,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -99,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.4 Image" \
image="devilbox/php-fpm" \
tag="5.4-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.4-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,14 +43,14 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -51,7 +59,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -73,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -99,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.5 Image" \
image="devilbox/php-fpm" \
tag="5.5-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.5-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,14 +43,14 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -51,7 +59,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -73,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \
@@ -99,4 +107,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.6 Image" \
image="devilbox/php-fpm" \
tag="5.6-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.6-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.0 Image" \
image="devilbox/php-fpm" \
tag="7.0-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.0-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.1 Image" \
image="devilbox/php-fpm" \
tag="7.1-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.1-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.2 Image" \
image="devilbox/php-fpm" \
tag="7.2-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.2-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.3 Image" \
image="devilbox/php-fpm" \
tag="7.3-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.3-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -1,17 +1,25 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-7.4
FROM php:7.4-fpm
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.4 Image" \
image="devilbox/php-fpm" \
tag="7.4-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.4-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 8.0 Image" \
image="devilbox/php-fpm" \
tag="8.0-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.0-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-base"
###
@@ -27,7 +35,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -35,7 +43,7 @@ RUN set -x \
###
### Upgrade (install ps)
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -44,7 +52,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -66,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -92,4 +100,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -0,0 +1,104 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-8.1
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.1-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-base"
###
### Envs
###
ENV MY_USER="devilbox" \
MY_GROUP="devilbox" \
MY_UID="1000" \
MY_GID="1000" \
PHP_VERSION="8.1"
###
### User/Group
###
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
###
### Upgrade (install ps)
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
###
### Configure
###
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
&& mkdir -p /var/lib/php/wsdlcache \
&& chown -R devilbox:devilbox /var/lib/php/session \
&& chown -R devilbox:devilbox /var/lib/php/wsdlcache
###
### Copy files
###
COPY ./data/php-ini.d/php-8.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.1.conf /usr/local/etc/php-fpm.conf
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -60,10 +60,18 @@ set_uid() {
fi
# Change uid and fix homedir permissions
log "info" "Changing user '${username}' uid to: ${uid}" "${debug}"
run "usermod -u ${uid} ${username}" "${debug}"
run "chown -R ${username} ${homedir}" "${debug}"
if ! run "usermod -u ${uid} ${username} 2>/dev/null" "${debug}"; then
run "usermod -u ${uid} ${username}" "${debug}"
fi
run "chown -R ${username} ${homedir} 2>/dev/null || true" "${debug}"
run "chown -R ${username} /var/lib/php/session" "${debug}"
run "chown -R ${username} /var/lib/php/wsdlcache" "${debug}"
if [ -f "/var/spool/mail/devilbox" ]; then
run "chown -R ${username} /var/spool/mail/devilbox" "${debug}"
fi
if [ -d "/etc/supervisor/custom.d" ]; then
run "chown -R ${username} /etc/supervisor/custom.d" "${debug}"
fi
fi
fi
}
@@ -100,12 +108,20 @@ set_gid() {
run "groupmod -g ${spare_gid} ${target_groupname}" "${debug}"
fi
fi
# Change ugd and fix homedir permissions
# Change gid and fix homedir permissions
log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}"
run "groupmod -g ${gid} ${groupname}" "${debug}"
run "chown -R :${groupname} ${homedir}" "${debug}"
if ! run "groupmod -g ${gid} ${groupname} 2>/dev/null" "${debug}"; then
run "groupmod -g ${gid} ${groupname}" "${debug}"
fi
run "chown -R :${groupname} ${homedir} 2>/dev/null || true" "${debug}"
run "chown -R :${groupname} /var/lib/php/session" "${debug}"
run "chown -R :${groupname} /var/lib/php/wsdlcache" "${debug}"
if [ -f "/var/spool/mail/devilbox" ]; then
run "chown -R :${groupname} /var/spool/mail/devilbox" "${debug}"
fi
if [ -d "/etc/supervisor/custom.d" ]; then
run "chown -R :${groupname} /etc/supervisor/custom.d" "${debug}"
fi
fi
fi
}

View File

@@ -2,7 +2,7 @@
set -e
set -u
set -p pipefail
set -o pipefail
###
@@ -52,4 +52,4 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting $( php-fpm -v 2>&1 | head -1 )" "${DEBUG_LEVEL}"
exec /usr/local/sbin/php-fpm
exec "${@}"

View File

@@ -0,0 +1,134 @@
; ################################################################################
; ####
; #### The following settings can be overwritten by later includes
; ####
; ################################################################################
; ############################################################
; Timeouts
; ############################################################
[www]
; The timeout for serving a single request after which the worker process will be killed.
; This option should be used when the 'max_execution_time' ini option does not stop script
; execution for some reason.
request_terminate_timeout = 120s
; ############################################################
; Logging
; ############################################################
[global]
error_log = /proc/self/fd/2
log_level = notice
[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2
; ############################################################
; Backlog configuration
; ############################################################
[www]
; A maximum of backlog incoming connections will be queued for processing.
; If a connection request arrives with the queue full the client may receive an error with an
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
; the request may be ignored so that retries may succeed.
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
; are silently truncated
listen.backlog = 1024
; ############################################################
; Worker configuration
; ############################################################
[www]
; static - the number of child processes is fixed (pm.max_children).
;
; dynamic - the number of child processes is set dynamically based on the following directives:
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
;
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
; pm.start_servers are started when the service is started.
pm = ondemand
; The maximum number of child processes to be created
pm.max_children = 50
; The number of child processes created on startup. Used only when pm is set to dynamic.
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
pm.start_servers = 4
; The desired minimum number of idle server processes.
pm.min_spare_servers = 2
; The desired maximum number of idle server processes.
pm.max_spare_servers = 6
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries.
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default value: 0.
pm.max_requests = 500
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
pm.process_idle_timeout = 10s
; ############################################################
; Include
; ############################################################
[global]
include = /usr/local/etc/php-fpm.d/*.conf
; ################################################################################
; ####
; #### The following settings overwrite any includes again
; ####
; ################################################################################
; ############################################################
; Required for Dockerization
; ############################################################
[global]
daemonize = no
[www]
; Keep env variables set by docker
clear_env = no
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes
; ############################################################
; User and Group
; ############################################################
[www]
user = devilbox
group = devilbox
; ############################################################
; Networking
; ############################################################
[www]
; Ensure to listen here
listen = 9000

View File

@@ -10,40 +10,40 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_nesting_level = 64
variables_order = EGPCS
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,40 +10,40 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_nesting_level = 64
variables_order = EGPCS
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
track_errors = On
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -0,0 +1,48 @@
; ############################################################
; # Devilbox PHP defaults for 8.1-base
; ############################################################
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
; If none is present, the one from the previous flavour is inherited.
[PHP]
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off
; Xdebug settings
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -1,59 +1,578 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:5.2-base
MAINTAINER "cytopia" <cytopia@everythingcli.org>
FROM devilbox/php-fpm:5.2-base as builder
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
firebird-dev \
freetds-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libfbclient2 \
libfreetype6-dev \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagic-dev \
libmcrypt-dev \
libmemcached-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librecode-dev \
libsasl2-dev \
libsnmp-dev \
libssl-dev \
libtidy-dev \
libvpx-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
snmp \
zlib1g-dev \
ca-certificates \
git
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
###
### Install and enable PHP modules
###
# Enable ffi if it exists
RUN set -eux \
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: ioncube --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install amqp-1.4.0 \
# Enabling
&& docker-php-ext-enable amqp \
&& true
# -------------------- Installing PHP Extension: bcmath --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
&& true
# -------------------- Installing PHP Extension: bz2 --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
&& true
# -------------------- Installing PHP Extension: calendar --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
&& true
# -------------------- Installing PHP Extension: dba --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
&& true
# -------------------- Installing PHP Extension: enchant --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Custom: Pecl command
&& echo "/usr" | pecl install enchant \
# Enabling
&& docker-php-ext-enable enchant \
&& true
# -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
&& true
# -------------------- Installing PHP Extension: fileinfo --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install fileinfo \
# Enabling
&& docker-php-ext-enable fileinfo \
&& true
# -------------------- Installing PHP Extension: ftp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ftp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
# -------------------- Installing PHP Extension: gettext --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
&& true
# -------------------- Installing PHP Extension: igbinary --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install igbinary-2.0.7 \
# Enabling
&& docker-php-ext-enable igbinary \
&& true
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
# -------------------- Installing PHP Extension: interbase --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
&& true
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install intl \
# Enabling
&& docker-php-ext-enable intl \
&& true
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
&& true
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
# -------------------- Installing PHP Extension: msgpack --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install msgpack-0.5.7 \
# Enabling
&& docker-php-ext-enable msgpack \
&& true
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache-2.2.7 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
# -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcached-2.1.0 \
# Enabling
&& docker-php-ext-enable memcached \
&& true
# -------------------- Installing PHP Extension: mongo --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Custom: Pecl command
&& yes yes | pecl install mongo-1.5.8 \
# Enabling
&& docker-php-ext-enable mongo \
&& true
# -------------------- Installing PHP Extension: oauth --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install oauth-1.2.3 \
# Enabling
&& docker-php-ext-enable oauth \
&& true
# -------------------- Installing PHP Extension: opcache --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Custom: Pecl command
&& pecl install zendopcache \
# Enabling
&& docker-php-ext-enable opcache \
&& true
# -------------------- Installing PHP Extension: pcntl --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
&& true
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
&& true
# -------------------- Installing PHP Extension: pdo_firebird --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& true
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
&& true
# -------------------- Installing PHP Extension: pgsql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
&& true
# -------------------- Installing PHP Extension: phar --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install phar \
# Enabling
&& docker-php-ext-enable phar \
&& true
# -------------------- Installing PHP Extension: pspell --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
&& true
# -------------------- Installing PHP Extension: recode --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
&& true
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install redis-2.2.7 \
# Enabling
&& docker-php-ext-enable redis \
&& true
# -------------------- Installing PHP Extension: shmop --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
&& true
# -------------------- Installing PHP Extension: snmp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure snmp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true
# -------------------- Installing PHP Extension: sockets --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
&& true
# -------------------- Installing PHP Extension: sysvmsg --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
&& true
# -------------------- Installing PHP Extension: sysvsem --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
&& true
# -------------------- Installing PHP Extension: sysvshm --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
&& true
# -------------------- Installing PHP Extension: tidy --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& true
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& true
# -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure wddx --with-libxml-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \
&& true
# -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install xdebug-2.2.7 \
# Enabling
&& docker-php-ext-enable xdebug \
&& true
# -------------------- Installing PHP Extension: xmlrpc --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
&& true
# -------------------- Installing PHP Extension: xsl --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
&& true
# -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& true
# Fix php.ini settings for enabled extensions
RUN set -eux \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
# Fix oracle dir for images that don't have oci installed
RUN set -eux \
&& mkdir -p /usr/lib/oracle/
# Shrink everything down
RUN set -eux \
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:5.2-base as final
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.2 Image" \
image="devilbox/php-fpm" \
tag="5.2-mods" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.2-mods"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-mods"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods"
###
### Envs
### Copy artifacts from builder
###
ENV BUILD_DEPS \
firebird-dev \
freetds-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libfbclient2 \
libfreetype6-dev \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagic-dev \
libmcrypt-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librecode-dev \
libsasl2-dev \
libsnmp-dev \
libssl-dev \
libtidy-dev \
libvpx-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
snmp \
zlib1g-dev \
ca-certificates \
git
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
ENV RUN_DEPS \
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libaspell15 \
libc-client2007e \
libenchant1c2a \
@@ -74,307 +593,19 @@ ENV RUN_DEPS \
libxpm4 \
libxslt1.1 \
snmp \
ca-certificates
###
### Install
###
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
${BUILD_DEPS} \
\
\
# ---- Installing PHP Extension: ioncube ----
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& (rm -rf /usr/local/lib/php/test/ioncube || true) \
&& (rm -rf /usr/local/lib/php/doc/ioncube || true) \
\
# ---- Installing PHP Extension: amqp ----
&& pecl install amqp-1.4.0 \
&& docker-php-ext-enable amqp \
&& (rm -rf /usr/local/lib/php/test/amqp || true) \
&& (rm -rf /usr/local/lib/php/doc/amqp || true) \
\
# ---- Installing PHP Extension: bcmath ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
&& (rm -rf /usr/local/lib/php/test/bcmath || true) \
&& (rm -rf /usr/local/lib/php/doc/bcmath || true) \
\
# ---- Installing PHP Extension: bz2 ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
&& (rm -rf /usr/local/lib/php/test/bz2 || true) \
&& (rm -rf /usr/local/lib/php/doc/bz2 || true) \
\
# ---- Installing PHP Extension: calendar ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
&& (rm -rf /usr/local/lib/php/test/calendar || true) \
&& (rm -rf /usr/local/lib/php/doc/calendar || true) \
\
# ---- Installing PHP Extension: dba ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
&& (rm -rf /usr/local/lib/php/test/dba || true) \
&& (rm -rf /usr/local/lib/php/doc/dba || true) \
\
# ---- Installing PHP Extension: enchant ----
&& echo "/usr" | pecl install enchant \
&& docker-php-ext-enable enchant \
&& (rm -rf /usr/local/lib/php/test/enchant || true) \
&& (rm -rf /usr/local/lib/php/doc/enchant || true) \
\
# ---- Installing PHP Extension: exif ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
&& (rm -rf /usr/local/lib/php/test/exif || true) \
&& (rm -rf /usr/local/lib/php/doc/exif || true) \
\
# ---- Installing PHP Extension: fileinfo ----
&& pecl install fileinfo \
&& docker-php-ext-enable fileinfo \
&& (rm -rf /usr/local/lib/php/test/fileinfo || true) \
&& (rm -rf /usr/local/lib/php/doc/fileinfo || true) \
\
# ---- Installing PHP Extension: ftp ----
&& /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
&& (rm -rf /usr/local/lib/php/test/ftp || true) \
&& (rm -rf /usr/local/lib/php/doc/ftp || true) \
\
# ---- Installing PHP Extension: gd ----
&& ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
&& /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& (rm -rf /usr/local/lib/php/test/gd || true) \
&& (rm -rf /usr/local/lib/php/doc/gd || true) \
\
# ---- Installing PHP Extension: gettext ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
&& (rm -rf /usr/local/lib/php/test/gettext || true) \
&& (rm -rf /usr/local/lib/php/doc/gettext || true) \
\
# ---- Installing PHP Extension: igbinary ----
&& pecl install igbinary-2.0.7 \
&& docker-php-ext-enable igbinary \
&& (rm -rf /usr/local/lib/php/test/igbinary || true) \
&& (rm -rf /usr/local/lib/php/doc/igbinary || true) \
\
# ---- Installing PHP Extension: imap ----
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& (rm -rf /usr/local/lib/php/test/imap || true) \
&& (rm -rf /usr/local/lib/php/doc/imap || true) \
\
# ---- Installing PHP Extension: interbase ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
&& (rm -rf /usr/local/lib/php/test/interbase || true) \
&& (rm -rf /usr/local/lib/php/doc/interbase || true) \
\
# ---- Installing PHP Extension: intl ----
&& pecl install intl \
&& docker-php-ext-enable intl \
&& (rm -rf /usr/local/lib/php/test/intl || true) \
&& (rm -rf /usr/local/lib/php/doc/intl || true) \
\
# ---- Installing PHP Extension: ldap ----
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
&& (rm -rf /usr/local/lib/php/test/ldap || true) \
&& (rm -rf /usr/local/lib/php/doc/ldap || true) \
\
# ---- Installing PHP Extension: mcrypt ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& (rm -rf /usr/local/lib/php/test/mcrypt || true) \
&& (rm -rf /usr/local/lib/php/doc/mcrypt || true) \
\
# ---- Installing PHP Extension: msgpack ----
&& pecl install msgpack-0.5.7 \
&& docker-php-ext-enable msgpack \
&& (rm -rf /usr/local/lib/php/test/msgpack || true) \
&& (rm -rf /usr/local/lib/php/doc/msgpack || true) \
\
# ---- Installing PHP Extension: memcache ----
&& pecl install memcache \
&& docker-php-ext-enable memcache \
&& (rm -rf /usr/local/lib/php/test/memcache || true) \
&& (rm -rf /usr/local/lib/php/doc/memcache || true) \
\
# ---- Installing PHP Extension: memcached ----
&& pecl install memcached-2.1.0 \
&& docker-php-ext-enable memcached \
&& (rm -rf /usr/local/lib/php/test/memcached || true) \
&& (rm -rf /usr/local/lib/php/doc/memcached || true) \
\
# ---- Installing PHP Extension: mongo ----
&& yes | pecl install mongo-1.5.8 \
&& docker-php-ext-enable mongo \
&& (rm -rf /usr/local/lib/php/test/mongo || true) \
&& (rm -rf /usr/local/lib/php/doc/mongo || true) \
\
# ---- Installing PHP Extension: opcache ----
&& pecl install zendopcache \
&& docker-php-ext-enable opcache \
&& (rm -rf /usr/local/lib/php/test/opcache || true) \
&& (rm -rf /usr/local/lib/php/doc/opcache || true) \
\
# ---- Installing PHP Extension: pcntl ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
&& (rm -rf /usr/local/lib/php/test/pcntl || true) \
&& (rm -rf /usr/local/lib/php/doc/pcntl || true) \
\
# ---- Installing PHP Extension: pdo_dblib ----
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
&& (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \
&& (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \
\
# ---- Installing PHP Extension: pdo_firebird ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \
&& (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \
\
# ---- Installing PHP Extension: pdo_pgsql ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
&& (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \
&& (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \
\
# ---- Installing PHP Extension: pgsql ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
&& (rm -rf /usr/local/lib/php/test/pgsql || true) \
&& (rm -rf /usr/local/lib/php/doc/pgsql || true) \
\
# ---- Installing PHP Extension: phar ----
&& pecl install phar \
&& docker-php-ext-enable phar \
&& (rm -rf /usr/local/lib/php/test/phar || true) \
&& (rm -rf /usr/local/lib/php/doc/phar || true) \
\
# ---- Installing PHP Extension: pspell ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
&& (rm -rf /usr/local/lib/php/test/pspell || true) \
&& (rm -rf /usr/local/lib/php/doc/pspell || true) \
\
# ---- Installing PHP Extension: recode ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
&& (rm -rf /usr/local/lib/php/test/recode || true) \
&& (rm -rf /usr/local/lib/php/doc/recode || true) \
\
# ---- Installing PHP Extension: redis ----
&& pecl install redis-2.2.7 \
&& docker-php-ext-enable redis \
&& (rm -rf /usr/local/lib/php/test/redis || true) \
&& (rm -rf /usr/local/lib/php/doc/redis || true) \
\
# ---- Installing PHP Extension: shmop ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
&& (rm -rf /usr/local/lib/php/test/shmop || true) \
&& (rm -rf /usr/local/lib/php/doc/shmop || true) \
\
# ---- Installing PHP Extension: snmp ----
&& /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& (rm -rf /usr/local/lib/php/test/snmp || true) \
&& (rm -rf /usr/local/lib/php/doc/snmp || true) \
\
# ---- Installing PHP Extension: sockets ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
&& (rm -rf /usr/local/lib/php/test/sockets || true) \
&& (rm -rf /usr/local/lib/php/doc/sockets || true) \
\
# ---- Installing PHP Extension: sysvmsg ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
&& (rm -rf /usr/local/lib/php/test/sysvmsg || true) \
&& (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \
\
# ---- Installing PHP Extension: sysvsem ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
&& (rm -rf /usr/local/lib/php/test/sysvsem || true) \
&& (rm -rf /usr/local/lib/php/doc/sysvsem || true) \
\
# ---- Installing PHP Extension: sysvshm ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
&& (rm -rf /usr/local/lib/php/test/sysvshm || true) \
&& (rm -rf /usr/local/lib/php/doc/sysvshm || true) \
\
# ---- Installing PHP Extension: tidy ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& (rm -rf /usr/local/lib/php/test/tidy || true) \
&& (rm -rf /usr/local/lib/php/doc/tidy || true) \
\
# ---- Installing PHP Extension: uploadprogress ----
&& pecl install uploadprogress \
&& docker-php-ext-enable uploadprogress \
&& (rm -rf /usr/local/lib/php/test/uploadprogress || true) \
&& (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \
\
# ---- Installing PHP Extension: wddx ----
&& /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \
&& (rm -rf /usr/local/lib/php/test/wddx || true) \
&& (rm -rf /usr/local/lib/php/doc/wddx || true) \
\
# ---- Installing PHP Extension: xdebug ----
&& pecl install xdebug-2.2.7 \
&& docker-php-ext-enable xdebug \
&& (rm -rf /usr/local/lib/php/test/xdebug || true) \
&& (rm -rf /usr/local/lib/php/doc/xdebug || true) \
\
# ---- Installing PHP Extension: xmlrpc ----
&& /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
&& (rm -rf /usr/local/lib/php/test/xmlrpc || true) \
&& (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \
\
# ---- Installing PHP Extension: xsl ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
&& (rm -rf /usr/local/lib/php/test/xsl || true) \
&& (rm -rf /usr/local/lib/php/doc/xsl || true) \
\
# ---- Installing PHP Extension: zip ----
&& /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& (rm -rf /usr/local/lib/php/test/zip || true) \
&& (rm -rf /usr/local/lib/php/doc/zip || true) \
\
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \
&& rm -rf /tmp/* \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
&& update-ca-certificates \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
&& update-ca-certificates
###
### Post Install
###
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -454,6 +685,8 @@ RUN set -x \
&& php-fpm -m | grep -oiE '^mysql$' \
&& php -m | grep -oiE '^mysqli$' \
&& php-fpm -m | grep -oiE '^mysqli$' \
&& php -m | grep -oiE '^oauth$' \
&& php-fpm -m | grep -oiE '^oauth$' \
&& php -m | grep -oiE '^Zend Opcache$' \
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
&& php -m | grep -oiE '^openssl$' \
@@ -534,6 +767,13 @@ RUN set -x \
&& true
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Ports
###
@@ -543,4 +783,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,860 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:8.1-base as builder
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libfbclient2 \
libfreetype6-dev \
libgmp-dev \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
libsasl2-dev \
libsnmp-dev \
libsodium-dev \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
libzip-dev \
snmp \
zlib1g-dev \
ca-certificates \
git
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
###
### Install and enable PHP modules
###
# Enable ffi if it exists
RUN set -eux \
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: apcu --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install apcu \
# Enabling
&& docker-php-ext-enable apcu \
&& true
# -------------------- Installing PHP Extension: bcmath --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
&& true
# -------------------- Installing PHP Extension: bz2 --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
&& true
# -------------------- Installing PHP Extension: calendar --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
&& true
# -------------------- Installing PHP Extension: dba --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
&& true
# -------------------- Installing PHP Extension: enchant --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \
&& true
# -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
# -------------------- Installing PHP Extension: gettext --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
&& true
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
&& true
# -------------------- Installing PHP Extension: igbinary --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install igbinary \
# Enabling
&& docker-php-ext-enable igbinary \
&& true
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
&& true
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mcrypt \
# Enabling
&& docker-php-ext-enable mcrypt \
&& true
# -------------------- Installing PHP Extension: msgpack --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install msgpack \
# Enabling
&& docker-php-ext-enable msgpack \
&& true
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
# Enabling
&& docker-php-ext-enable memcache \
&& true
# -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \
&& cd /tmp/memcached \
# Custom: Branch
&& git checkout master \
# Custom: Install command
&& true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.1
&& sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \
&& phpize \
&& ./configure --enable-memcached \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable memcached \
&& true
# -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mongodb \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
# -------------------- Installing PHP Extension: oauth --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install oauth \
# Enabling
&& docker-php-ext-enable oauth \
&& true
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
\
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
&& true
# -------------------- Installing PHP Extension: opcache --------------------
RUN set -eux \
# Version specific pre-command
&& curl -sS https://raw.githubusercontent.com/php/php-src/php-8.0.6/ext/opcache/Optimizer/zend_dfg.h > /usr/local/include/php/Zend/Optimizer/zend_dfg.h \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \
&& true
# -------------------- Installing PHP Extension: pcntl --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
&& true
# -------------------- Installing PHP Extension: pdo_firebird --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& true
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \
&& true
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
&& true
# -------------------- Installing PHP Extension: pgsql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
&& true
# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
# Enabling
&& docker-php-ext-enable psr \
&& true
# -------------------- Installing PHP Extension: pspell --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
&& true
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' library.c \
&& sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' redis_array_impl.c \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
# -------------------- Installing PHP Extension: shmop --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
&& true
# -------------------- Installing PHP Extension: snmp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure snmp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true
# -------------------- Installing PHP Extension: soap --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& true
# -------------------- Installing PHP Extension: sockets --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
&& true
# -------------------- Installing PHP Extension: sodium --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \
&& true
# -------------------- Installing PHP Extension: solr --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install solr \
# Enabling
&& docker-php-ext-enable solr \
&& true
# -------------------- Installing PHP Extension: sysvmsg --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
&& true
# -------------------- Installing PHP Extension: sysvsem --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
&& true
# -------------------- Installing PHP Extension: sysvshm --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
&& true
# -------------------- Installing PHP Extension: tidy --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& true
# -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/xdebug/xdebug /tmp/xdebug \
&& cd /tmp/xdebug \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Default: Install command
&& phpize \
&& ./configure --enable-xdebug \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling
&& docker-php-ext-enable xdebug \
&& true
# -------------------- Installing PHP Extension: xsl --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
&& true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& true
# Fix php.ini settings for enabled extensions
RUN set -eux \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
# Fix oracle dir for images that don't have oci installed
RUN set -eux \
&& mkdir -p /usr/lib/oracle/
# Shrink everything down
RUN set -eux \
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:8.1-base as final
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.1-mods"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-mods"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-mods"
###
### Copy artifacts from builder
###
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libfbclient2 \
libffi6 \
libfreetype6 \
libicu63 \
libjpeg62-turbo \
libmcrypt4 \
libmemcachedutil2 \
libpng16-16 \
libpq5 \
libtidy5deb1 \
libvpx5 \
libwebp6 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
&& update-ca-certificates
###
### Post Install
###
RUN set -eux \
# ---------- oci8 ----------
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
&& true
###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini \
\
&& php -m | grep -oiE '^apcu$' \
&& php-fpm -m | grep -oiE '^apcu$' \
&& php -m | grep -oiE '^bcmath$' \
&& php-fpm -m | grep -oiE '^bcmath$' \
&& php -m | grep -oiE '^bz2$' \
&& php-fpm -m | grep -oiE '^bz2$' \
&& php -m | grep -oiE '^calendar$' \
&& php-fpm -m | grep -oiE '^calendar$' \
&& php -m | grep -oiE '^ctype$' \
&& php-fpm -m | grep -oiE '^ctype$' \
&& php -m | grep -oiE '^curl$' \
&& php-fpm -m | grep -oiE '^curl$' \
&& php -m | grep -oiE '^dba$' \
&& php-fpm -m | grep -oiE '^dba$' \
&& php -m | grep -oiE '^dom$' \
&& php-fpm -m | grep -oiE '^dom$' \
&& php -m | grep -oiE '^enchant$' \
&& php-fpm -m | grep -oiE '^enchant$' \
&& php -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^ffi$' \
&& php-fpm -m | grep -oiE '^ffi$' \
&& php -m | grep -oiE '^fileinfo$' \
&& php-fpm -m | grep -oiE '^fileinfo$' \
&& php -m | grep -oiE '^filter$' \
&& php-fpm -m | grep -oiE '^filter$' \
&& php -m | grep -oiE '^ftp$' \
&& php-fpm -m | grep -oiE '^ftp$' \
&& php -m | grep -oiE '^gd$' \
&& php-fpm -m | grep -oiE '^gd$' \
&& php -m | grep -oiE '^gettext$' \
&& php-fpm -m | grep -oiE '^gettext$' \
&& php -m | grep -oiE '^gmp$' \
&& php-fpm -m | grep -oiE '^gmp$' \
&& php -m | grep -oiE '^hash$' \
&& php-fpm -m | grep -oiE '^hash$' \
&& php -m | grep -oiE '^iconv$' \
&& php-fpm -m | grep -oiE '^iconv$' \
&& php -m | grep -oiE '^igbinary$' \
&& php-fpm -m | grep -oiE '^igbinary$' \
&& php -m | grep -oiE '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \
&& php-fpm -m | grep -oiE '^json$' \
&& php -m | grep -oiE '^ldap$' \
&& php-fpm -m | grep -oiE '^ldap$' \
&& php -m | grep -oiE '^libxml$' \
&& php-fpm -m | grep -oiE '^libxml$' \
&& php -m | grep -oiE '^mbstring$' \
&& php-fpm -m | grep -oiE '^mbstring$' \
&& php -m | grep -oiE '^mcrypt$' \
&& php-fpm -m | grep -oiE '^mcrypt$' \
&& php -m | grep -oiE '^msgpack$' \
&& php-fpm -m | grep -oiE '^msgpack$' \
&& php -m | grep -oiE '^memcache$' \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mongodb$' \
&& php-fpm -m | grep -oiE '^mongodb$' \
&& php -m | grep -oiE '^mysqli$' \
&& php-fpm -m | grep -oiE '^mysqli$' \
&& php -m | grep -oiE '^mysqlnd$' \
&& php-fpm -m | grep -oiE '^mysqlnd$' \
&& php -m | grep -oiE '^oauth$' \
&& php-fpm -m | grep -oiE '^oauth$' \
&& php -m | grep -oiE '^oci8$' \
&& php-fpm -m | grep -oiE '^oci8$' \
&& php -m | grep -oiE '^Zend Opcache$' \
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
&& php -m | grep -oiE '^openssl$' \
&& php-fpm -m | grep -oiE '^openssl$' \
&& php -m | grep -oiE '^pcntl$' \
&& php-fpm -m | grep -oiE '^pcntl$' \
&& php -m | grep -oiE '^pcre$' \
&& php-fpm -m | grep -oiE '^pcre$' \
&& php -m | grep -oiE '^pdo$' \
&& php-fpm -m | grep -oiE '^pdo$' \
&& php -m | grep -oiE '^pdo_firebird$' \
&& php-fpm -m | grep -oiE '^pdo_firebird$' \
&& php -m | grep -oiE '^pdo_mysql$' \
&& php-fpm -m | grep -oiE '^pdo_mysql$' \
&& php -m | grep -oiE '^pdo_oci$' \
&& php-fpm -m | grep -oiE '^pdo_oci$' \
&& php -m | grep -oiE '^pdo_pgsql$' \
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \
&& php -m | grep -oiE '^pdo_sqlite$' \
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \
&& php -m | grep -oiE '^pgsql$' \
&& php-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \
&& php-fpm -m | grep -oiE '^psr$' \
&& php -m | grep -oiE '^phar$' \
&& php-fpm -m | grep -oiE '^phar$' \
&& php -m | grep -oiE '^posix$' \
&& php-fpm -m | grep -oiE '^posix$' \
&& php -m | grep -oiE '^pspell$' \
&& php-fpm -m | grep -oiE '^pspell$' \
&& php -m | grep -oiE '^readline$' \
&& php -m | grep -oiE '^redis$' \
&& php-fpm -m | grep -oiE '^redis$' \
&& php -m | grep -oiE '^reflection$' \
&& php-fpm -m | grep -oiE '^reflection$' \
&& php -m | grep -oiE '^session$' \
&& php-fpm -m | grep -oiE '^session$' \
&& php -m | grep -oiE '^shmop$' \
&& php-fpm -m | grep -oiE '^shmop$' \
&& php -m | grep -oiE '^simplexml$' \
&& php-fpm -m | grep -oiE '^simplexml$' \
&& php -m | grep -oiE '^snmp$' \
&& php-fpm -m | grep -oiE '^snmp$' \
&& php -m | grep -oiE '^soap$' \
&& php-fpm -m | grep -oiE '^soap$' \
&& php -m | grep -oiE '^sockets$' \
&& php-fpm -m | grep -oiE '^sockets$' \
&& php -m | grep -oiE '^sodium$' \
&& php-fpm -m | grep -oiE '^sodium$' \
&& php -m | grep -oiE '^solr$' \
&& php-fpm -m | grep -oiE '^solr$' \
&& php -m | grep -oiE '^spl$' \
&& php-fpm -m | grep -oiE '^spl$' \
&& php -m | grep -oiE '^sysvmsg$' \
&& php-fpm -m | grep -oiE '^sysvmsg$' \
&& php -m | grep -oiE '^sysvsem$' \
&& php-fpm -m | grep -oiE '^sysvsem$' \
&& php -m | grep -oiE '^sysvshm$' \
&& php-fpm -m | grep -oiE '^sysvshm$' \
&& php -m | grep -oiE '^tidy$' \
&& php-fpm -m | grep -oiE '^tidy$' \
&& php -m | grep -oiE '^tokenizer$' \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^xdebug$' \
&& php-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \
&& php-fpm -m | grep -oiE '^xml$' \
&& php -m | grep -oiE '^xmlreader$' \
&& php-fpm -m | grep -oiE '^xmlreader$' \
&& php -m | grep -oiE '^xmlwriter$' \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \
&& true
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.2 Image" \
image="devilbox/php-fpm" \
tag="5.2-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.2-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.3 Image" \
image="devilbox/php-fpm" \
tag="5.3-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.3-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.4 Image" \
image="devilbox/php-fpm" \
tag="5.4-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.4-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.5 Image" \
image="devilbox/php-fpm" \
tag="5.5-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.5-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.6 Image" \
image="devilbox/php-fpm" \
tag="5.6-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.6-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.0 Image" \
image="devilbox/php-fpm" \
tag="7.0-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.0-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.1 Image" \
image="devilbox/php-fpm" \
tag="7.1-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.1-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.2 Image" \
image="devilbox/php-fpm" \
tag="7.2-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.2-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.3 Image" \
image="devilbox/php-fpm" \
tag="7.3-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.3-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.4 Image" \
image="devilbox/php-fpm" \
tag="7.4-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.4-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 8.0 Image" \
image="devilbox/php-fpm" \
tag="8.0-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.0-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,19 +40,20 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -77,7 +86,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -87,4 +95,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -0,0 +1,99 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
FROM devilbox/php-fpm:8.1-mods
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.1-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-prod"
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
cron \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
###
### Copy files
###
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
COPY ./data/postfix.sh /usr/local/sbin/postfix.sh
COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
###
### Volumes
###
VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -22,70 +22,83 @@ set_postfix() {
local debug="${7}"
local php_ini_file="${php_ini_dir}/devilbox-runtime-sendmail.ini"
local catch_all=
local enable_mail=
# Verify env value
if ! env_set "${env_varname}"; then
log "info" "\$${env_varname} not set." "${debug}"
log "info" "Postfix will not be started." "${debug}"
echo "" > "${php_ini_file}"
else
catch_all="$( env_get "${env_varname}" )"
if [ "${catch_all}" = "1" ]; then
log "info" "\$${env_varname} set to 1. Enabling postfix catch-all" "${debug}"
return
fi
# Configure PHP
{
echo "[mail function]";
echo "sendmail_path = $( which sendmail ) -t -i";
echo ";mail.force_extra_parameters =";
echo "mail.add_x_header = On";
echo "mail.log = ${php_mail_log}";
} > "${php_ini_file}"
# Retrieve env value
enable_mail="$( env_get "${env_varname}" )"
# PHP mail function logs to file
if [ "${docker_logs}" != "1" ]; then
# Fix PHP mail log file dir/file and permissions
if [ ! -d "$( dirname "${php_mail_log}" )" ]; then
run "mkdir -p $( dirname "${php_mail_log}" )" "${debug}"
fi
if [ ! -f "${php_mail_log}" ]; then
run "touch ${php_mail_log}" "${debug}"
fi
run "chown ${username}:${groupname} $( dirname "${php_mail_log}" )" "${debug}"
run "chown ${username}:${groupname} ${php_mail_log}" "${debug}"
run "chmod 0644 ${php_mail_log}" "${debug}"
# Enable postfix
if [ "${enable_mail}" = "1" ] || [ "${enable_mail}" = "2" ]; then
if [ "${enable_mail}" = "1" ]; then
log "info" "\$${env_varname} set to 1. Enabling postfix" "${debug}"
else
log "info" "\$${env_varname} set to 2. Enabling postfix catch-all" "${debug}"
fi
# Configure PHP
{
echo "[mail function]";
echo "sendmail_path = $( command -v sendmail ) -t -i";
echo ";mail.force_extra_parameters =";
echo "mail.add_x_header = On";
echo "mail.log = ${php_mail_log}";
} > "${php_ini_file}"
# PHP mail function logs to file
if [ "${docker_logs}" != "1" ]; then
# Fix PHP mail log file dir/file and permissions
if [ ! -d "$( dirname "${php_mail_log}" )" ]; then
run "mkdir -p $( dirname "${php_mail_log}" )" "${debug}"
fi
# Add Mail dir/file if it does not exist
if [ ! -d "/var/mail" ]; then
run "mkdir /var/mail" "${debug}"
fi
if [ ! -f "/var/mail/${username}" ]; then
run "touch /var/mail/${username}" "${debug}"
if [ ! -f "${php_mail_log}" ]; then
run "touch ${php_mail_log}" "${debug}"
fi
run "chown ${username}:${groupname} $( dirname "${php_mail_log}" )" "${debug}"
run "chown ${username}:${groupname} ${php_mail_log}" "${debug}"
run "chmod 0644 ${php_mail_log}" "${debug}"
fi
# Fix mail dir/file permissions after mount
run "chmod 0644 /var/mail/${username}" "${debug}"
run "chown ${username}:${groupname} /var/mail" "${debug}"
run "chown ${username}:${groupname} /var/mail/${username}" "${debug}"
# Add Mail dir/file if it does not exist
if [ ! -d "/var/mail" ]; then
run "mkdir /var/mail" "${debug}"
fi
if [ ! -f "/var/mail/${username}" ]; then
run "touch /var/mail/${username}" "${debug}"
fi
# warning: specify "strict_mailbox_ownership = no" to ignore mailbox ownership mismatch
run "postconf -e 'strict_mailbox_ownership=no'" "${debug}"
# Fix mail dir/file permissions after mount
run "chmod 0644 /var/mail/${username}" "${debug}"
run "chown ${username}:${groupname} /var/mail" "${debug}"
run "chown ${username}:${groupname} /var/mail/${username}" "${debug}"
# Postfix configuration
run "postconf -e 'inet_protocols=ipv4'" "${debug}"
# warning: specify "strict_mailbox_ownership = no" to ignore mailbox ownership mismatch
run "postconf -e 'strict_mailbox_ownership=no'" "${debug}"
# Postfix configuration
run "postconf -e 'inet_protocols=ipv4'" "${debug}"
# Postfix catch-all
if [ "${enable_mail}" = "2" ]; then
run "postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'" "${debug}"
run "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}"
run "newaliases" "${debug}"
elif [ "${catch_all}" = "0" ]; then
log "info" "\$${env_varname} set to 0. Disabling postfix catch-all" "${debug}"
else
log "err" "Invalid value for \$${env_varname}. Can only be 0 or 1. Prodived: ${catch_all}" "${debug}"
exit 1
fi
elif [ "${enable_mail}" = "0" ]; then
log "info" "\$${env_varname} set to 0. Disabling postfix" "${debug}"
else
log "err" "Invalid value for \$${env_varname}. Can only be 0, 1 or 2. Prodived: ${enable_mail}" "${debug}"
exit 1
fi
}

View File

@@ -33,7 +33,7 @@ disable_modules() {
mod="$( echo "${mod}" | xargs )" # trim
# Find all config files that enable that module
files="$( grep -Er "^(zend_)?extension.*(=|/)${mod}\.so" "${cfg_path}" || true )"
files="$( grep -Er "^(zend_)?extension.*(=|/)${mod}(\\.so)?\$" "${cfg_path}" || true )"
if [ -n "${files}" ]; then
while read -r f; do

View File

@@ -19,7 +19,7 @@ execute_custom_scripts() {
if [ ! -d "${script_dir}" ]; then
run "mkdir -p ${script_dir}" "${debug}"
fi
script_files="$( find "${script_dir}" -type f -iname '*.sh' )"
script_files="$( find -L "${script_dir}" -type f -iname '*.sh' | sort -n )"
# loop over them line by line
IFS='

View File

@@ -2,7 +2,7 @@
set -e
set -u
set -p pipefail
set -o pipefail
###
@@ -24,9 +24,6 @@ DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
# php-fpm conf.d directory
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
# This is the log file for any mail related functions
DVL_PHP_MAIL_LOG="/var/log/mail.log"
# This file holds error and access log definitions
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
@@ -34,6 +31,9 @@ DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
# PHP-FPM log dir
DVL_FPM_LOG_DIR="/var/log/php"
# This is the log file for any mail related functions
DVL_PHP_MAIL_LOG="${DVL_FPM_LOG_DIR}/mail.log"
# Custom ini dir (to be copied to actual ini dir)
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
@@ -138,7 +138,7 @@ done
###
### Supervisor: rsyslogd & postfix
###
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
if [ "$( env_get "ENABLE_MAIL" )" = "1" ] || [ "$( env_get "ENABLE_MAIL" )" = "2" ]; then
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
fi
@@ -190,4 +190,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
exec "${@}"

View File

@@ -22,14 +22,7 @@ set -o pipefail
###
### Variables
###
if [ -f "/etc/alpine-release" ]; then
MAILLOG="/var/log/maillog"
elif [ -f "/etc/debian_version" ]; then
MAILLOG="/var/log/mail.log"
else
MAILLOG="/var/log/maillog"
fi
MAILLOG="/var/log/mail.log"
MAILPID="/var/spool/postfix/pid/master.pid"

View File

@@ -6,4 +6,4 @@ pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
[include]
files = /etc/supervisor/conf.d/*.conf
files = /etc/supervisor/conf.d/*.conf /etc/supervisor/custom.d/*.conf

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.2 Image" \
image="devilbox/php-fpm" \
tag="5.2-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.2-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,25 +44,29 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -62,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -73,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -103,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -115,17 +146,18 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# pip
RUN set -eux \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -142,7 +174,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -151,33 +184,38 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -199,27 +237,31 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phpcs
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -239,6 +281,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -257,57 +300,10 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -317,19 +313,81 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -340,12 +398,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -363,7 +447,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -379,39 +463,42 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
RUN set -eux \
# -------------------- Software --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -422,6 +509,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -434,7 +528,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -458,4 +551,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.3 Image" \
image="devilbox/php-fpm" \
tag="5.3-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.3-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,25 +44,29 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -62,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -73,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -103,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -115,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,7 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -153,50 +192,52 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -218,7 +259,8 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.7 \
@@ -229,38 +271,51 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -280,6 +335,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -298,57 +354,17 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -358,19 +374,81 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -381,12 +459,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -404,7 +508,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -420,46 +524,50 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -470,6 +578,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -482,7 +597,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -506,4 +620,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.4 Image" \
image="devilbox/php-fpm" \
tag="5.4-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.4-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,25 +44,29 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -62,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -73,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -103,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -115,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,7 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -153,76 +192,81 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -244,52 +288,68 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.9 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://github.com/wp-cli/wp-cli/releases/download/v2.4.0/wp-cli-2.4.0.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -309,6 +369,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -327,57 +388,17 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -387,19 +408,81 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -410,12 +493,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -433,7 +542,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -449,50 +558,54 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -503,6 +616,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -515,7 +635,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -539,4 +658,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.5 Image" \
image="devilbox/php-fpm" \
tag="5.5-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.5-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,25 +44,29 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -62,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -73,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -103,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -115,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,11 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -157,83 +192,86 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -255,56 +293,69 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v3.4.11 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://github.com/wp-cli/wp-cli/releases/download/v2.4.0/wp-cli-2.4.0.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -324,6 +375,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -342,57 +394,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -402,19 +426,81 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -425,12 +511,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -448,7 +560,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \
@@ -464,54 +576,58 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -522,6 +638,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -534,7 +657,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -558,4 +680,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.6 Image" \
image="devilbox/php-fpm" \
tag="5.6-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="5.6-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,7 +133,9 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -114,19 +147,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +183,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +193,100 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
\
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,56 +308,69 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v3.4.11 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +390,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -354,57 +409,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -414,19 +441,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -437,12 +523,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +572,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
&& /usr/local/sbin/php-fpm --test \
@@ -476,55 +588,59 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -535,6 +651,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -547,7 +670,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -571,4 +693,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.0 Image" \
image="devilbox/php-fpm" \
tag="7.0-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.0-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,7 +133,9 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -114,19 +147,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +183,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +193,81 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,56 +289,69 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v3.4.11 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +371,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -354,57 +390,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -414,19 +422,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -437,12 +504,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +553,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -476,55 +569,57 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -535,6 +630,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -547,7 +649,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -571,4 +672,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.1 Image" \
image="devilbox/php-fpm" \
tag="7.1-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.1-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -114,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +192,81 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,56 +288,69 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v3.4.11 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +370,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -354,57 +389,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -414,19 +421,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -437,12 +503,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +552,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
&& /usr/local/sbin/php-fpm --test \
@@ -476,55 +568,57 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -535,6 +629,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -547,7 +648,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -571,4 +671,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.2 Image" \
image="devilbox/php-fpm" \
tag="7.2-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.2-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -114,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +192,100 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
\
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v4.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,56 +307,70 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phalcon
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +390,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -354,57 +409,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -414,19 +441,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -437,12 +523,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +572,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \
@@ -476,55 +588,59 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -535,6 +651,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -547,7 +670,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -571,4 +693,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.3 Image" \
image="devilbox/php-fpm" \
tag="7.3-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.3-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -114,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +192,100 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
\
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,45 +307,70 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# php-cs-fixer
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -325,6 +390,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -343,57 +409,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -403,19 +441,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -426,12 +523,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -449,7 +572,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
&& /usr/local/sbin/php-fpm --test \
@@ -465,54 +588,59 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -523,6 +651,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -535,7 +670,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -559,4 +693,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 7.4 Image" \
image="devilbox/php-fpm" \
tag="7.4-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="7.4-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -114,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# asgardcms
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -156,96 +192,100 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drush7
\
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
\
# drush8
\
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /usr/local/src/drush8 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
\
# drush9
\
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /usr/local/src/drush9 \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
\
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# laravel
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# lumen
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -267,41 +307,65 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \
&& COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# phpunit
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- phpunit --------------------
&& curl -sS -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -321,6 +385,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -339,57 +404,29 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require asgardcms/asgardcms-installer \
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require laravel/lumen-installer \
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -399,19 +436,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -422,12 +518,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -445,7 +567,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
&& /usr/local/sbin/php-fpm --test \
@@ -461,53 +583,58 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -518,6 +645,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -530,7 +664,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -554,4 +687,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 8.0 Image" \
image="devilbox/php-fpm" \
tag="8.0-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.0-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,24 +44,28 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -52,6 +77,7 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -61,7 +87,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -72,11 +100,14 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -102,6 +133,7 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
@@ -114,19 +146,26 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
# composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
# nvm
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,7 +182,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
# awesomeci
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -152,39 +192,42 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# drupalconsole
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
# gitflow
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
# linkcheck
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
# linuxbrew
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
# mysqldumpsecure
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
@@ -206,33 +249,46 @@ RUN set -x \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
# phpcs
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
# phpcbf
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
# wkhtmltopdf
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# wpcli
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
# cleanup
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
@@ -252,6 +308,7 @@ RUN set -x \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
@@ -270,57 +327,10 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
RUN set -eux \
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -330,19 +340,78 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
# mixlib_config
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
# rb_inotify
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
# mdl
&& gem install mdl \
# scss_lint
&& gem install scss_lint \
# sass
&& gem install sass \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
@@ -353,12 +422,38 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -376,7 +471,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \
@@ -392,44 +487,47 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
\
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
\
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
\
&& mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -440,6 +538,13 @@ RUN set -x \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -452,7 +557,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -476,4 +580,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -0,0 +1,584 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:8.1-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.1-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
automake \
bash-completion \
binutils \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
file \
gawk \
gcc \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
iputils-ping \
jq \
less \
libc-dev \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
openssh-client \
patch \
patchelf \
postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
subversion \
sudo \
tig \
tree \
unzip \
vim \
w3m \
wget \
whois \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \
&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \
&& chmod +x /usr/local/bin/composer-1 \
&& chmod +x /usr/local/bin/composer-2 \
&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \
\
\
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
\
&& { \
echo 'export NVM_DIR="/opt/nvm"'; \
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
} >> /home/devilbox/.bashrc \
\
&& chown -R devilbox:devilbox /opt/nvm \
\
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\
\
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \
&& ./configure --prefix=/usr/local \
&& make install \
&& cd / \
&& rm -rf /usr/local/src/awesome-ci \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
\
# -------------------- homebrew --------------------
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
\
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
\
# -------------------- mhsendmail --------------------
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\
\
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \
&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \
&& touch /var/log/mysqldump-secure.log \
&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \
&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \
&& chmod 0400 /etc/mysqldump-secure.conf \
&& chmod 0400 /etc/mysqldump-secure.cnf \
&& chmod 0644 /var/log/mysqldump-secure.log \
&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
\
\
# -------------------- symfony --------------------
&& SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \
\
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \
&& rm -rf /home/${MY_USER}/.config \
&& rm -rf /home/${MY_USER}/.drush \
&& rm -rf /home/${MY_USER}/.subversion \
&& rm -rf /home/${MY_USER}/.v8* \
\
&& rm -rf /root/.*json \
&& rm -rf /root/.cache \
&& rm -rf /root/.composer \
&& rm -rf /root/.config \
&& rm -rf /root/.drush \
&& rm -rf /root/.subversion \
&& rm -rf /root/.v8* \
\
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
\
\
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
&& (rm -rf /root/.composer || true) \
&& (rm -rf /root/.config || true) \
&& (rm -rf /root/.npm || true) \
\
&& (rm -rf /home/devilbox/.cache || true) \
&& (rm -rf /home/devilbox/.composer || true) \
&& (rm -rf /home/devilbox/.config || true) \
&& (rm -rf /home/devilbox/.npm || true) \
\
&& (rm -rf /usr/local/src/composer/cache/* || true) \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true)
###
### Install Composer (PHP)
###
RUN set -eux \
\
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install npm (Node)
###
RUN set -eux \
# -------------------- angular_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \
\
# -------------------- eslint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \
\
# -------------------- grunt --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \
\
# -------------------- grunt_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \
\
# -------------------- gulp --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \
\
# -------------------- jsonlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \
\
# -------------------- pm2 --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \
\
# -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \
\
# -------------------- sass --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \
\
# -------------------- stylelint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \
\
# -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\
# -------------------- vue_cli_service_global --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \
\
# -------------------- webpack --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \
\
# -------------------- webpack_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \
\
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
\
# -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \
echo " if [ -r \"\${f}\" ]; then"; \
echo " . \"\${f}\""; \
echo " fi"; \
echo " done"; \
echo " unset f"; \
echo "fi"; \
} | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \
&& chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE}
###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[0-9][.0-9]+' \
&& stylelint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- GEM --------------------
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
&& rm -rf /root/.composer \
&& rm -rf /root/.drush \
&& rm -rf /root/.pm2 \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true)
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
COPY ./data/php-ini.d/php-8.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.1.conf /usr/local/etc/php-fpm.conf
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /shared/backups
VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
EXPOSE 9000
###
### Where to start inside the container
###
WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -2,7 +2,7 @@
set -e
set -u
set -p pipefail
set -o pipefail
###
@@ -24,9 +24,6 @@ DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
# php-fpm conf.d directory
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
# This is the log file for any mail related functions
DVL_PHP_MAIL_LOG="/var/log/mail.log"
# This file holds error and access log definitions
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
@@ -34,6 +31,9 @@ DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
# PHP-FPM log dir
DVL_FPM_LOG_DIR="/var/log/php"
# This is the log file for any mail related functions
DVL_PHP_MAIL_LOG="${DVL_FPM_LOG_DIR}/mail.log"
# Custom ini dir (to be copied to actual ini dir)
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
@@ -138,7 +138,7 @@ done
###
### Supervisor: rsyslogd & postfix
###
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
if [ "$( env_get "ENABLE_MAIL" )" = "1" ] || [ "$( env_get "ENABLE_MAIL" )" = "2" ]; then
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
fi
@@ -217,4 +217,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
### Startup
###
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
exec "${@}"

View File

@@ -0,0 +1,134 @@
; ################################################################################
; ####
; #### The following settings can be overwritten by later includes
; ####
; ################################################################################
; ############################################################
; Timeouts
; ############################################################
[www]
; The timeout for serving a single request after which the worker process will be killed.
; This option should be used when the 'max_execution_time' ini option does not stop script
; execution for some reason.
request_terminate_timeout = 120s
; ############################################################
; Logging
; ############################################################
[global]
error_log = /proc/self/fd/2
log_level = notice
[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2
; ############################################################
; Backlog configuration
; ############################################################
[www]
; A maximum of backlog incoming connections will be queued for processing.
; If a connection request arrives with the queue full the client may receive an error with an
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
; the request may be ignored so that retries may succeed.
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
; are silently truncated
listen.backlog = 1024
; ############################################################
; Worker configuration
; ############################################################
[www]
; static - the number of child processes is fixed (pm.max_children).
;
; dynamic - the number of child processes is set dynamically based on the following directives:
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
;
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
; pm.start_servers are started when the service is started.
pm = ondemand
; The maximum number of child processes to be created
pm.max_children = 50
; The number of child processes created on startup. Used only when pm is set to dynamic.
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
pm.start_servers = 4
; The desired minimum number of idle server processes.
pm.min_spare_servers = 2
; The desired maximum number of idle server processes.
pm.max_spare_servers = 6
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries.
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default value: 0.
pm.max_requests = 500
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
pm.process_idle_timeout = 10s
; ############################################################
; Include
; ############################################################
[global]
include = /usr/local/etc/php-fpm.d/*.conf
; ################################################################################
; ####
; #### The following settings overwrite any includes again
; ####
; ################################################################################
; ############################################################
; Required for Dockerization
; ############################################################
[global]
daemonize = no
[www]
; Keep env variables set by docker
clear_env = no
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes
; ############################################################
; User and Group
; ############################################################
[www]
user = devilbox
group = devilbox
; ############################################################
; Networking
; ############################################################
[www]
; Ensure to listen here
listen = 9000

View File

@@ -10,40 +10,40 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_nesting_level = 64
variables_order = EGPCS
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,40 +10,40 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_nesting_level = 64
variables_order = EGPCS
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,41 +10,41 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -10,40 +10,39 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.default_enable = Off
xdebug.profiler_enable = Off
xdebug.remote_enable = Off
xdebug.remote_autostart = Off
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -0,0 +1,48 @@
; ############################################################
; # Devilbox PHP defaults for 8.1-work
; ############################################################
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
; If none is present, the one from the previous flavour is inherited.
[PHP]
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M
; Timeouts
max_execution_time = 120
max_input_time = 120
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20
; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
log_errors = On
html_errors = On
; Xdebug settings
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000

View File

@@ -4,4 +4,3 @@ Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/loca
# Allow devilbox user to do anything without password
%devilbox ALL=(ALL) NOPASSWD: ALL

880
Makefile
View File

@@ -1,497 +1,415 @@
location = Dockerfiles/
ifneq (,)
.error This Makefile requires GNU Make.
endif
# -------------------------------------------------------------------------------------------------
# Docker configuration
# -------------------------------------------------------------------------------------------------
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
DIR = Dockerfiles
IMAGE = devilbox/php-fpm
NO_CACHE =
PHP_EXT_DIR =
# Run checks after each module has been installed (slow, but yields errors faster)
FAIL_FAST = False
# File lint
FL_VERSION = 0.3
FL_IGNORES = .git/,.github/
# -------------------------------------------------------------------------------------------------
# DEFAULT TARGET
# -------------------------------------------------------------------------------------------------
###
### Default
###
help:
@printf "################################################################################\n"
@printf "# devilbox/php:XX-XX Makefile\n"
@printf "################################################################################\n\n"
@printf "%s\n\n" "Generate and build devilbox PHP-FPM docker images"
@printf "%s\n" "make generate: Generate Dockerfiles (requires Ansible)"
@printf "%s\n" "make readme: Update Readme with php modules (requires images to be built)"
@printf "\n"
@printf "%s\n" "make gen-build: Generate and build all images"
@printf "%s\n" "make gen-rebuild: Generate and rebuild all images"
@printf "\n"
@printf "%s\n" "make build-all: Build all images"
@printf "%s\n" "make rebuild-all: Rebuild all images"
@printf "\n"
@printf "%s\n" "make build-base: Build all base images"
@printf "%s\n" "make build-mods: Build all mods images"
@printf "%s\n" "make build-prod: Build all prod images"
@printf "%s\n" "make build-work: Build all work images"
@printf "\n"
@printf "%s\n" "make rebuild-base: Rebuild all base images"
@printf "%s\n" "make rebuild-mods: Rebuild all mods images"
@printf "%s\n" "make rebuild-prod: Rebuild all prod images"
@printf "%s\n" "make rebuild-work: Rebuild all work images"
@printf "\n"
@printf "%s\n" "make build-base-52: Build PHP 5.2 base image"
@printf "%s\n" "make build-base-53: Build PHP 5.3 base image"
@printf "%s\n" "make build-base-54: Build PHP 5.4 base image"
@printf "%s\n" "make build-base-55: Build PHP 5.5 base image"
@printf "%s\n" "make build-base-56: Build PHP 5.6 base image"
@printf "%s\n" "make build-base-70: Build PHP 7.0 base image"
@printf "%s\n" "make build-base-71: Build PHP 7.1 base image"
@printf "%s\n" "make build-base-72: Build PHP 7.2 base image"
@printf "%s\n" "make build-base-73: Build PHP 7.3 base image"
@printf "%s\n" "make build-base-74: Build PHP 7.4 base image"
@printf "%s\n" "make build-base-80: Build PHP 8.0 base image"
@printf "\n"
@printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image"
@printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image"
@printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image"
@printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image"
@printf "%s\n" "make build-mods-56: Build PHP 5.6 mods image"
@printf "%s\n" "make build-mods-70: Build PHP 7.0 mods image"
@printf "%s\n" "make build-mods-71: Build PHP 7.1 mods image"
@printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image"
@printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image"
@printf "%s\n" "make build-mods-74: Build PHP 7.4 mods image"
@printf "%s\n" "make build-mods-80: Build PHP 8.0 mods image"
@printf "\n"
@printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image"
@printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image"
@printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image"
@printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image"
@printf "%s\n" "make build-prod-56: Build PHP 5.6 prod image"
@printf "%s\n" "make build-prod-70: Build PHP 7.0 prod image"
@printf "%s\n" "make build-prod-71: Build PHP 7.1 prod image"
@printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image"
@printf "%s\n" "make build-prod-73: Build PHP 7.3 prod image"
@printf "%s\n" "make build-prod-74: Build PHP 7.4 prod image"
@printf "%s\n" "make build-prod-80: Build PHP 8.0 prod image"
@printf "\n"
@printf "%s\n" "make build-work-52: Build PHP 5.2 work image"
@printf "%s\n" "make build-work-53: Build PHP 5.3 work image"
@printf "%s\n" "make build-work-54: Build PHP 5.4 work image"
@printf "%s\n" "make build-work-55: Build PHP 5.5 work image"
@printf "%s\n" "make build-work-56: Build PHP 5.6 work image"
@printf "%s\n" "make build-work-70: Build PHP 7.0 work image"
@printf "%s\n" "make build-work-71: Build PHP 7.1 work image"
@printf "%s\n" "make build-work-72: Build PHP 7.2 work image"
@printf "%s\n" "make build-work-73: Build PHP 7.3 work image"
@printf "%s\n" "make build-work-74: Build PHP 7.4 work image"
@printf "%s\n" "make build-work-80: Build PHP 8.0 work image"
@printf "\n"
@printf "%s\n" "make rebuild-base-52: Build PHP 5.2 base image"
@printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image"
@printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image"
@printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image"
@printf "%s\n" "make rebuild-base-56: Build PHP 5.6 base image"
@printf "%s\n" "make rebuild-base-70: Build PHP 7.0 base image"
@printf "%s\n" "make rebuild-base-71: Build PHP 7.1 base image"
@printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image"
@printf "%s\n" "make rebuild-base-73: Build PHP 7.3 base image"
@printf "%s\n" "make rebuild-base-74: Build PHP 7.4 base image"
@printf "%s\n" "make rebuild-base-80: Build PHP 8.0 base image"
@printf "\n"
@printf "%s\n" "make rebuild-mods-52: Build PHP 5.2 mods image"
@printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image"
@printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image"
@printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image"
@printf "%s\n" "make rebuild-mods-56: Build PHP 5.6 mods image"
@printf "%s\n" "make rebuild-mods-70: Build PHP 7.0 mods image"
@printf "%s\n" "make rebuild-mods-71: Build PHP 7.1 mods image"
@printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image"
@printf "%s\n" "make rebuild-mods-73: Build PHP 7.3 mods image"
@printf "%s\n" "make rebuild-mods-74: Build PHP 7.4 mods image"
@printf "%s\n" "make rebuild-mods-80: Build PHP 8.0 mods image"
@printf "\n"
@printf "%s\n" "make rebuild-prod-52: Build PHP 5.2 prod image"
@printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image"
@printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image"
@printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image"
@printf "%s\n" "make rebuild-prod-56: Build PHP 5.6 prod image"
@printf "%s\n" "make rebuild-prod-70: Build PHP 7.0 prod image"
@printf "%s\n" "make rebuild-prod-71: Build PHP 7.1 prod image"
@printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image"
@printf "%s\n" "make rebuild-prod-73: Build PHP 7.3 prod image"
@printf "%s\n" "make rebuild-prod-74: Build PHP 7.4 prod image"
@printf "%s\n" "make rebuild-prod-80: Build PHP 8.0 prod image"
@printf "\n"
@printf "%s\n" "make rebuild-work-52: Build PHP 5.2 work image"
@printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image"
@printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image"
@printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image"
@printf "%s\n" "make rebuild-work-56: Build PHP 5.6 work image"
@printf "%s\n" "make rebuild-work-70: Build PHP 7.0 work image"
@printf "%s\n" "make rebuild-work-71: Build PHP 7.1 work image"
@printf "%s\n" "make rebuild-work-72: Build PHP 7.2 work image"
@printf "%s\n" "make rebuild-work-73: Build PHP 7.3 work image"
@printf "%s\n" "make rebuild-work-74: Build PHP 7.4 work image"
@printf "%s\n" "make rebuild-work-80: Build PHP 8.0 work image"
@echo
@echo " _ _ _ _ __ _ ___ "
@echo " _| |___ _ _<_| | |_ _____ / ___| |_ ___ ___| | ___._ _ _ "
@echo " / . / ._| | | | | . / . \ \// | . | . | . |___| || . | ' ' |"
@echo " \___\___|__/|_|_|___\___/\_/_/| _|_|_| _/ |_|| _|_|_|_|"
@echo " |_| |_| |_| "
@echo
@echo
@echo "Targets"
@echo "--------------------------------------------------------------------------------"
@echo
@echo "lint Lint project files and repository"
@echo
@echo "gen-readme [VERSION=] Update README with PHP modules from built images."
@echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates."
@echo
@echo "build-base VERSION= [ARGS=] Build base image by specified version"
@echo "build-mods VERSION= [ARGS=] Build mods image by specified version"
@echo "build-prod VERSION= [ARGS=] Build prod image by specified version"
@echo "build-work VERSION= [ARGS=] Build work image by specified version"
@echo
@echo "rebuild-base VERSION= [ARGS=] Rebuild base image by specified version"
@echo "rebuild-mods VERSION= [ARGS=] Rebuild mods image by specified version"
@echo "rebuild-prod VERSION= [ARGS=] Rebuild prod image by specified version"
@echo "rebuild-work VERSION= [ARGS=] Rebuild work image by specified version"
@echo
@echo "test-base VERSION= Test base image by specified version"
@echo "test-mods VERSION= Test mods image by specified version"
@echo "test-prod VERSION= Test prod image by specified version"
@echo "test-work VERSION= Test work image by specified version"
@echo
@echo
@echo "Variables"
@echo "--------------------------------------------------------------------------------"
@echo
@echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0',"
@echo " '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'."
@echo " For gen-readme target it is optional and if not"
@echo " specified, it will generate for all versions."
@echo
@echo "FAIL_FAST Either 'True' or 'False' (defaults to 'False')."
@echo " If set to 'True', each module install has an"
@echo " immediate check, which is very slow for CI, but"
@echo " yields errors immediately."
@echo " If set to 'False', checks are done at the end."
@echo
@echo "ARGS Can be added to all build-* and rebuild-* targets"
@echo " to supply additional docker build options."
# -------------------------------------------------------------------------------------------------
# Lint Targets
# -------------------------------------------------------------------------------------------------
###
### Generate
###
generate:
cd build/ansible; ansible-playbook generate.yml --diff
lint: lint-files
lint: lint-yaml
lint: lint-changelog
lint: lint-workflow
lint-workflow:
@echo "################################################################################"
@echo "# Lint Workflow"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \
echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
exit 1; \
else \
echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
fi
@echo
lint-changelog:
@echo "################################################################################"
@echo "# Lint Changelog"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
if ! grep -E "^## Release $${GIT_NEXT_TAG}$$" CHANGELOG.md >/dev/null; then \
echo "[ERR] Missing '## Release $${GIT_NEXT_TAG}' section in CHANGELOG.md"; \
exit 1; \
else \
echo "[OK] Section '## Release $${GIT_NEXT_TAG}' present in CHANGELOG.md"; \
fi
@echo
lint-files:
@echo "################################################################################"
@echo "# Lint Files"
@echo "################################################################################"
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-cr --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-crlf --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-single-newline --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-space --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8 --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8-bom --text --ignore '$(FL_IGNORES)' --path .
@echo
lint-yaml:
@# Lint all files
@echo "################################################################################"
@echo "# Lint Yaml"
@echo "################################################################################"
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/yamllint .
@echo
###
### Update readme
###
readme:
# -------------------------------------------------------------------------------------------------
# GENERATE TARGETS
# -------------------------------------------------------------------------------------------------
gen-readme:
ifeq ($(strip $(VERSION)),)
@echo "Generate README.md for all PHP versions"
cd build; ./gen-readme.sh
else
@echo "Generate README.md for PHP $(VERSION)"
@$(MAKE) --no-print-directory _check-version
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=base
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods
cd build; ./gen-readme.sh $(VERSION)
endif
###
### Generate and build
###
gen-build: generate build-all
gen-rebuild: generate rebuild-all
gen-dockerfiles:
docker run --rm \
$$(tty -s && echo "-it" || echo) \
-e USER=ansible \
-e MY_UID=$$(id -u) \
-e MY_GID=$$(id -g) \
-v ${PWD}:/data \
-w /data/build/ansible \
cytopia/ansible:2.8-tools ansible-playbook generate.yml \
-e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.8/site-packages/ansible_mitogen/plugins/strategy \
-e ANSIBLE_STRATEGY=mitogen_linear \
-e ansible_python_interpreter=/usr/bin/python3 \
-e \"{build_fail_fast: $(FAIL_FAST)}\" \
--diff $(ARGS)
# -------------------------------------------------------------------------------------------------
# BUILD TARGETS
# -------------------------------------------------------------------------------------------------
build-base: _check-version
build-base:
docker build $(NO_CACHE) \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD))" \
$(ARGS) \
-t $(IMAGE):${VERSION}-base \
-f $(DIR)/base/Dockerfile-${VERSION} $(DIR)/base
build-mods: _check-version
build-mods: _EXIST_IMAGE=base
build-mods: _check-image-exists
build-mods:
ifeq ($(strip $(TARGET)),)
docker build $(NO_CACHE) \
--target builder \
-t $(IMAGE):$(VERSION)-mods \
-f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods;
@# $(NO_CACHE) is removed, as it would otherwise rebuild the 'builder' image again.
docker build \
--target final \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
--build-arg EXT_DIR="$$( docker run --rm --entrypoint=php $(IMAGE):$(VERSION)-mods -i \
| grep ^extension_dir \
| awk -F '=>' '{print $$2}' \
| xargs \
)" \
$(ARGS) \
-t $(IMAGE):$(VERSION)-mods \
-f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods;
else
docker build $(NO_CACHE) \
--target $(TARGET) \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
$(ARGS) \
-t $(IMAGE):$(VERSION)-mods \
-f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods
endif
build-prod: _check-version
build-prod: _EXIST_IMAGE=mods
build-prod: _check-image-exists
build-prod:
docker build $(NO_CACHE) \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
$(ARGS) \
-t $(IMAGE):${VERSION}-prod \
-f $(DIR)/prod/Dockerfile-${VERSION} $(DIR)/prod
build-work: _check-version
build-work: _EXIST_IMAGE=prod
build-work: _check-image-exists
build-work:
docker build $(NO_CACHE) \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
$(ARGS) \
-t $(IMAGE):${VERSION}-work \
-f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work
# -------------------------------------------------------------------------------------------------
# REBUILD TARGETS
# -------------------------------------------------------------------------------------------------
rebuild-base: _pull-base-image
rebuild-base: NO_CACHE=--no-cache
rebuild-base: build-base
rebuild-mods: NO_CACHE=--no-cache
rebuild-mods: build-mods
rebuild-prod: NO_CACHE=--no-cache
rebuild-prod: build-prod
rebuild-work: NO_CACHE=--no-cache
rebuild-work: build-work
# -------------------------------------------------------------------------------------------------
# TEST TARGETS
# -------------------------------------------------------------------------------------------------
test-base: _check-version
test-base: _EXIST_IMAGE=base
test-base: _check-image-exists
test-base:
./tests/test.sh ${VERSION} base
test-mods: _check-version
test-mods: _EXIST_IMAGE=mods
test-mods: _check-image-exists
test-mods: _check-version
./tests/test.sh ${VERSION} mods
test-prod: _check-version
test-prod: _EXIST_IMAGE=prod
test-prod: _check-image-exists
test-prod: _check-version
./tests/test.sh ${VERSION} prod
test-work: _check-version
test-work: _EXIST_IMAGE=work
test-work: _check-image-exists
test-work: _check-version
./tests/test.sh ${VERSION} work
# -------------------------------------------------------------------------------------------------
# DOCKERHUB TARGETS
# -------------------------------------------------------------------------------------------------
login:
ifeq ($(strip $(USERNAME)),)
@$(info This make target requires the USERNAME variable to be set.)
@$(info make login USERNAME= PASSWORD=)
@$(info )
@$(error Exiting)
endif
ifeq ($(strip $(PASSWORD)),)
@$(info This make target requires the PASSWORD variable to be set.)
@$(info make login USERNAME= PASSWORD=)
@$(info )
@$(error Exiting)
endif
@yes | docker login --username $(USERNAME) --password $(PASSWORD)
push:
ifeq ($(strip $(TAG)),)
@$(info This make target requires the TAG variable to be set.)
@$(info make push TAG=)
@$(info )
@$(error Exiting)
endif
docker push $(IMAGE):$(TAG)
tag:
ifeq ($(strip $(OLD_TAG)),)
@$(info This make target requires the OLD_TAG variable to be set.)
@$(info make tag OLD_TAG= NEW_TAG=)
@$(info )
@$(error Exiting)
endif
ifeq ($(strip $(NEW_TAG)),)
@$(info This make target requires the NEW_TAG variable to be set.)
@$(info make tag OLD_TAG= NEW_TAG=)
@$(info )
@$(error Exiting)
endif
docker tag $(IMAGE):$(OLD_TAG) $(IMAGE):$(NEW_TAG)
###
### Build all
###
build-all: build-base build-mods build-prod build-work
rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work
# -------------------------------------------------------------------------------------------------
# HELPER TARGETS
# -------------------------------------------------------------------------------------------------
_check-version:
ifeq ($(strip $(VERSION)),)
@$(info This make target requires the VERSION variable to be set.)
@$(info make build-<flavour> VERSION=7.3)
@$(info )
@$(error Exiting)
endif
ifeq ($(VERSION),5.2)
else
ifeq ($(VERSION),5.3)
else
ifeq ($(VERSION),5.4)
else
ifeq ($(VERSION),5.5)
else
ifeq ($(VERSION),5.6)
else
ifeq ($(VERSION),7.0)
else
ifeq ($(VERSION),7.1)
else
ifeq ($(VERSION),7.2)
else
ifeq ($(VERSION),7.3)
else
ifeq ($(VERSION),7.4)
else
ifeq ($(VERSION),8.0)
else
ifeq ($(VERSION),8.1)
else
@$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' or '8.1')
@$(info )
@$(error Exiting)
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
@echo "Version $(VERSION) is valid"
###
### Build categories
###
build-base: build-base-52 build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 build-base-74 build-base-80
build-mods: build-mods-52 build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 build-mods-74 build-mods-80
build-prod: build-prod-52 build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 build-prod-74 build-prod-80
build-work: build-work-52 build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 build-work-74 build-work-80
rebuild-base: rebuild-base-52 rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 rebuild-base-74 rebuild-base-80
rebuild-mods: rebuild-mods-52 rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 rebuild-mods-74 rebuild-mods-80
rebuild-prod: rebuild-prod-52 rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 rebuild-prod-74 rebuild-prod-80
rebuild-work: rebuild-work-52 rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 rebuild-work-74 rebuild-work-80
_check-image-exists:
@if [ "$$(docker images -q $(IMAGE):$(VERSION)-$(_EXIST_IMAGE))" = "" ]; then \
>&2 echo "Docker image '$(IMAGE):$(VERSION)-$(_EXIST_IMAGE)' was not found locally."; \
>&2 echo "Either build it first or explicitly pull it from Dockerhub."; \
>&2 echo "This is a safeguard to not automatically pull the Docker image."; \
>&2 echo; \
false; \
fi;
###
### Build separately
###
build-base-52: pull-from-52
docker build -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base
build-base-53: pull-from-53
docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base
build-base-54: pull-from-54
docker build -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base
build-base-55: pull-from-55
docker build -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base
build-base-56: pull-from-56
docker build -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base
build-base-70: pull-from-70
docker build -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base
build-base-71: pull-from-71
docker build -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base
build-base-72: pull-from-72
docker build -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base
build-base-73: pull-from-73
docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base
build-base-74: pull-from-74
docker build -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base
build-base-80: pull-from-80
docker build -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base
build-mods-52:
docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods
build-mods-53:
docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods
build-mods-54:
docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods
build-mods-55:
docker build -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods
build-mods-56:
docker build -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods
build-mods-70:
docker build -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods
build-mods-71:
docker build -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods
build-mods-72:
docker build -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods
build-mods-73:
docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods
build-mods-74:
docker build -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods
build-mods-80:
docker build -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods
build-prod-52:
docker build -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod
build-prod-53:
docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod
build-prod-54:
docker build -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod
build-prod-55:
docker build -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod
build-prod-56:
docker build -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod
build-prod-70:
docker build -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod
build-prod-71:
docker build -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod
build-prod-72:
docker build -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod
build-prod-73:
docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod
build-prod-74:
docker build -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod
build-prod-80:
docker build -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod
build-work-52:
docker build -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work
build-work-53:
docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work
build-work-54:
docker build -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work
build-work-55:
docker build -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work
build-work-56:
docker build -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work
build-work-70:
docker build -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work
build-work-71:
docker build -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work
build-work-72:
docker build -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work
build-work-73:
docker build -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work
build-work-74:
docker build -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work
build-work-80:
docker build -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work
###
### Rebuild separately
###
rebuild-base-52: pull-from-52
docker build --no-cache -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base
rebuild-base-53: pull-from-53
docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base
rebuild-base-54: pull-from-54
docker build --no-cache -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base
rebuild-base-55: pull-from-55
docker build --no-cache -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base
rebuild-base-56: pull-from-56
docker build --no-cache -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base
rebuild-base-70: pull-from-70
docker build --no-cache -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base
rebuild-base-71: pull-from-71
docker build --no-cache -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base
rebuild-base-72: pull-from-72
docker build --no-cache -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base
rebuild-base-73: pull-from-73
docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base
rebuild-base-74: pull-from-74
docker build --no-cache -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base
rebuild-base-80: pull-from-80
docker build --no-cache -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base
rebuild-mods-52:
docker build --no-cache -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods
rebuild-mods-53:
docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods
rebuild-mods-54:
docker build --no-cache -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods
rebuild-mods-55:
docker build --no-cache -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods
rebuild-mods-56:
docker build --no-cache -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods
rebuild-mods-70:
docker build --no-cache -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods
rebuild-mods-71:
docker build --no-cache -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods
rebuild-mods-72:
docker build --no-cache -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods
rebuild-mods-73:
docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods
rebuild-mods-74:
docker build --no-cache -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods
rebuild-mods-80:
docker build --no-cache -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods
rebuild-prod-52:
docker build --no-cache -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod
rebuild-prod-53:
docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod
rebuild-prod-54:
docker build --no-cache -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod
rebuild-prod-55:
docker build --no-cache -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod
rebuild-prod-56:
docker build --no-cache -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod
rebuild-prod-70:
docker build --no-cache -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod
rebuild-prod-71:
docker build --no-cache -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod
rebuild-prod-72:
docker build --no-cache -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod
rebuild-prod-73:
docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod
rebuild-prod-74:
docker build --no-cache -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod
rebuild-prod-80:
docker build --no-cache -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod
rebuild-work-52:
docker build --no-cache -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work
rebuild-work-53:
docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work
rebuild-work-54:
docker build --no-cache -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work
rebuild-work-55:
docker build --no-cache -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work
rebuild-work-56:
docker build --no-cache -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work
rebuild-work-70:
docker build --no-cache -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work
rebuild-work-71:
docker build --no-cache -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work
rebuild-work-72:
docker build --no-cache -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work
rebuild-work-73:
docker build --no-cache -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work
rebuild-work-74:
docker build --no-cache -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work
rebuild-work-80:
docker build --no-cache -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work
###
### Pull base FROM images
###
pull-from-52:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.2 | sed 's/^FROM\s*//g';)
pull-from-53:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM\s*//g';)
pull-from-54:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.4 | sed 's/^FROM\s*//g';)
pull-from-55:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.5 | sed 's/^FROM\s*//g';)
pull-from-56:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.6 | sed 's/^FROM\s*//g';)
pull-from-70:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.0 | sed 's/^FROM\s*//g';)
pull-from-71:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.1 | sed 's/^FROM\s*//g';)
pull-from-72:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.2 | sed 's/^FROM\s*//g';)
pull-from-73:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.3 | sed 's/^FROM\s*//g';)
pull-from-74:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.4 | sed 's/^FROM\s*//g';)
pull-from-80:
docker pull $(shell grep FROM $(location)/base/Dockerfile-8.0 | sed 's/^FROM\s*//g';)
###
### Test all
###
test-all: test-base test-mods test-prod test-work
test-base: test-base-52 test-base-53 test-base-54 test-base-55 test-base-56 test-base-70 test-base-71 test-base-72 test-base-73 test-base-74 test-base-80
test-mods: test-mods-52 test-mods-53 test-mods-54 test-mods-55 test-mods-56 test-mods-70 test-mods-71 test-mods-72 test-mods-73 test-mods-74 test-mods-80
test-prod: test-prod-52 test-prod-53 test-prod-54 test-prod-55 test-prod-56 test-prod-70 test-prod-71 test-prod-72 test-prod-73 test-prod-74 test-prod-80
test-work: test-work-52 test-work-53 test-work-54 test-work-55 test-work-56 test-work-70 test-work-71 test-work-72 test-work-73 test-work-74 test-work-80
###
### Tests
###
test-base-52:
./tests/test.sh 5.2 base
test-base-53:
./tests/test.sh 5.3 base
test-base-54:
./tests/test.sh 5.4 base
test-base-55:
./tests/test.sh 5.5 base
test-base-56:
./tests/test.sh 5.6 base
test-base-70:
./tests/test.sh 7.0 base
test-base-71:
./tests/test.sh 7.1 base
test-base-72:
./tests/test.sh 7.2 base
test-base-73:
./tests/test.sh 7.3 base
test-base-74:
./tests/test.sh 7.4 base
test-base-80:
./tests/test.sh 8.0 base
test-mods-52:
./tests/test.sh 5.2 mods
test-mods-53:
./tests/test.sh 5.3 mods
test-mods-54:
./tests/test.sh 5.4 mods
test-mods-55:
./tests/test.sh 5.5 mods
test-mods-56:
./tests/test.sh 5.6 mods
test-mods-70:
./tests/test.sh 7.0 mods
test-mods-71:
./tests/test.sh 7.1 mods
test-mods-72:
./tests/test.sh 7.2 mods
test-mods-73:
./tests/test.sh 7.3 mods
test-mods-74:
./tests/test.sh 7.4 mods
test-mods-80:
./tests/test.sh 8.0 mods
test-prod-52:
./tests/test.sh 5.2 prod
test-prod-53:
./tests/test.sh 5.3 prod
test-prod-54:
./tests/test.sh 5.4 prod
test-prod-55:
./tests/test.sh 5.5 prod
test-prod-56:
./tests/test.sh 5.6 prod
test-prod-70:
./tests/test.sh 7.0 prod
test-prod-71:
./tests/test.sh 7.1 prod
test-prod-72:
./tests/test.sh 7.2 prod
test-prod-73:
./tests/test.sh 7.3 prod
test-prod-74:
./tests/test.sh 7.4 prod
test-prod-80:
./tests/test.sh 8.0 prod
test-work-52:
./tests/test.sh 5.2 work
test-work-53:
./tests/test.sh 5.3 work
test-work-54:
./tests/test.sh 5.4 work
test-work-55:
./tests/test.sh 5.5 work
test-work-56:
./tests/test.sh 5.6 work
test-work-70:
./tests/test.sh 7.0 work
test-work-71:
./tests/test.sh 7.1 work
test-work-72:
./tests/test.sh 7.2 work
test-work-73:
./tests/test.sh 7.3 work
test-work-74:
./tests/test.sh 7.4 work
test-work-80:
./tests/test.sh 8.0 work
_pull-base-image:
@echo "Pulling root image for PHP ${VERSION}"
@docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';)

118
README.md
View File

@@ -1,11 +1,14 @@
# PHP-FPM Docker images
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![lint](https://github.com/devilbox/docker-php-fpm/workflows/lint/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=lint)
[![build](https://github.com/devilbox/docker-php-fpm/workflows/build/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=build)
[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
[![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases)
[![Gitter](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group)
[![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT)
This repository will provide you fully functional PHP-FPM Docker images in different flavours,
versions and packed with different types of integrated PHP modules. It also solves the problem of **[syncronizing file permissions](#unsynchronized-permissions)** of mounted volumes between the host and the container.
@@ -21,6 +24,7 @@ Have a look at the following Devilbox base images for which no official versions
* [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3)
* [PHP-FPM 7.4](https://github.com/devilbox/docker-php-fpm-7.4)
* [PHP-FPM 8.0](https://github.com/devilbox/docker-php-fpm-8.0)
* [PHP-FPM 8.1](https://github.com/devilbox/docker-php-fpm-8.1)
#### Documentation
@@ -109,7 +113,7 @@ One main problem with a running Docker container is to **synchronize the ownersh
#### Unsynchronized permissions
Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it.
Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it.
```shell
[Host] | [Container]
@@ -217,7 +221,7 @@ The following table shows a more complete overview about the offered Docker imag
<tbody>
<tr>
<td rowspan="11"><strong>base</strong></td>
<td rowspan="12"><strong>base</strong></td>
<td><code>devilbox/php-fpm:5.2-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-base.svg" /></a>
@@ -293,9 +297,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-base.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>mods</strong></td>
<td rowspan="12"><strong>mods</strong></td>
<td><code>devilbox/php-fpm:5.2-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-mods.svg" /></a>
@@ -372,9 +383,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-mods.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>prod</strong></td>
<td rowspan="12"><strong>prod</strong></td>
<td><code>devilbox/php-fpm:5.2-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-prod.svg" /></a>
@@ -451,9 +469,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-prod.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>work</strong></td>
<td rowspan="12"><strong>work</strong></td>
<td><code>devilbox/php-fpm:5.2-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-work.svg" /></a>
@@ -530,6 +555,13 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-work.svg" /></a>
</td>
</tr>
</tbody>
</table>
@@ -598,57 +630,62 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>5.2</th>
<td id="52-base">ctype, curl, date, dom, filter, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, readline, Reflection, session, SimpleXML, soap, SPL, SQLite, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="52-mods">amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="52-mods">amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, OAuth, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.3</th>
<td id="53-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="53-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="53-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.4</th>
<td id="54-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="54-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="54-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.5</th>
<td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.6</th>
<td id="56-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mhash, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="56-mods">amqp, apc, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="56-mods">amqp, apc, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.0</th>
<td id="70-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.1</th>
<td id="71-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.2</th>
<td id="72-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.3</th>
<td id="73-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="73-mods">apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.4</th>
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="74-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>8.0</th>
<td id="80-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="80-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="80-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="80-mods">apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>8.1</th>
<td id="81-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="81-mods">apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
</tbody>
</table>
@@ -670,6 +707,7 @@ docker pull devilbox/php-fpm:7.2-base
docker pull devilbox/php-fpm:7.3-base
docker pull devilbox/php-fpm:7.4-base
docker pull devilbox/php-fpm:8.0-base
docker pull devilbox/php-fpm:8.1-base
```
Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub>
@@ -687,6 +725,7 @@ docker pull devilbox/php-fpm:7.2-mods
docker pull devilbox/php-fpm:7.3-mods
docker pull devilbox/php-fpm:7.4-mods
docker pull devilbox/php-fpm:8.0-mods
docker pull devilbox/php-fpm:8.1-mods
```
Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub></td>
@@ -704,6 +743,7 @@ docker pull devilbox/php-fpm:7.2-prod
docker pull devilbox/php-fpm:7.3-prod
docker pull devilbox/php-fpm:7.4-prod
docker pull devilbox/php-fpm:8.0-prod
docker pull devilbox/php-fpm:8.1-prod
```
Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting.
@@ -721,6 +761,7 @@ docker pull devilbox/php-fpm:7.2-work
docker pull devilbox/php-fpm:7.3-work
docker pull devilbox/php-fpm:7.4-work
docker pull devilbox/php-fpm:8.0-work
docker pull devilbox/php-fpm:8.1-work
```
Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this.
@@ -782,7 +823,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MODULES</code></td>
<td>string</td>
<td><code>''</code></td>
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=blackfire, ioncube</code></td>
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=blackfire, ioncube, psr, phalcon</code></td>
</tr>
<tr>
<td><code>DISABLE_MODULES</code></td>
@@ -794,7 +835,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MAIL</code></td>
<td>bool</td>
<td><code>0</code></td>
<td>Enable local email catch-all.<br/>Postfix will be configured for local delivery and all mails sent (even to real domains) will be catched locally. No email will ever go out. They will all be stored in a local devilbox account.<br/>Value: <code>0</code> or <code>1</code></td>
<td>Start local postfix with or without email catch-all.<br/><code>0</code>: Postfix service disabled.<br/><code>1</code>: Postfix service started normally.<br/><code>2</code>: Postfix service started configured for local delivery and all mails sent (even to real domains) will be catched locally. No email will ever go out. They will all be stored in a local devilbox account.<br/>Value: <code>0</code>, <code>1</code> or <code>2</code></td>
</tr>
<tr>
<td><code>FORWARD_PORTS_TO_LOCALHOST</code></td>
@@ -841,7 +882,7 @@ Have a look at the following table to see all offered volumes for each Docker im
</thead>
<tbody>
<tr>
<td rowspan="7"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td rowspan="8"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td><code>/etc/php-custom.d</code></td>
<td>Mount this directory into your host computer and add custom <code>\*.ini</code> files in order to alter php behaviour.</td>
</tr>
@@ -867,7 +908,11 @@ Have a look at the following table to see all offered volumes for each Docker im
</tr>
<tr>
<td><code>/var/mail</code></td>
<td>Emails caught be the postfix catch-all (<code>ENABLE_MAIL=1</code>) will be available in this directory.</td>
<td>Emails caught be the postfix catch-all (<code>ENABLE_MAIL=2</code>) will be available in this directory.</td>
</tr>
<tr>
<td><code>/etc/supervisor/custom.d</code></td>
<td>Mount this directory into your host computer and add your own `*.conf` supervisor start-up files.<br/><br/>**Note:** Directory and file permission will be recursively set to this of `NEW_UID` and `NEW_GID`.</td>
</tr>
<tr>
<td colspan="3"></td>
@@ -932,7 +977,7 @@ If you plan to use the PHP-FPM image for development, hence being able to execut
The **work** Docker image has many common tools already installed which on one hand increases its image size, but on the other hand removes the necessity to install those tools locally.
You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by travis-ci it is assured that you are always at the latest version of your favorite dev tool.
You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by GitHub Actions it is assured that you are always at the latest version of your favorite dev tool.
#### What tools can you expect
@@ -996,6 +1041,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://gruntjs.com/">grunt</a></td>
<td>Grunt command line JS tool.</td>
</tr>
<tr>
<td><a href="https://brew.sh/">Homebrew</a></td>
<td>The Missing Package Manager for macOS (or Linux).</td>
</tr>
<tr>
<td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td>
<td>Json command line linter.</td>
@@ -1012,10 +1061,6 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://github.com/cytopia/linkcheck">linkcheck</a></td>
<td>Search for URLs in files (optionally limited by extension) and validate their HTTP status code.</td>
</tr>
<tr>
<td><a href="http://linuxbrew.sh">linuxbrew</a></td>
<td>The Homebrew package manager for Linux.</td>
</tr>
<tr>
<td><a href="https://github.com/markdownlint/markdownlint">mdl</a></td>
<td>Markdown command line linter.</td>
@@ -1052,6 +1097,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://github.com/FriendsOfPHP/PHP-CS-Fixer">php-cs-fixer</a></td>
<td>A tool to automatically fix PHP Coding Standards issues.</td>
</tr>
<tr>
<td><a href="https://phpmd.org">phpmd</a></td>
<td>PHP Mess Detector.</td>
</tr>
<tr>
<td><a href="https://photoncms.com/resources/installing">photon</a></td>
<td>Photon CMS cli.</td>
@@ -1061,7 +1110,7 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td>Sass CSS compiler.</td>
</tr>
<tr>
<td><a href="https://github.com/brigade/scss-lint">scss-lint</a></td>
<td><a href="https://github.com/stylelint/stylelint">stylelint</a></td>
<td>Sass/CSS command line linter.</td>
</tr>
<tr>
@@ -1130,7 +1179,10 @@ $ docker run -d \
```shell
# Create config directory to be mounted with dummy configuration
$ mkdir config
# Xdebug 2
$ echo "xdebug.enable = 1" > config/xdebug.ini
# Xdebug 3
$ echo "xdebug.mode = debug" > config/xdebug.ini
# Run container and mount it
$ docker run -d \
@@ -1182,12 +1234,12 @@ $ docker run -d \
#### Launch Postfix for mail-catching
Once you set `$ENABLE_MAIL=1`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails.
Once you set `$ENABLE_MAIL=2`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails.
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-v /tmp/mail:/var/mail \
-e ENABLE_MAIL=1 \
-e ENABLE_MAIL=2 \
-t devilbox/php-fpm:7.2-prod
```
@@ -1224,7 +1276,7 @@ $ docker run -d \
-e MYSQL_BACKUP_USER=root \
-e MYSQL_BACKUP_PASS=somepass \
-e MYSQL_BACKUP_HOST=mysql \
-v ~/backups:/shared/backsup \
-v ~/backups:/shared/backups \
--name php \
-t devilbox/php-fpm:7.2-work
@@ -1234,9 +1286,9 @@ $ docker exec -it php mysqldump-secure
<h2><img id="automated-builds" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Automated builds</h2>
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.
Docker images are built and tested every night by **[GitHub Actions](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.
<h2><img id="contributing" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Contributing</h2>

View File

@@ -10,47 +10,53 @@
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = {{ item.cfg[item.key].memory_limit | default(item.cfg[item.alt].memory_limit) }}
memory_limit = {{ item.cfg[item.key].memory_limit | default(item.cfg[item.alt].memory_limit) }}
; Timeouts
max_execution_time = {{ item.cfg[item.key].max_execution_time | default(item.cfg[item.alt].max_execution_time) }}
max_input_time = {{ item.cfg[item.key].max_input_time | default(item.cfg[item.alt].max_input_time) }}
max_execution_time = {{ item.cfg[item.key].max_execution_time | default(item.cfg[item.alt].max_execution_time) }}
max_input_time = {{ item.cfg[item.key].max_input_time | default(item.cfg[item.alt].max_input_time) }}
; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = {{ item.cfg[item.key].post_max_size | default(item.cfg[item.alt].post_max_size) }}
upload_max_filesize = {{ item.cfg[item.key].upload_max_filesize | default(item.cfg[item.alt].upload_max_filesize) }}
max_file_uploads = {{ item.cfg[item.key].max_file_uploads | default(item.cfg[item.alt].max_file_uploads) }}
post_max_size = {{ item.cfg[item.key].post_max_size | default(item.cfg[item.alt].post_max_size) }}
upload_max_filesize = {{ item.cfg[item.key].upload_max_filesize | default(item.cfg[item.alt].upload_max_filesize) }}
max_file_uploads = {{ item.cfg[item.key].max_file_uploads | default(item.cfg[item.alt].max_file_uploads) }}
; Vars
variables_order = {{ item.cfg[item.key].variables_order | default(item.cfg[item.alt].variables_order) }}
variables_order = {{ item.cfg[item.key].variables_order | default(item.cfg[item.alt].variables_order) }}
{# Only available since PHP >=5.4 #}
{% if not (php_version == 5.2 or php_version == 5.3 ) %}
max_input_vars = {{ item.cfg[item.key].max_input_vars | default(item.cfg[item.alt].max_input_vars) }}
max_input_vars = {{ item.cfg[item.key].max_input_vars | default(item.cfg[item.alt].max_input_vars) }}
{% endif %}
max_input_nesting_level = {{ item.cfg[item.key].max_input_nesting_level | default(item.cfg[item.alt].max_input_nesting_level) }}
max_input_nesting_level = {{ item.cfg[item.key].max_input_nesting_level | default(item.cfg[item.alt].max_input_nesting_level) }}
; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }}
xmlrpc_errors = {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }}
report_memleaks = {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }}
display_errors = {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }}
display_startup_errors = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }}
error_reporting = {{ item.cfg[item.key].error_reporting | default(item.cfg[item.alt].error_reporting) }}
xmlrpc_errors = {{ item.cfg[item.key].xmlrpc_errors | default(item.cfg[item.alt].xmlrpc_errors) }}
report_memleaks = {{ item.cfg[item.key].report_memleaks | default(item.cfg[item.alt].report_memleaks) }}
display_errors = {{ item.cfg[item.key].display_errors | default(item.cfg[item.alt].display_errors) }}
display_startup_errors = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }}
{# Only available before PHP 7.2 #}
{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %}
track_errors = {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }}
track_errors = {{ item.cfg[item.key].track_errors | default(item.cfg[item.alt].track_errors) }}
{% endif %}
log_errors = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }}
html_errors = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }}
log_errors = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_errors) }}
html_errors = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }}
; Xdebug settings
xdebug.default_enable = {{ item.cfg[item.key].xdebug_default_enable | default(item.cfg[item.alt].xdebug_default_enable) }}
xdebug.profiler_enable = {{ item.cfg[item.key].xdebug_profiler_enable | default(item.cfg[item.alt].xdebug_profiler_enable) }}
xdebug.remote_enable = {{ item.cfg[item.key].xdebug_remote_enable | default(item.cfg[item.alt].xdebug_remote_enable) }}
xdebug.remote_autostart = {{ item.cfg[item.key].xdebug_remote_autostart | default(item.cfg[item.alt].xdebug_remote_autostart) }}
{% if php_version == 5.2 or php_version == 5.3 or php_version == 5.4 or php_version == 5.5 or php_version == 5.6 or php_version == 7.0 or php_version == 7.1 %}
xdebug.default_enable = {{ item.cfg[item.key].xdebug2_default_enable | default(item.cfg[item.alt].xdebug2_default_enable) }}
xdebug.profiler_enable = {{ item.cfg[item.key].xdebug2_profiler_enable | default(item.cfg[item.alt].xdebug2_profiler_enable) }}
xdebug.remote_enable = {{ item.cfg[item.key].xdebug2_remote_enable | default(item.cfg[item.alt].xdebug2_remote_enable) }}
xdebug.remote_autostart = {{ item.cfg[item.key].xdebug2_remote_autostart | default(item.cfg[item.alt].xdebug2_remote_autostart) }}
{% else %}
xdebug.mode = {{ item.cfg[item.key].xdebug3_mode | default(item.cfg[item.alt].xdebug3_mode) }}
xdebug.start_with_request = {{ item.cfg[item.key].xdebug3_start_with_request | default(item.cfg[item.alt].xdebug3_start_with_request) }}
xdebug.client_port = {{ item.cfg[item.key].xdebug3_client_port | default(item.cfg[item.alt].xdebug3_client_port) }}
{% endif %}

View File

@@ -1,12 +1,12 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
{{ edit_comment_base }}
{% if php_version == 5.2 %}
FROM devilbox/php-fpm-5.2
{% elif php_version == 5.3 %}
FROM devilbox/php-fpm-5.3
{% elif php_version == 7.4 %}
FROM devilbox/php-fpm-7.4
{% elif php_version == 8.0 %}
FROM devilbox/php-fpm-8.0
{% elif php_version == 8.1 %}
FROM devilbox/php-fpm-8.1
{% else %}
FROM php:{{ php_version }}-fpm
{% endif %}
@@ -16,12 +16,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM {{ php_version }} Image" \
image="devilbox/php-fpm" \
tag="{{ php_version }}-base" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-base"
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-base"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-base"
###
@@ -37,7 +45,7 @@ ENV MY_USER="devilbox" \
###
### User/Group
###
RUN set -x \
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
@@ -46,7 +54,7 @@ RUN set -x \
### Upgrade (install ps)
###
{% if php_version in [5.2, 5.3, 5.4, 5.5] %}
RUN set -x \
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
@@ -54,7 +62,7 @@ RUN set -x \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
{% endif %}
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*
@@ -63,7 +71,7 @@ RUN set -x \
###
### Configure
###
RUN set -x \
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
@@ -86,7 +94,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \
&& /usr/local/sbin/php-fpm --test \
@@ -113,4 +121,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -1,24 +1,12 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:{{ php_version }}-base
MAINTAINER "cytopia" <cytopia@everythingcli.org>
{{ edit_comment_mods }}
FROM devilbox/php-fpm:{{ php_version }}-base as builder
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM {{ php_version }} Image" \
image="devilbox/php-fpm" \
tag="{{ php_version }}-mods" \
vendor="devilbox" \
license="MIT"
###
### Envs
###
ENV BUILD_DEPS \
{# Loop over enabled build dependencies -#}
{#
###################################################################################################
Loop over enabled build dependencies and gather build dependencies
###################################################################################################
#}
{%- set build_deps = [] -%}
{%- for ext in extensions_enabled -%}
{#- Not disabled AND not already available by default -#}
@@ -39,13 +27,314 @@ ENV BUILD_DEPS \
{%- endif -%}
{%- endif -%}
{%- endfor -%}
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
{% for build_dep in build_deps | unique | sort %}
{{ build_dep }} \
{{ build_dep }} \
{% endfor %}
ca-certificates \
git
ca-certificates \
git
ENV RUN_DEPS \
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
###
### Install and enable PHP modules
###
# Enable ffi if it exists
RUN set -eux \
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
{# Loop over enabled extensions #}
{% for ext in extensions_enabled %}
{#-
###############################################################################################
# Not disabled AND not already enabled
###############################################################################################
-#}
{%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %}
# -------------------- Installing PHP Extension: {{ ext }} --------------------
RUN set -eux \
{#-
# --------------------------------------------------------------------------------
# PRE COMMAND
# --------------------------------------------------------------------------------
-#}
{#- Version specific pre-command available? -#}
{%- if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Version specific pre-command
{{- "\n\t" }}&& {{ extensions_available[ext][php_version]['pre'] }} \
{#- Generic pre-command available? -#}
{%- elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %}
{{- "\n\t" }}# Generic pre-command
{{- "\n\t" }}&& {{ extensions_available[ext]['all']['pre'] }} \
{%- endif -%}
{#-
# --------------------------------------------------------------------------------
# INSTALLATION (VERSION SPECIFIC)
# --------------------------------------------------------------------------------
#}
{%- if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Installation: Version specific
{#-
# -------------------- 1.) Builtin --------------------
-#}
{%- if extensions_available[ext][php_version]['type'] == 'builtin' -%}
{{- "\n\t" }}# Type: Built-in extension
{%- if 'configure' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Custom: configure command
{{- "\n\t" }}&& docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \
{%- endif -%}
{{- "\n\t" }}# Installation
{{- "\n\t" }}&& docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \
{#-
# -------------------- 2.) PECL --------------------
-#}
{%- elif extensions_available[ext][php_version]['type'] == 'pecl' -%}
{{- "\n\t" }}# Type: PECL extension
{%- if 'command' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Custom: Pecl command
{{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \
{%- else -%}
{{- "\n\t" }}# Default: Pecl command
{{- "\n\t" }}&& pecl install {{ ext }}{% if 'version' in extensions_available[ext][php_version] %}-{{ extensions_available[ext][php_version]['version'] }}{% endif %} \
{%- endif -%}
{{- "\n\t" }}# Enabling
{{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \
{#-
# -------------------- 3.) GIT --------------------
-#}
{%- elif extensions_available[ext][php_version]['type'] == 'git' -%}
{{- "\n\t" }}# Type: GIT extension
{{- "\n\t" }}&& git clone {{ extensions_available[ext][php_version]['git_url'] }} /tmp/{{ ext }} \
{{- "\n\t" }}&& cd /tmp/{{ ext }} \
{%- if 'git_ref' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Custom: Branch
{{- "\n\t" }}&& git checkout {{ extensions_available[ext][php_version]['git_ref'] }} \
{%- endif -%}
{%- if 'command' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Custom: Install command
{{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \
{%- else -%}
{{- "\n\t" }}# Default: Install command
{{- "\n\t" }}&& phpize \
{{- "\n\t" }}&& ./configure {% if 'configure' in extensions_available[ext][php_version] %} {{ extensions_available[ext][php_version]['configure'] }}{% endif %} \
{{- "\n\t" }}&& make -j$(getconf _NPROCESSORS_ONLN) \
{{- "\n\t" }}&& make install \
{%- endif -%}
{{- "\n\t" }}# Enabling
{{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \
{#-
# -------------------- 4.) CUSTOM --------------------
-#}
{%- elif extensions_available[ext][php_version]['type'] == 'custom' -%}
{{- "\n\t" }}# Type: Custom extension
{{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \
{%- endif -%}
{#-
# --------------------------------------------------------------------------------
# INSTALLATION (GENERIC)
# --------------------------------------------------------------------------------
#}
{%- elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Installation: Generic
{#-
# -------------------- 1.) Builtin --------------------
-#}
{%- if extensions_available[ext]['all']['type'] == 'builtin' -%}
{{- "\n\t" }}# Type: Built-in extension
{%- if 'configure' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Custom: configure command
{{- "\n\t" }}&& docker-php-ext-configure {{ ext }} {{ extensions_available[ext]['all']['configure'] }} \
{%- endif -%}
{{- "\n\t" }}&& docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \
{#-
# -------------------- 2.) PECL --------------------
-#}
{%- elif extensions_available[ext]['all']['type'] == 'pecl' -%}
{{- "\n\t" }}# Type: PECL extension
{%- if 'command' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Custom: Pecl command
{{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \
{%- else -%}
{{- "\n\t" }}# Default: Pecl command
{{- "\n\t" }}&& pecl install {{ ext }}{% if 'version' in extensions_available[ext]['all'] %}-{{ extensions_available[ext]['all']['version'] }}{% endif %} \
{%- endif -%}
{{- "\n\t" }}# Enabling
{{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \
{#-
# -------------------- 2.) GIT --------------------
-#}
{%- elif extensions_available[ext]['all']['type'] == 'git' -%}
{{- "\n\t" }}# Type: GIT extension
{{- "\n\t" }}&& git clone {{ extensions_available[ext]['all']['git_url'] }} /tmp/{{ ext }} \
{{- "\n\t" }}&& cd /tmp/{{ ext }} \
{%- if 'git_ref' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Custom: Branch
{{- "\n\t" }}&& git checkout {{ extensions_available[ext]['all']['git_ref'] }} \
{%- endif -%}
{%- if 'command' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Custom: Install command
{{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \
{%- else -%}
{{- "\n\t" }}# Default: Install command
{{- "\n\t" }}&& phpize \
{{- "\n\t" }}&& ./configure {% if 'configure' in extensions_available[ext]['all'] %} {{ extensions_available[ext]['all']['configure'] }}{% endif %} \
{{- "\n\t" }}&& make -j$(getconf _NPROCESSORS_ONLN) \
{{- "\n\t" }}&& make install \
{%- endif -%}
{{- "\n\t" }}# Enabling
{{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \
{#-
# -------------------- 4.) CUSTOM --------------------
-#}
{%- elif extensions_available[ext]['all']['type'] == 'custom' -%}
{{- "\n\t" }}# Type: Custom extension
{{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \
{%- endif -%}
{%- endif -%}
{#-
# --------------------------------------------------------------------------------
# POST COMMAND
# --------------------------------------------------------------------------------
-#}
{#- Version specific post-command available? -#}
{%- if php_version in extensions_available[ext] and 'post' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Version specific post-command
{{- "\n\t" }}&& {{ extensions_available[ext][php_version]['post'] }} \
{#- Generic post-command available? -#}
{%- elif 'all' in extensions_available[ext] and 'post' in extensions_available[ext]['all'] %}
{{- "\n\t" }}# Generic post-command
{{- "\n\t" }}&& {{ extensions_available[ext]['all']['post'] }} \
{%- endif -%}
{#- End of: Not disabled AND not already enabled -#}
{%- endif -%}
{#-
###############################################################################################
# Ensure modules that are not disabled have an appropriate ini directive and are loaded
###############################################################################################
-#}
{%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) -%}
{%- if php_version in extensions_available[ext] and 'load_ext' in extensions_available[ext][php_version] -%}
{{- "\n\t" }}# Activate: Version specific extension
{{- "\n\t" }}&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then \
{{- "\n\t" }} echo "extension={{ extensions_available[ext][php_version]['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; \
{{- "\n\t" }}fi \
{%- elif 'all' in extensions_available[ext] and 'load_ext' in extensions_available[ext]['all'] -%}
{{- "\n\t" }}# Activate: Generic extension
{{- "\n\t" }}&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then \
{{- "\n\t" }} echo "extenstion={{ extensions_available[ext]['all']['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; \
{{- "\n\t" }}fi \
{%- endif -%}
{%- endif %}
{#-
###############################################################################################
# Test extensions
###############################################################################################
-#}
{#- Not disabled #}
{%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %}
{%- if build_fail_fast -%}
{{- "\n\t" }}# ---- Test extension ----
{{- "\n\t" }}&& /usr/local/sbin/php-fpm --test \
{{- "\n\t" }}\
{{- "\n\t" }}&& (php -v 2>&1 1>/dev/null || true) \
{{- "\n\t" }}&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
{{- "\n\t" }}&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
{{- "\n\t" }}&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
{{- "\n\t" }}&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
{{- "\n\t" }}\
{{- "\n\t" }}&& (php-fpm -v 2>&1 1>/dev/null || true) \
{{- "\n\t" }}&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
{{- "\n\t" }}&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
{{- "\n\t" }}&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
{{- "\n\t" }}&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
{{- "\n\t" }}\
{%- if ext == 'opcache' -%}
{{- "\n\t" }}&& php -m | grep -oiE '^Zend Opcache$' \
{{- "\n\t" }}&& php-fpm -m | grep -oiE '^Zend Opcache$'
{%- elif ext == 'readline' -%}
{{- "\n\t" }}&& php -m | grep -oiE '^readline$'
{%- elif ext not in ['blackfire', 'ioncube'] -%}
{{- "\n\t" }}&& php -m | grep -oiE '^{{ ext }}$' \
{{- "\n\t" }}&& php-fpm -m | grep -oiE '^{{ ext }}$'
{%- else %}
{{- "\n\t" }}&& true
{%- endif %}
{{- "\n\n\n" }}
{%- else -%}
{{- "\n\t" }}&& true{{ "\n\n\n" }}
{%- endif %}
{%- endif %}
{%- endfor %}
# Fix php.ini settings for enabled extensions
RUN set -eux \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
# Fix oracle dir for images that don't have oci installed
RUN set -eux \
&& mkdir -p /usr/lib/oracle/
# Shrink everything down
RUN set -eux \
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
{{ edit_comment_mods }}
FROM devilbox/php-fpm:{{ php_version }}-base as final
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-mods"
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-mods"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-mods"
###
### Copy artifacts from builder
###
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
{# Loop over enabled run-time dependencies -#}
{%- set run_deps = [] -%}
{%- for ext in extensions_enabled -%}
@@ -69,145 +358,44 @@ ENV RUN_DEPS \
{% for run_dep in run_deps | unique | sort %}
{{ run_dep }} \
{% endfor %}
ca-certificates
###
### Install
###
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
${BUILD_DEPS} \
\
\
{# Loop over enabled extensions #}
{% for ext in extensions_enabled %}
{# Not disabled AND not already enabled #}
{% if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %}
# ---- Installing PHP Extension: {{ ext }} ----
{# ---------- Pre Command ---------- #}
{# Version specific pre-command available? #}
{% if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] %}
&& {{ extensions_available[ext][php_version]['pre'] }} \
{# Generic pre-command available? #}
{% elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %}
&& {{ extensions_available[ext]['all']['pre'] }} \
{% endif %}
{# ---------- Installation (specific) ---------- #}
{% if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] %}
{# ---- 1.) Builtin ---- #}
{% if extensions_available[ext][php_version]['type'] == 'builtin' %}
{% if 'configure' in extensions_available[ext][php_version] %}
&& /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \
{% endif %}
&& /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \
{# ---- 2.) PECL ---- #}
{% elif extensions_available[ext][php_version]['type'] == 'pecl' %}
{% if 'command' in extensions_available[ext][php_version] %}
&& {{ extensions_available[ext][php_version]['command'] }} \
{% else %}
&& pecl install {{ ext }}{% if 'version' in extensions_available[ext][php_version] %}-{{ extensions_available[ext][php_version]['version'] }}{% endif %} \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
{# ---- 3.) GIT ---- #}
{% elif extensions_available[ext][php_version]['type'] == 'git' %}
&& git clone {{ extensions_available[ext][php_version]['git_url'] }} /tmp/{{ ext }} \
&& cd /tmp/{{ ext }} \
{% if 'git_ref' in extensions_available[ext][php_version] %}
&& git checkout {{ extensions_available[ext][php_version]['git_ref'] }} \
{% endif %}
{% if 'command' in extensions_available[ext][php_version] %}
&& {{ extensions_available[ext][php_version]['command'] }} \
{% else %}
&& phpize \
&& ./configure {% if 'configure' in extensions_available[ext][php_version] %} {{ extensions_available[ext][php_version]['configure'] }}{% endif %} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
{# ---- 4.) CUSTOM ---- #}
{% elif extensions_available[ext][php_version]['type'] == 'custom' %}
&& {{ extensions_available[ext][php_version]['command'] }} \
{% endif %}
{# ---------- Installation (generic) ---------- #}
{% elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] %}
{# ---- 1.) Builtin ---- #}
{% if extensions_available[ext]['all']['type'] == 'builtin' %}
{% if 'configure' in extensions_available[ext]['all'] %}
&& /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext]['all']['configure'] }} \
{% endif %}
&& /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \
{# ---- 2.) PECL ---- #}
{% elif extensions_available[ext]['all']['type'] == 'pecl' %}
{% if 'command' in extensions_available[ext]['all'] %}
&& {{ extensions_available[ext]['all']['command'] }} \
{% else %}
&& pecl install {{ ext }}{% if 'version' in extensions_available[ext]['all'] %}-{{ extensions_available[ext]['all']['version'] }}{% endif %} \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
{# ---- 3.) GIT ---- #}
{% elif extensions_available[ext]['all']['type'] == 'git' %}
&& git clone {{ extensions_available[ext]['all']['git_url'] }} /tmp/{{ ext }} \
&& cd /tmp/{{ ext }} \
{% if 'git_ref' in extensions_available[ext]['all'] %}
&& git checkout {{ extensions_available[ext]['all']['git_ref'] }} \
{% endif %}
{% if 'command' in extensions_available[ext]['all'] %}
&& {{ extensions_available[ext]['all']['command'] }} \
{% else %}
&& phpize \
&& ./configure {% if 'configure' in extensions_available[ext]['all'] %} {{ extensions_available[ext]['all']['configure'] }}{% endif %} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
{# ---- 4.) CUSTOM ---- #}
{% elif extensions_available[ext]['all']['type'] == 'custom' %}
&& {{ extensions_available[ext]['all']['command'] }} \
{% endif %}
{% endif %}
{# Only delete files for extensions we've actually installed, not those that were already available by default #}
&& (rm -rf /usr/local/lib/php/test/{{ ext }} || true) \
&& (rm -rf /usr/local/lib/php/doc/{{ ext }} || true) \
\
{% endif %}
{# Ensure modules that are not disabled have an appropriate ini directive and are loaded #}
{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
{% if php_version in extensions_available[ext] and 'load_ext' in extensions_available[ext][php_version] %}
&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extension={{ extensions_available[ext][php_version]['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \
{% elif 'all' in extensions_available[ext] and 'load_ext' in extensions_available[ext]['all'] %}
&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extenstion={{ extensions_available[ext]['all']['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \
{% endif %}
{% endif %}
{% endfor %}
{# Fix php.ini settings for enabled extensions #}
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi \
{# /Fix php.ini settings for enabled extensions #}
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \
&& rm -rf /tmp/* \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
&& update-ca-certificates \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
&& update-ca-certificates
###
### Post Install
###
{# Loop over enabled extensions #}
{%- set post_commands = {} -%}
{% for ext in extensions_enabled %}
{%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %}
{#- Version specific post-command available? -#}
{%- if php_version in extensions_available[ext] and 'post' in extensions_available[ext][php_version] -%}
{{- post_commands.update({ext: extensions_available[ext][php_version]['post']}) -}}
{#- Generic post-command available? -#}
{%- elif 'all' in extensions_available[ext] and 'post' in extensions_available[ext]['all'] %}
{{- post_commands.update({ext: extensions_available[ext]['all']['post']}) -}}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{% if post_commands | length > 0 -%}
RUN set -eux \
{%- for ext in post_commands -%}
{{- "\n\t" }}# ---------- {{ ext }} ----------
{{- "\n\t" }}&& {{ post_commands[ext] }} \
{%- endfor -%}
{{- "\n\t" }}&& true{{- "\n\n\n" }}
{%- endif -%}
{% if debug %}
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \
&& /usr/local/sbin/php-fpm --test \
@@ -244,6 +432,13 @@ RUN set -x \
{% endif %}
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Ports
###
@@ -253,4 +448,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
{{ edit_comment_prod }}
FROM devilbox/php-fpm:{{ php_version }}-mods
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM {{ php_version }} Image" \
image="devilbox/php-fpm" \
tag="{{ php_version }}-prod" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-prod"
###
### Install
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -32,20 +40,21 @@ RUN set -x \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
{% if debug %}
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \
&& /usr/local/sbin/php-fpm --test \
@@ -79,7 +88,6 @@ VOLUME /var/log/php
VOLUME /var/mail
###
### Ports
###
@@ -89,4 +97,5 @@ EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
{{ edit_comment_work }}
FROM devilbox/php-fpm:{{ php_version }}-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -6,12 +6,33 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM {{ php_version }} Image" \
image="devilbox/php-fpm" \
tag="{{ php_version }}-work" \
vendor="devilbox" \
license="MIT"
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-work"
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-work"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
@@ -23,45 +44,42 @@ ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -x \
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
{% for repo in apt_repositories_enabled -%}
\
{%- for repo in apt_repositories_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%}
{#- Version specific pre-command available? -#}
{%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %}
&& {{ apt_repositories_available[repo][php_version]['pre'] }} \
{# #}
{%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] -%}
{{ "\n\t" }}&& {{ apt_repositories_available[repo][php_version]['pre'] }} \
{#- Generic pre-command available? -#}
{%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %}
&& {{ apt_repositories_available[repo]['all']['pre'] }} \
{# #}
{%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] -%}
{{ "\n\t" }}&& {{ apt_repositories_available[repo]['all']['pre'] }} \
{%- endif -%}
{#- Version specific key available? -#}
{%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %}
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \
{# #}
{%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] -%}
{{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \
{#- Generic key available? -#}
{%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %}
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \
{# #}
{%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] -%}
{{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \
{%- endif -%}
{#- Version specific repository available? -#}
{%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %}
&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{# #}
{%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] -%}
{{ "\n\t" }}&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{#- Generic repository available? -#}
{%- else %}
&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{# #}
{%- elif 'all' in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo]['all'] -%}
{{ "\n\t" }}&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{%- endif -%}
{%- endif -%}
{%- endfor %}
{%- endfor -%}{{ "\n\t" }}\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \
@@ -73,6 +91,9 @@ RUN set -x \
blackfire-agent \
build-essential \
bzip2 \
{% if php_version != 5.2 and php_version != 5.3 and php_version != 5.4 and php_version != 5.5 %}
certbot \
{% endif %}
coreutils \
dnsutils \
dos2unix \
@@ -82,7 +103,9 @@ RUN set -x \
git \
git-flow \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -93,11 +116,18 @@ RUN set -x \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] %}
mariadb-client \
{% else %}
mysql-client \
{% endif %}
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -123,7 +153,11 @@ RUN set -x \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
{% if php_version in [5.6, 7.0] %}
zsh-common \
{% endif %}
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -135,35 +169,55 @@ RUN set -x \
###
### Install custom software
###
RUN set -x \
{% for tool in software_enabled %}
{# Not disabled #}
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %}
# {{ tool }}
{# Version specific pre-command available? #}
{% if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] %}
&& {{ software_available[tool][php_version]['pre'] }} \
{# Generic pre-command available? #}
{% elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] %}
&& {{ software_available[tool]['all']['pre'] }} \
{% endif %}
{# Version specific command available? #}
{% if php_version in software_available[tool] and 'command' in software_available[tool][php_version] %}
&& {{ software_available[tool][php_version]['command'] }} \
{# Generic command available? #}
{% else %}
&& {{ software_available[tool]['all']['command'] }} \
{% endif %}
{# Version specific post-command available? #}
{% if php_version in software_available[tool] and 'post' in software_available[tool][php_version] %}
&& {{ software_available[tool][php_version]['post'] }} \
{# Generic post-command available? #}
{% elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] %}
&& {{ software_available[tool]['all']['post'] }} \
{% endif %}
{% endif %}
{% endfor %}
\
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in software_enabled -%}
{# Not disabled #}
{%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific pre-command available? -#}
{%- if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] -%}
{{ "\n\t" }}&& {{ software_available[tool][php_version]['pre'] }} \
{#- Generic pre-command available? -#}
{%- elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] -%}
{{ "\n\t" }}&& {{ software_available[tool]['all']['pre'] }} \
{%- endif -%}
{#- Version specific command available? -#}
{%- if php_version in software_available[tool] and 'command' in software_available[tool][php_version] -%}
{{ "\n\t" }}&& {{ software_available[tool][php_version]['command'] }} \
{#- Generic command available? -#}
{%- else -%}
{{ "\n\t" }}&& {{ software_available[tool]['all']['command'] }} \
{%- endif -%}
{#- Version specific post-command available? -#}
{%- if php_version in software_available[tool] and 'post' in software_available[tool][php_version] -%}
{{ "\n\t" }}&& {{ software_available[tool][php_version]['post'] }} \
{#- Generic post-command available? -#}
{%- elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] -%}
{{ "\n\t" }}&& {{ software_available[tool]['all']['post'] }} \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in software_available[tool] -%}
{{ "\n\t" }}&& {{ software_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \
&& (rm -rf /root/.composer || true) \
@@ -181,61 +235,50 @@ RUN set -x \
###
### Install Node npm packages (globally)
### Install Composer (PHP)
###
RUN set -x \
{% for tool in npm_enabled %}
{# Not disabled #}
{% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %}
# {{ tool }}
{# Version specific gem version available? #}
{% if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] %}
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool][php_version]['version'] }}' devilbox \
{# Generic gem version available? #}
{% elif 'all' in npm_available[tool] and 'version' in npm_available[tool]['all'] %}
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \
{# No version info available #}
{% else %}
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }}' devilbox \
{% endif %}
{% endif %}
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in composer_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['version'] }} \
{#- Generic gem version available? -#}
{%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }} \
{%- endif -%}
{#- Symlinks available? -#}
{%- if 'link' in composer_available[tool] -%}
{{ "\n\t" }}&& ln -s {{ composer_home }}/vendor/{{ composer_available[tool]['name'] }}/{{ composer_available[tool]['link'] }} /usr/local/bin/ \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in composer_available[tool] -%}
{{ "\n\t" }}&& {{ composer_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{% endfor %}
\
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
{% for tool in pip_enabled %}
{# Not disabled #}
{% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %}
# {{ tool }}
{# Version specific gem version available? #}
{% if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} \
{# Generic gem version available? #}
{% elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} \
{# No version info available #}
{% else %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \
{% endif %}
{% endif %}
{% endfor %}
\
&& rm -rf /root/.cache/pip \
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
@@ -245,26 +288,100 @@ RUN set -x \
###
### Install Ruby gems
### Install npm (Node)
###
RUN set -x \
{% for tool in gem_enabled %}
{# Not disabled #}
{% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %}
# {{ tool }}
{# Version specific gem version available? #}
{% if php_version in gem_available[tool] and 'version' in gem_available[tool][php_version] %}
&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool][php_version]['version'] }} \
{# Generic gem version available? #}
{% elif 'all' in gem_available[tool] and 'version' in gem_available[tool]['all'] %}
&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool]['all']['version'] }} \
{# No version info available #}
{% else %}
&& gem install {{ gem_available[tool]['name'] }} \
{% endif %}
{% endif %}
{% endfor %}
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in npm_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] -%}
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }} {{ npm_available[tool][php_version]['version'] }}' devilbox \
{#- Generic gem version available? -#}
{%- elif 'all' in npm_available[tool] and 'version' in npm_available[tool]['all'] -%}
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }}' devilbox \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in npm_available[tool] -%}
{{ "\n\t" }}&& PATH=$PATH:/opt/nvm/versions/node/$(/bin/ls -1 /opt/nvm/versions/node/ | sort -V | tail -1)/bin /opt/nvm/versions/node/$(/bin/ls -1 /opt/nvm/versions/node/ | sort -V | tail -1)/bin/{{ npm_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in gem_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in gem_available[tool] and 'version' in gem_available[tool][php_version] -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool][php_version]['version'] }} \
{#- Generic gem version available? -#}
{%- elif 'all' in gem_available[tool] and 'version' in gem_available[tool]['all'] -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in gem_available[tool] -%}
{{ "\n\t" }}&& {{ gem_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& rm -rf /root/.gem \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
@@ -274,12 +391,65 @@ RUN set -x \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install pip (Python) packages
###
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in pip_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} || true \
{#- Generic gem version available? -#}
{%- elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} || true \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} || true \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in pip_available[tool] -%}
{{ "\n\t" }}&& {{ pip_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Configure Bash
###
RUN \
{ \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin"; \
echo 'PATH="${PATH}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -298,7 +468,7 @@ RUN \
###
### Verify
###
RUN set -x \
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \
&& /usr/local/sbin/php-fpm --test \
@@ -314,43 +484,54 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -x \
{# ---- SOFTWARE ---- #}
{% for tool in software_enabled %}
{# Not disabled #}
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %}
{% if 'check' in software_available[tool] %}
&& {{ software_available[tool]['check'] }} \
{% endif %}
{% endif %}
{% endfor %} \
{# ---- PIP ---- #}
{% for tool in pip_enabled %}
{# Not disabled #}
{% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %}
{% if 'check' in pip_available[tool] %}
&& {{ pip_available[tool]['check'] }} \
{% endif %}
{% endif %}
{% endfor %} \
{# ---- NPM ---- #}
{% for tool in npm_enabled %}
{# Not disabled #}
{% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %}
{% if 'check' in npm_available[tool] %}
&& {{ npm_available[tool]['check'] }} \
{% endif %}
{% endif %}
{% endfor %} \
{# ---- GEM ---- #}
{% for tool in gem_enabled %}
{# Not disabled #}
{% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %}
{% if 'check' in gem_available[tool] %}
&& {{ gem_available[tool]['check'] }} \
{% endif %}
{% endif %}
{% endfor %} \
RUN set -eux \
# -------------------- Software --------------------
{%- for tool in software_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
{%- if 'check' in software_available[tool] -%}
{{ "\n\t" }}&& {{ software_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{%- endfor -%}{{ "\n\t" }}\
# -------------------- Composer --------------------
{%- for tool in composer_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
{%- if 'check' in composer_available[tool] -%}
{{ "\n\t" }}&& {{ composer_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{%- endfor -%}{{ "\n\t" }}\
# -------------------- PIP --------------------
{%- for tool in pip_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) -%}
{%- if 'check' in pip_available[tool] -%}
{{ "\n\t" }}&& {{ pip_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{%- endfor -%}{{ "\n\t" }}\
# -------------------- NPM --------------------
{%- for tool in npm_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
{%- if 'check' in npm_available[tool] -%}
{{ "\n\t" }}&& {{ npm_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{%- endfor -%}{{ "\n\t" }}\
# -------------------- GEM --------------------
{%- for tool in gem_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) -%}
{%- if 'check' in gem_available[tool] -%}
{{ "\n\t" }}&& {{ gem_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{% endfor %}{{ "\n\t" }}\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \
&& rm -rf /root/.console \
@@ -362,6 +543,13 @@ RUN set -x \
{% endif %}
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###
@@ -374,7 +562,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
@@ -398,4 +585,5 @@ WORKDIR /shared/httpd
###
### Entrypoint
###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -1,14 +1,22 @@
---
###################################################################################################
# Ansible specifi definitions
# Ansible specific definitions
###################################################################################################
edit_comment_base: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead."
edit_comment_mods: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead."
edit_comment_prod: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead."
edit_comment_work: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead."
# -------------------------------------------------------------------------------------------------
# Adds version checks to Dockerfile
# -------------------------------------------------------------------------------------------------
debug: True
# Also implement checks in builder images (slow, but fails faster)
build_fail_fast: False
# -------------------------------------------------------------------------------------------------
# Available PHP versions (see inventory)
@@ -25,6 +33,7 @@ php_all_versions:
- 7.3
- 7.4
- 8.0
- 8.1
# -------------------------------------------------------------------------------------------------

View File

@@ -17,33 +17,37 @@ php_settings_ini:
# ---- Sane default ----
base:
# Memory
memory_limit: 512M
memory_limit: 512M
# Timeouts
max_execution_time: "{{ php_timeout }}"
max_input_time: "{{ php_timeout }}"
max_execution_time: "{{ php_timeout }}"
max_input_time: "{{ php_timeout }}"
# Uploads
# Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size: 72M
upload_max_filesize: 64M
max_file_uploads: 20
post_max_size: 72M
upload_max_filesize: 64M
max_file_uploads: 20
# Variables
variables_order: EGPCS
max_input_vars: 8000
max_input_nesting_level: 64
variables_order: EGPCS
max_input_vars: 8000
max_input_nesting_level: 64
# Error reporting
error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'Off'
display_startup_errors: 'Off'
track_errors: 'On'
log_errors: 'On'
html_errors: 'Off'
# Xdebug settings
xdebug_default_enable: 'Off'
xdebug_profiler_enable: 'Off'
xdebug_remote_enable: 'Off'
xdebug_remote_autostart: 'Off'
error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'Off'
display_startup_errors: 'Off'
track_errors: 'On'
log_errors: 'On'
html_errors: 'Off'
# Xdebug2 settings
xdebug2_default_enable: 'Off'
xdebug2_profiler_enable: 'Off'
xdebug2_remote_enable: 'Off'
xdebug2_remote_autostart: 'Off'
# Xdebug3 settings
xdebug3_mode: 'Off'
xdebug3_start_with_request: 'default'
xdebug3_client_port: '9000'
# ---- Inherits from base ----
mods:
@@ -52,20 +56,23 @@ php_settings_ini:
# ---- Inherits from base and overwrites certain values ----
work:
# Error reporting
error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'On'
display_startup_errors: 'On'
track_errors: 'On'
log_errors: 'On'
html_errors: 'On'
# Xdebug settings
xdebug_default_enable: 'Off'
xdebug_profiler_enable: 'Off'
xdebug_remote_enable: 'Off'
xdebug_remote_autostart: 'Off'
error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors: 'Off'
report_memleaks: 'On'
display_errors: 'On'
display_startup_errors: 'On'
track_errors: 'On'
log_errors: 'On'
html_errors: 'On'
# Xdebug2 settings
xdebug2_default_enable: 'Off'
xdebug2_profiler_enable: 'Off'
xdebug2_remote_enable: 'Off'
xdebug2_remote_autostart: 'Off'
# Xdebug3 settings
xdebug3_mode: 'Off'
xdebug3_start_with_request: 'default'
xdebug3_client_port: '9000'
# -------------------------------------------------------------------------------------------------
# php-fpm.conf

Some files were not shown because too many files have changed in this diff Show More