Compare commits

...

217 Commits
0.97 ... 0.132

Author SHA1 Message Date
cytopia
928c712fa6 Merge pull request #224 from devilbox/release-0.132
Release 0.132
2022-02-02 09:36:19 +01:00
cytopia
c818efe5e3 Change postfix hostname to localhost 2022-02-01 23:38:35 +01:00
cytopia
ec1a1bd79d Update CHANGELOG 2022-02-01 21:07:01 +01:00
cytopia
184881a8c5 Add pdo_sqlsrv and sqlsrv to PHP 8.1 2022-02-01 21:06:37 +01:00
cytopia
1782f24d03 Updated CHANGELOG 2022-02-01 20:08:46 +01:00
cytopia
4cee51dbf4 Fixed nvm PATH priority 2022-02-01 20:08:32 +01:00
cytopia
fbcd91f248 Update nightly tag 2022-02-01 00:22:08 +01:00
cytopia
d2cb8ef2c3 Ensure postfix has a default hostname 2022-02-01 00:21:43 +01:00
cytopia
f3e7f5d352 Merge pull request #223 from devilbox/release-0.131
Release 0.131
2022-01-27 00:36:49 +01:00
cytopia
d3923eb359 Update nightly workflow 2022-01-26 18:57:11 +01:00
cytopia
9a24cfe917 Fix GD AVIF CI test 2022-01-26 16:37:33 +01:00
cytopia
0229adf7c1 Fix uuid module version 2022-01-26 15:33:34 +01:00
cytopia
c35262e9b8 Update php-cs-fixer 2022-01-26 14:25:39 +01:00
cytopia
17649294c2 Added extension rdkafka to PHP 8.0 and PHP 8.1 2022-01-26 13:51:13 +01:00
cytopia
2d428c264a Added extension: uuid 2022-01-26 13:40:02 +01:00
cytopia
72d34ca52f Added imagick extension for PHP 8.0 and PHP 8.1 2022-01-26 13:20:37 +01:00
cytopia
6fbbc9580f Added pdo_dblib extension for PHP 8.1 2022-01-26 13:13:44 +01:00
cytopia
44cc0093ec Use pecl to install uploadprogress 2022-01-26 13:07:24 +01:00
cytopia
881dd567c9 Added uploadprogress extension for PHP 8.0 and PHP 8.1 2022-01-26 13:02:54 +01:00
cytopia
2184f1f9a0 Added xlswriter extension for PHP 8.1 2022-01-26 12:59:06 +01:00
cytopia
e10f81915b Added amqp extension for PHP 8.0 and PHP 8.1 2022-01-26 12:50:56 +01:00
cytopia
9fbdc187d8 Added amqp extension for PHP 8.0 and PHP 8.1 2022-01-26 12:47:31 +01:00
cytopia
1261f3a700 Added sqlite3 binary to all PHP images 2022-01-26 12:34:04 +01:00
cytopia
015eaff5d0 Enable AVIF support in GD for PHP 8.1 2022-01-26 12:27:46 +01:00
cytopia
b5c34feb7c Merge pull request #222 from devilbox/release-0.130
Release 0.130
2022-01-24 18:10:29 +01:00
cytopia
61ee6b3bfb Ensure apt update works on final images 2022-01-24 16:00:26 +01:00
cytopia
feb6f0fee8 Merge pull request #221 from devilbox/release-0.129
Release 0.129
2022-01-24 00:02:29 +01:00
cytopia
40c3980b3e Adjust CI tests for enchant 2022-01-23 22:08:10 +01:00
cytopia
857900acc6 Update CHANGELOG 2022-01-23 19:08:31 +01:00
cytopia
7aa26f96d0 Fix run-dep for ffi on PHP 7.4 2022-01-23 19:08:06 +01:00
cytopia
70ab96876d Update CHANGELOG 2022-01-23 19:00:10 +01:00
cytopia
666980dc1c Update pip to use Python3 for PHP >= 7.3 2022-01-23 18:39:51 +01:00
cytopia
b776a9110f Update PostgreSQL repos to Bullseye for PHP >= 7.3 2022-01-23 18:33:06 +01:00
cytopia
d1ec52838a Be a bit more verbose during apt-get commands 2022-01-23 18:19:25 +01:00
cytopia
8d8c92657a Fixed building ffi on PHP 7.4 2022-01-23 18:12:24 +01:00
cytopia
7a2710ffc5 Fix apt package versions 2022-01-23 18:11:56 +01:00
cytopia
58751d8deb Updated CHANGELOG 2022-01-23 16:25:31 +01:00
cytopia
3d96f15958 Updated nightly tag 2022-01-23 16:25:08 +01:00
cytopia
c8c71fb115 Removed enchant from PHP 7.3 and PHP 7.4 as libenchant1 is not available via apt 2022-01-23 16:23:30 +01:00
cytopia
e156582252 Fixed building sockets on PHP 8.0 and PHP 8.1 2022-01-23 16:18:26 +01:00
cytopia
ae9d987cb9 Fixed php-cs-fixer download on cert issues 2022-01-23 15:36:19 +01:00
cytopia
7b68744404 Do not hide curl errors during build stage 2022-01-23 14:55:12 +01:00
cytopia
c3ad81b808 Fixed phpunit download on cert issues 2022-01-23 14:50:26 +01:00
cytopia
9531a29533 Fixed phpmd download on cert issues 2022-01-23 14:40:18 +01:00
cytopia
ed3449af98 Fixed deployer.org download on cert issues 2022-01-23 14:37:25 +01:00
cytopia
5a5bcb1644 Disabled mcrypt for PHP 8.1 as not yet supported 2022-01-23 13:41:57 +01:00
cytopia
b0d72726bf Fixed pgsql apt keys 2022-01-23 13:27:10 +01:00
cytopia
9f073247f8 Ensure versions are pinned 2022-01-23 11:42:05 +01:00
cytopia
49e3180891 Merge pull request #212 from fibis/master
Add module swoole in php 8.0
2021-06-16 10:09:16 +02:00
cytopia
b4df3bc119 Update CHANGELOG 2021-06-15 21:16:17 +02:00
cytopia
5aeeb86210 Update nightly workflow tag 2021-06-15 21:14:15 +02:00
Adriaan Wind
0421750699 update readme 2021-06-15 18:30:32 +02:00
Adriaan Wind
36ef04c0f6 add swoole the correct way 2021-06-15 17:22:58 +02:00
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
119 changed files with 8205 additions and 3094 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-'))
)

View File

@@ -1,27 +1,55 @@
--- ---
### # -------------------------------------------------------------------------------------------------
### Lints all generic and json files in the whole git repository # Job Name
### # -------------------------------------------------------------------------------------------------
name: lint
name: Linting
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on: on:
# Runs on Pull Requests
pull_request: pull_request:
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs: jobs:
lint: lint:
name: "[ ${{ matrix.job }} ]" name: "Lint"
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
job: [gen-dockerfiles]
steps: steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v1 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 - name: Diff generated Docker files
run: | run: |
make "${JOB}" make gen-dockerfiles
git diff --quiet || { echo "Build Changes"; git diff; git status; false; } git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
env:
JOB: ${{ matrix.job }}

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.132'
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,333 +0,0 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: PHP-CI
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs on Pull Requests
pull_request:
# Runs on master Branch and Tags
push:
branches:
- master
tags:
- '[0-9]+.[0-9]+*'
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
diagnostics:
name: Diagnostics
runs-on: ubuntu-latest
strategy:
fail-fast: False
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Show environment
run: |
env
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
- name: Show GitHub variables
run: |
echo "github.actor: ${{ github.actor }}"
echo "github.ref: ${{ github.ref }}"
echo "github.base_ref: ${{ github.base_ref }}"
echo "github.head_ref: ${{ github.head_ref }}"
echo "github.event: ${{ github.event }}"
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}"
echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Dump Runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "${RUNNER_CONTEXT}"
build:
name: "[ ${{ matrix.version }} ]"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
# Adding all targets and only run them if they exist.
# Prevents us from forgetting to update this in case
# we add new envs in terragrunt.
version:
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
steps:
# ------------------------------------------------------------
# Checkout repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v1
- name: Set variables
id: vars
run: |
# Set git branch or git tag as slug
if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then
GIT_TYPE=TAG
GIT_SLUG="${GITHUB_REF/refs\/tags\//}"
else
GIT_TYPE=BRANCH
if [ -n "${GITHUB_HEAD_REF}" ]; then
GIT_SLUG="${GITHUB_HEAD_REF}"
else
GIT_SLUG="${GITHUB_REF/refs\/heads\//}"
fi
fi
# Export variable
# # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env
echo ::set-env name=GIT_TYPE::${GIT_TYPE}
echo ::set-env name=GIT_SLUG::${GIT_SLUG}
# ------------------------------------------------------------
# Base
# ------------------------------------------------------------
- name: Build Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Mods
# ------------------------------------------------------------
- name: Build Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Prod
# ------------------------------------------------------------
- name: Build Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Work
# ------------------------------------------------------------
- name: Build Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# 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 }}
# ------------------------------------------------------------
# Push build artifacts
# ------------------------------------------------------------
# Only run this, if the PR was created by the repo owner
- name: Publish images (only repo owner)
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
# Info output
echo "Git Type: ${GIT_TYPE}"
echo "Git Slug: ${GIT_SLUG}"
# Login
echo "retry make login USER= PASS="
# Push
if [ "${GIT_TYPE}" = "TAG" ]; then
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
else
if [ "${GIT_SLUG}" = "master" ]; then
echo "retry make push-base VERSION=${VERSION}"
echo "retry make push-mods VERSION=${VERSION}"
echo "retry make push-prod VERSION=${VERSION}"
echo "retry make push-work VERSION=${VERSION}"
else
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
fi
fi
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# 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 == 'pull_request' && (startsWith(github.head_ref, 'release-')))
)

View File

@@ -1,328 +0,0 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: PHP-Nightly
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs daily
schedule:
- cron: '0 0 * * *'
# -------------------------------------------------------------------------------------------------
# What to run
# -------------------------------------------------------------------------------------------------
jobs:
diagnostics:
name: Diagnostics
runs-on: ubuntu-latest
strategy:
fail-fast: False
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Show environment
run: |
env
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
- name: Show GitHub variables
run: |
echo "github.actor: ${{ github.actor }}"
echo "github.ref: ${{ github.ref }}"
echo "github.base_ref: ${{ github.base_ref }}"
echo "github.head_ref: ${{ github.head_ref }}"
echo "github.event: ${{ github.event }}"
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}"
echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"
- name: Dump Runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "${RUNNER_CONTEXT}"
build:
name: "[ ${{ matrix.version }} ]"
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
# Adding all targets and only run them if they exist.
# Prevents us from forgetting to update this in case
# we add new envs in terragrunt.
version:
- '5.2'
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
steps:
# ------------------------------------------------------------
# Checkout repository
# ------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v1
- name: Set variables
id: vars
run: |
# Set git branch or git tag as slug
if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then
GIT_TYPE=TAG
GIT_SLUG="${GITHUB_REF/refs\/tags\//}"
else
GIT_TYPE=BRANCH
if [ -n "${GITHUB_HEAD_REF}" ]; then
GIT_SLUG="${GITHUB_HEAD_REF}"
else
GIT_SLUG="${GITHUB_REF/refs\/heads\//}"
fi
fi
# Export variable
# # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env
echo ::set-env name=GIT_TYPE::${GIT_TYPE}
echo ::set-env name=GIT_SLUG::${GIT_SLUG}
# ------------------------------------------------------------
# Base
# ------------------------------------------------------------
- name: Build Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Base
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-base VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Mods
# ------------------------------------------------------------
- name: Build Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Mods
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-mods VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Prod
# ------------------------------------------------------------
- name: Build Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Prod
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-prod VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# Work
# ------------------------------------------------------------
- name: Build Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make build-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
- name: Test Work
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
retry make test-work VERSION=${VERSION}
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# ------------------------------------------------------------
# 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 }}
# ------------------------------------------------------------
# Push build artifacts
# ------------------------------------------------------------
# Only run this, if the PR was created by the repo owner
- name: Publish images (only repo owner)
run: |
retry() {
for ((n=0; n<${RETRIES}; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
sleep 10;
done;
return 1;
}
# Info output
echo "Git Type: ${GIT_TYPE}"
echo "Git Slug: ${GIT_SLUG}"
# Login
echo "retry make login USER= PASS="
# Push
if [ "${GIT_TYPE}" = "TAG" ]; then
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
else
if [ "${GIT_SLUG}" = "master" ]; then
echo "retry make push-base VERSION=${VERSION}"
echo "retry make push-mods VERSION=${VERSION}"
echo "retry make push-prod VERSION=${VERSION}"
echo "retry make push-work VERSION=${VERSION}"
else
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
fi
fi
env:
VERSION: ${{ matrix.version }}
RETRIES: 5
# 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 == 'pull_request' && (startsWith(github.head_ref, 'release-')))
)

View File

@@ -1,150 +0,0 @@
---
###
### Travis settings
###
sudo: required
language: minimal
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:
- 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
- retry() {
for ((n=0; n<10; n++)); do
echo "[${n}] ${*}";
if eval "${*}"; then
return 0;
fi;
done;
return 1;
}
###
### Check generation changes, build and test
###
before_script:
# Regenerate Dockerfiles and make sure nothing has changed (every stage)
- make gen-dockerfiles
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
# Build (multiple tries due to network outages)
- retry make build-base VERSION=${PHP}
#- retry make test-base VERSION=${PHP}
- retry make build-mods VERSION=${PHP}
#- retry make test-mods VERSION=${PHP}
- retry make build-prod VERSION=${PHP}
#- retry make test-prod VERSION=${PHP}
- retry make build-work VERSION=${PHP}
- retry make test-work VERSION=${PHP}
# Test if PHP modules have changed
- make gen-readme VERSION=${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

315
CHANGELOG.md Normal file
View File

@@ -0,0 +1,315 @@
# Changelog
## Unreleased
## Release 0.132
#### Fixed
- Fixed `nvm` PATH priority [#846](https://github.com/cytopia/devilbox/issues/846)
#### Added
- added extension `sqlsrv` to php 8.1
- added extension `pdo_sqlsrv` to php 8.1
#### Changed
- Changed postfix hostname to `localhost` instead of GitHub runners long name
## Release 0.131
#### Added
- Added binary `sqlite3` to all PHP images [#856](https://github.com/cytopia/devilbox/issues/856)
- Added binary `laravel` to PHP 8.0 and PHP 8.1 [#823](https://github.com/cytopia/devilbox/issues/823)
- Added AVIF support in GD for PHP 8.1 [#834](https://github.com/cytopia/devilbox/issues/834)
- Added extension `amqp` to PHP 8.0 and PHP 8.1 [#826](https://github.com/cytopia/devilbox/issues/826)
- Added extension `uploadprogress` to PHP 8.0 and PHP 8.1 [#158](https://github.com/devilbox/docker-php-fpm/pull/158)
- Added extension `imagick` to PHP 8.0 and PHP 8.1
- Added extension `rdkafka` to PHP 8.0 and PHP 8.1
- Added extension `xlswriter` to PHP 8.1
- Added extension `pdo_dblib` to PHP 8.1
- Added extension `uuid` to all PHP versions (except 5.2)
#### Changed
- Updated `php-cs-fixer` to latest version [#219](https://github.com/devilbox/docker-php-fpm/pull/219)
## Release 0.130
#### Fixed
- Fixed correct keys for `apt`
#### Added
- Added integration checks for `apt update`
## Release 0.129
#### Fixed
- Pinned module: `uploadprogress`
- Pinned module: `mongodb`
- Pinned lib: `libenchant`
- Pinned lib: `libicu`
- Pinned lib: `libvpx`
- Pinned PHP 8.0: https://github.com/devilbox/docker-php-fpm-8.0/pull/16
- Pinned PHP 8.1: https://github.com/devilbox/docker-php-fpm-8.1/pull/9
- Fixed `pgsql` apt key
- Fixed `deployer` download on cert issues
- Fixed `phpmd` download on cert issues
- Fixed `phpunit` download on cert issues
- Fixed `php-cs-fixer` download on cert issues
- Fixed building `sockets` on PHP 8.0 and PHP 8.1
- Fixed building `ffi` on PHP 7.4
#### Changed
- Removed `mcrypt` from PHP 8.1 as it is not yet supported
- Removed `enchant` from PHP 7.3 and PHP 7.4 as libenchant1 is not available via apt
- Updated PHP 8.0 base image to BullsEye: https://github.com/devilbox/docker-php-fpm-8.0/pull/17
- Updated PHP 8.1 base image to BullsEye: https://github.com/devilbox/docker-php-fpm-8.1/pull/10
- Updated PostgreSQL repos to Bullseye for PHP >= 7.3
- Updated `pip` to use Python3 for PHP >= 7.3
## Release 0.128
#### Added
- Adding `pdo_sqlsrv` to more PHP versions
## Release 0.127
#### Changed
- Adding `swoole` to more PHP 8.0
## 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

@@ -51,8 +51,8 @@ RUN set -eux \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list } | tee /etc/apt/sources.list
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -51,8 +51,8 @@ RUN set -eux \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list } | tee /etc/apt/sources.list
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -51,8 +51,8 @@ RUN set -eux \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list } | tee /etc/apt/sources.list
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -51,8 +51,8 @@ RUN set -eux \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list } | tee /etc/apt/sources.list
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -44,8 +44,8 @@ RUN set -eux \
### Upgrade (install ps) ### Upgrade (install ps)
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

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 -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -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 fi
# Change uid and fix homedir permissions # Change uid and fix homedir permissions
log "info" "Changing user '${username}' uid to: ${uid}" "${debug}" log "info" "Changing user '${username}' uid to: ${uid}" "${debug}"
run "usermod -u ${uid} ${username}" "${debug}" if ! run "usermod -u ${uid} ${username} 2>/dev/null" "${debug}"; then
run "chown -R ${username} ${homedir}" "${debug}" 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/session" "${debug}"
run "chown -R ${username} /var/lib/php/wsdlcache" "${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
fi fi
} }
@@ -100,12 +108,20 @@ set_gid() {
run "groupmod -g ${spare_gid} ${target_groupname}" "${debug}" run "groupmod -g ${spare_gid} ${target_groupname}" "${debug}"
fi fi
fi fi
# Change ugd and fix homedir permissions # Change gid and fix homedir permissions
log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}" log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}"
run "groupmod -g ${gid} ${groupname}" "${debug}" if ! run "groupmod -g ${gid} ${groupname} 2>/dev/null" "${debug}"; then
run "chown -R :${groupname} ${homedir}" "${debug}" 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/session" "${debug}"
run "chown -R :${groupname} /var/lib/php/wsdlcache" "${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
fi fi
} }

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@@ -6,9 +6,9 @@ FROM devilbox/php-fpm:5.2-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
libbz2-dev \ libbz2-dev \
@@ -172,7 +172,7 @@ ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # 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-jis-conv --enable-gd-native-ttf \ && 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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -242,8 +242,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -455,10 +456,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
@@ -561,6 +562,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -568,8 +571,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
libenchant1c2a \ libenchant1c2a \
@@ -764,6 +767,13 @@ RUN set -eux \
&& true && 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 ### Ports
### ###

View File

@@ -6,9 +6,9 @@ FROM devilbox/php-fpm:5.3-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
@@ -43,7 +43,9 @@ RUN set -eux \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
snmp \ snmp \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -167,7 +169,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # 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-jis-conv --enable-gd-native-ttf \ && 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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -253,8 +255,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -554,15 +557,26 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid-1.0.5 \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -602,6 +616,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-1.3.2 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
@@ -660,6 +685,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -667,8 +694,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
@@ -691,7 +718,9 @@ RUN set -eux \
libvpx1 \ libvpx1 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
snmp \ snmp \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -873,6 +902,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -887,11 +918,20 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -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 -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,9 +6,9 @@ FROM devilbox/php-fpm:5.4-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
@@ -43,7 +43,9 @@ RUN set -eux \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
snmp \ snmp \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -167,7 +169,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 \ && docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 # Installation
&& docker-php-ext-install gd \ && docker-php-ext-install gd \
&& true && true
@@ -253,8 +255,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install mcrypt \ && docker-php-ext-install mcrypt \
&& true && true
@@ -573,15 +576,26 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid-1.0.5 \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -621,6 +635,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-1.3.2 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
@@ -679,6 +704,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -686,8 +713,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
@@ -710,7 +737,9 @@ RUN set -eux \
libvpx1 \ libvpx1 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
snmp \ snmp \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -894,6 +923,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -908,11 +939,20 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -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 -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,12 +6,13 @@ FROM devilbox/php-fpm:5.5-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -26,6 +27,7 @@ RUN set -eux \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \ libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
@@ -41,10 +43,13 @@ RUN set -eux \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libvpx-dev \ libvpx-dev \
libwebp5 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
snmp \ snmp \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -158,7 +163,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 \ && docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -193,6 +198,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: imagick --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install imagick \
# Enabling
&& docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true
# -------------------- Installing PHP Extension: imap -------------------- # -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \ RUN set -eux \
# Generic pre-command # Generic pre-command
@@ -236,8 +263,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -561,15 +589,26 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid-1.0.5 \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -609,6 +648,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-1.3.2 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
@@ -667,6 +717,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -674,8 +726,9 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
@@ -684,6 +737,7 @@ RUN set -eux \
libfreetype6 \ libfreetype6 \
libicu52 \ libicu52 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagickwand-6.q16-2 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libmysqlclient18 \ libmysqlclient18 \
@@ -696,9 +750,12 @@ RUN set -eux \
libsybdb5 \ libsybdb5 \
libtidy-0.99-0 \ libtidy-0.99-0 \
libvpx1 \ libvpx1 \
libwebp5 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
snmp \ snmp \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -709,6 +766,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -777,6 +845,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^iconv$' \ && php-fpm -m | grep -oiE '^iconv$' \
&& php -m | grep -oiE '^igbinary$' \ && php -m | grep -oiE '^igbinary$' \
&& php-fpm -m | grep -oiE '^igbinary$' \ && php-fpm -m | grep -oiE '^igbinary$' \
&& php -m | grep -oiE '^imagick$' \
&& php-fpm -m | grep -oiE '^imagick$' \
&& php -m | grep -oiE '^imap$' \ && php -m | grep -oiE '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \ && php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^interbase$' \ && php -m | grep -oiE '^interbase$' \
@@ -882,6 +952,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -896,11 +968,20 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -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 -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,12 +6,13 @@ FROM devilbox/php-fpm:5.6-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
@@ -47,8 +48,10 @@ RUN set -eux \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -176,7 +179,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 \ && docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -219,6 +222,17 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true && true
@@ -265,8 +279,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -317,10 +332,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb -------------------- # -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install mongodb \ && pecl install mongodb-1.7.5 \
# Enabling # Enabling
&& docker-php-ext-enable mongodb \ && docker-php-ext-enable mongodb \
&& true && true
@@ -591,15 +606,26 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid-1.0.5 \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -639,6 +665,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-1.3.2 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -696,6 +733,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -703,8 +742,9 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
@@ -729,8 +769,10 @@ RUN set -eux \
libwebp6 \ libwebp6 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -741,6 +783,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -916,6 +969,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -930,11 +985,20 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -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 -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,51 +6,69 @@ FROM devilbox/php-fpm:7.0-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
fftw-dev \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libenchant-dev \ libenchant-dev \
libevent-dev \ libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \ libfbclient2 \
libfftw3-dev \
libfreetype6-dev \ libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \ libgmp-dev \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \ libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \ libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
libpcre3-dev \ libpcre3-dev \
libpng-dev \ libpng-dev \
libpoppler-glib-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \ librabbitmq-dev \
librdkafka-dev \ librdkafka-dev \
librecode-dev \ librecode-dev \
librsvg2-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libssh2-1-dev \ libssh2-1-dev \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libtool \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux2 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \ unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -178,7 +196,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --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 \ && docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -221,6 +239,17 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true && true
@@ -267,8 +296,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -286,10 +316,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache -------------------- # -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install memcache \ && pecl install memcache-4.0.5.2 \
# Enabling # Enabling
&& docker-php-ext-enable memcache \ && docker-php-ext-enable memcache \
&& true && true
@@ -308,10 +338,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb -------------------- # -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install mongodb \ && pecl install mongodb-1.9.2 \
# Enabling # Enabling
&& docker-php-ext-enable mongodb \ && docker-php-ext-enable mongodb \
&& true && true
@@ -466,10 +496,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr -------------------- # -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install psr \ && pecl install psr-1.1.0 \
# Enabling # Enabling
&& docker-php-ext-enable psr \ && docker-php-ext-enable psr \
&& true && true
@@ -509,9 +539,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: PECL extension # Type: GIT extension
# Default: Pecl command && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& pecl install 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} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
&& true && true
@@ -633,19 +678,45 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: vips --------------------
RUN set -eux \
# Generic pre-command
&& git clone https://github.com/libvips/libvips /tmp/libvips \
&& cd /tmp/libvips \
&& ./autogen.sh \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/libvips \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install vips \
# Enabling
&& docker-php-ext-enable vips \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -658,10 +729,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: xdebug -------------------- # -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install xdebug \ && pecl install xdebug-2.9.0 \
# Enabling # Enabling
&& docker-php-ext-enable xdebug \ && docker-php-ext-enable xdebug \
&& true && true
@@ -685,6 +756,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-2.0.4 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
# -------------------- Installing PHP Extension: zip -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -742,6 +835,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -749,35 +844,55 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
libenchant1c2a \ libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \ libfbclient2 \
libfftw3-3 \
libfreetype6 \ libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu57 \ libicu57 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagick++-6.q16-7 \
libmagick++-6.q16hdri-7 \
libmagickcore-6.q16-3 \
libmagickcore-6.q16-3-extra \
libmagickwand-6.q16-3 \ libmagickwand-6.q16-3 \
libmagickwand-6.q16hdri-3 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \ libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpoppler-glib8 \
libpq5 \ libpq5 \
librabbitmq4 \ librabbitmq4 \
librdkafka1 \ librdkafka1 \
librecode0 \ librecode0 \
librsvg2-2 \
libssh2-1 \ libssh2-1 \
libsybdb5 \ libsybdb5 \
libtidy5 \ libtidy5 \
libvpx4 \ libvpx4 \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux2 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \ unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -788,6 +903,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -967,6 +1093,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -981,11 +1111,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,51 +6,70 @@ FROM devilbox/php-fpm:7.1-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
fftw-dev \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libenchant-dev \ libenchant-dev \
libevent-dev \ libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \ libfbclient2 \
libfftw3-dev \
libfreetype6-dev \ libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \ libgmp-dev \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libimagequant-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \ libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \ libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
libpcre3-dev \ libpcre3-dev \
libpng-dev \ libpng-dev \
libpoppler-glib-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \ librabbitmq-dev \
librdkafka-dev \ librdkafka-dev \
librecode-dev \ librecode-dev \
librsvg2-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libssh2-1-dev \ libssh2-1-dev \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libtool \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \ unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -178,7 +197,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --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 \ && docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --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 # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -221,6 +240,17 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true && true
@@ -246,8 +276,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: intl -------------------- # -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true && true
@@ -266,8 +297,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true && true
@@ -285,10 +317,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache -------------------- # -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install memcache \ && pecl install memcache-4.0.5.2 \
# Enabling # Enabling
&& docker-php-ext-enable memcache \ && docker-php-ext-enable memcache \
&& true && true
@@ -307,10 +339,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb -------------------- # -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install mongodb \ && pecl install mongodb-1.11.1 \
# Enabling # Enabling
&& docker-php-ext-enable mongodb \ && docker-php-ext-enable mongodb \
&& true && true
@@ -446,10 +478,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_sqlsrv -------------------- # -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install pdo_sqlsrv \ && pecl install pdo_sqlsrv-5.6.1 \
# Enabling # Enabling
&& docker-php-ext-enable pdo_sqlsrv \ && docker-php-ext-enable pdo_sqlsrv \
&& true && true
@@ -465,10 +497,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr -------------------- # -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install psr \ && pecl install psr-1.1.0 \
# Enabling # Enabling
&& docker-php-ext-enable psr \ && docker-php-ext-enable psr \
&& true && true
@@ -508,9 +540,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: PECL extension # Type: GIT extension
# Default: Pecl command && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& pecl install 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} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
&& true && true
@@ -576,10 +623,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sqlsrv -------------------- # -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install sqlsrv \ && pecl install sqlsrv-5.6.1 \
# Enabling # Enabling
&& docker-php-ext-enable sqlsrv \ && docker-php-ext-enable sqlsrv \
&& true && true
@@ -598,10 +645,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: swoole -------------------- # -------------------- Installing PHP Extension: swoole --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Custom: Pecl command # Default: Pecl command
&& yes yes | pecl install swoole \ && pecl install swoole-4.4.26 \
# Enabling # Enabling
&& docker-php-ext-enable swoole \ && docker-php-ext-enable swoole \
&& true && true
@@ -642,19 +689,45 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress-1.1.4 \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: vips --------------------
RUN set -eux \
# Generic pre-command
&& git clone https://github.com/libvips/libvips /tmp/libvips \
&& cd /tmp/libvips \
&& ./autogen.sh \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/libvips \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install vips \
# Enabling
&& docker-php-ext-enable vips \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -667,10 +740,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: xdebug -------------------- # -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install xdebug \ && pecl install xdebug-2.9.8 \
# Enabling # Enabling
&& docker-php-ext-enable xdebug \ && docker-php-ext-enable xdebug \
&& true && true
@@ -694,6 +767,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& 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 -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -751,6 +846,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -758,36 +855,57 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
libenchant1c2a \ libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \ libfbclient2 \
libfftw3-3 \
libfreetype6 \ libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu63 \ libicu63 \
libimagequant0 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagick++-6.q16-8 \
libmagick++-6.q16hdri-8 \
libmagickcore-6.q16-6 \
libmagickcore-6.q16-6-extra \
libmagickwand-6.q16-6 \ libmagickwand-6.q16-6 \
libmagickwand-6.q16hdri-6 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \ libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpoppler-glib8 \
libpq5 \ libpq5 \
librabbitmq4 \ librabbitmq4 \
librdkafka1 \ librdkafka1 \
librecode0 \ librecode0 \
librsvg2-2 \
libssh2-1 \ libssh2-1 \
libsybdb5 \ libsybdb5 \
libtidy5deb1 \ libtidy5deb1 \
libvpx5 \ libvpx5 \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \ unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -798,6 +916,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -979,6 +1108,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -993,11 +1126,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,51 +6,70 @@ FROM devilbox/php-fpm:7.2-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
fftw-dev \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libenchant-dev \ libenchant-dev \
libevent-dev \ libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \ libfbclient2 \
libfftw3-dev \
libfreetype6-dev \ libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \ libgmp-dev \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libimagequant-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \ libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \ libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
libpcre3-dev \ libpcre3-dev \
libpng-dev \ libpng-dev \
libpoppler-glib-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \ librabbitmq-dev \
librdkafka-dev \ librdkafka-dev \
librecode-dev \ librecode-dev \
librsvg2-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libssh2-1-dev \ libssh2-1-dev \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libtool \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \ unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -178,7 +197,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ && docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr \
# Installation # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -221,6 +240,17 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true && true
@@ -246,8 +276,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: intl -------------------- # -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true && true
@@ -288,10 +319,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache -------------------- # -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install memcache \ && pecl install memcache-4.0.5.2 \
# Enabling # Enabling
&& docker-php-ext-enable memcache \ && docker-php-ext-enable memcache \
&& true && true
@@ -450,10 +481,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_sqlsrv -------------------- # -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install pdo_sqlsrv \ && pecl install pdo_sqlsrv-5.8.1 \
# Enabling # Enabling
&& docker-php-ext-enable pdo_sqlsrv \ && docker-php-ext-enable pdo_sqlsrv \
&& true && true
@@ -469,10 +500,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr -------------------- # -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install psr \ && pecl install psr-1.1.0 \
# Enabling # Enabling
&& docker-php-ext-enable psr \ && docker-php-ext-enable psr \
&& true && true
@@ -512,9 +543,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: PECL extension # Type: GIT extension
# Default: Pecl command && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& pecl install 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} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
&& true && true
@@ -580,10 +626,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sqlsrv -------------------- # -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install sqlsrv \ && pecl install sqlsrv-5.8.1 \
# Enabling # Enabling
&& docker-php-ext-enable sqlsrv \ && docker-php-ext-enable sqlsrv \
&& true && true
@@ -645,20 +691,46 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: vips --------------------
RUN set -eux \
# Generic pre-command
&& git clone https://github.com/libvips/libvips /tmp/libvips \
&& cd /tmp/libvips \
&& ./autogen.sh \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/libvips \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install vips \
# Enabling
&& docker-php-ext-enable vips \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -698,6 +770,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& 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 -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -755,6 +849,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -762,36 +858,57 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
libenchant1c2a \ libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \ libfbclient2 \
libfftw3-3 \
libfreetype6 \ libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu63 \ libicu63 \
libimagequant0 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagick++-6.q16-8 \
libmagick++-6.q16hdri-8 \
libmagickcore-6.q16-6 \
libmagickcore-6.q16-6-extra \
libmagickwand-6.q16-6 \ libmagickwand-6.q16-6 \
libmagickwand-6.q16hdri-6 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \ libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpoppler-glib8 \
libpq5 \ libpq5 \
librabbitmq4 \ librabbitmq4 \
librdkafka1 \ librdkafka1 \
librecode0 \ librecode0 \
librsvg2-2 \
libssh2-1 \ libssh2-1 \
libsybdb5 \ libsybdb5 \
libtidy5deb1 \ libtidy5deb1 \
libvpx5 \ libvpx5 \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \ unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -802,6 +919,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -985,6 +1113,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -999,11 +1131,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,51 +6,69 @@ FROM devilbox/php-fpm:7.3-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
fftw-dev \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \ libc-client-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \ libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \ libfbclient2 \
libfftw3-dev \
libfreetype6-dev \ libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \ libgmp-dev \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libimagequant-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \ libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \ libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
libpcre3-dev \ libpcre3-dev \
libpng-dev \ libpng-dev \
libpoppler-glib-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \ librabbitmq-dev \
librdkafka-dev \ librdkafka-dev \
librecode-dev \ librecode-dev \
librsvg2-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libssh2-1-dev \ libssh2-1-dev \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libtool \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \ unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -155,14 +173,6 @@ RUN set -eux \
&& true && 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 -------------------- # -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -178,7 +188,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ && docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr \
# Installation # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -221,6 +231,17 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true && true
@@ -288,10 +309,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache -------------------- # -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install memcache \ && pecl install memcache-4.0.5.2 \
# Enabling # Enabling
&& docker-php-ext-enable memcache \ && docker-php-ext-enable memcache \
&& true && true
@@ -450,10 +471,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_sqlsrv -------------------- # -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install pdo_sqlsrv \ && pecl install pdo_sqlsrv-5.9.0 \
# Enabling # Enabling
&& docker-php-ext-enable pdo_sqlsrv \ && docker-php-ext-enable pdo_sqlsrv \
&& true && true
@@ -512,9 +533,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: PECL extension # Type: GIT extension
# Default: Pecl command && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& pecl install 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} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
&& true && true
@@ -580,10 +616,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sqlsrv -------------------- # -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install sqlsrv \ && pecl install sqlsrv-5.9.0 \
# Enabling # Enabling
&& docker-php-ext-enable sqlsrv \ && docker-php-ext-enable sqlsrv \
&& true && true
@@ -645,20 +681,46 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: vips --------------------
RUN set -eux \
# Generic pre-command
&& git clone https://github.com/libvips/libvips /tmp/libvips \
&& cd /tmp/libvips \
&& ./autogen.sh \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/libvips \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install vips \
# Enabling
&& docker-php-ext-enable vips \
&& true
# -------------------- Installing PHP Extension: wddx -------------------- # -------------------- Installing PHP Extension: wddx --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -698,6 +760,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& 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 -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -755,6 +839,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -762,36 +848,56 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libc-client2007e \ libc-client2007e \
libenchant1c2a \ libexif12 \
libexpat1 \
libfbclient2 \ libfbclient2 \
libfftw3-3 \
libfreetype6 \ libfreetype6 \
libicu63 \ libgif7 \
libglib2.0-0 \
libicu67 \
libimagequant0 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagick++-6.q16-8 \
libmagick++-6.q16hdri-8 \
libmagickcore-6.q16-6 \
libmagickcore-6.q16-6-extra \
libmagickwand-6.q16-6 \ libmagickwand-6.q16-6 \
libmagickwand-6.q16hdri-6 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \ libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpoppler-glib8 \
libpq5 \ libpq5 \
librabbitmq4 \ librabbitmq4 \
librdkafka1 \ librdkafka1 \
librecode0 \ librecode0 \
librsvg2-2 \
libssh2-1 \ libssh2-1 \
libsybdb5 \ libsybdb5 \
libtidy5deb1 \ libtidy5deb1 \
libvpx5 \ libvpx6 \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \ unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -802,6 +908,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -848,8 +965,6 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^dba$' \ && php-fpm -m | grep -oiE '^dba$' \
&& php -m | grep -oiE '^dom$' \ && php -m | grep -oiE '^dom$' \
&& php-fpm -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 -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \ && php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^fileinfo$' \ && php -m | grep -oiE '^fileinfo$' \
@@ -985,6 +1100,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \ && php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
@@ -999,11 +1118,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,48 +6,69 @@ FROM devilbox/php-fpm:7.4-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
fftw-dev \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \ libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \ libfbclient2 \
libffi-dev \ libffi-dev \
libfftw3-dev \
libfreetype6-dev \ libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \ libgmp-dev \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libimagequant-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \ libmagickwand-dev \
libmcrypt-dev \ libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \ libnghttp2-dev \
libpcre3-dev \ libpcre3-dev \
libpng-dev \ libpng-dev \
libpoppler-glib-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \ librabbitmq-dev \
librdkafka-dev \ librdkafka-dev \
librsvg2-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libssh2-1-dev \ libssh2-1-dev \
libssl-dev \ libssl-dev \
libtidy-dev \ libtidy-dev \
libtool \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -67,6 +88,23 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi 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_7.4.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp -------------------- # -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -135,14 +173,6 @@ RUN set -eux \
&& true && 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 -------------------- # -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -154,17 +184,8 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ffi -------------------- # -------------------- Installing PHP Extension: ffi --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: GIT extension # Type: Built-in extension
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ffi \
&& cd /tmp/ffi \
# Custom: Install command
&& phpize \
&& ./configure --with-ffi \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable ffi \
&& true && true
@@ -175,7 +196,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv \ && docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \
# Installation # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -218,6 +239,29 @@ RUN set -eux \
&& pecl install imagick \ && pecl install imagick \
# Enabling # Enabling
&& docker-php-ext-enable imagick \ && docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& 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 && true
@@ -243,7 +287,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt -------------------- # -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install mcrypt \ && pecl install mcrypt \
@@ -265,10 +309,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache -------------------- # -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: PECL extension # Type: PECL extension
# Default: Pecl command # Default: Pecl command
&& pecl install memcache \ && pecl install memcache-4.0.5.2 \
# Enabling # Enabling
&& docker-php-ext-enable memcache \ && docker-php-ext-enable memcache \
&& true && true
@@ -429,6 +473,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install pdo_sqlsrv \
# Enabling
&& docker-php-ext-enable pdo_sqlsrv \
&& true
# -------------------- Installing PHP Extension: pgsql -------------------- # -------------------- Installing PHP Extension: pgsql --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -473,16 +528,22 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \ && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /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 # Custom: Install command
&& phpize \ && REDIS_ARGS=""; \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ fi; \
&& ./configure --enable-redis \ if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \ && make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \ && make install \
\ \
@@ -512,10 +573,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: snmp -------------------- # -------------------- Installing PHP Extension: snmp --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Installation
&& docker-php-ext-configure snmp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true && true
@@ -548,6 +608,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install sqlsrv \
# Enabling
&& docker-php-ext-enable sqlsrv \
&& true
# -------------------- Installing PHP Extension: ssh2 -------------------- # -------------------- Installing PHP Extension: ssh2 --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -604,20 +675,46 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uuid \
# Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: vips --------------------
RUN set -eux \
# Generic pre-command
&& git clone https://github.com/libvips/libvips /tmp/libvips \
&& cd /tmp/libvips \
&& ./autogen.sh \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/libvips \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install vips \
# Enabling
&& docker-php-ext-enable vips \
&& true
# -------------------- Installing PHP Extension: xdebug -------------------- # -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -648,6 +745,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& 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 -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
@@ -706,6 +825,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -713,34 +834,56 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libenchant1c2a \ libc-client2007e \
libexif12 \
libexpat1 \
libfbclient2 \ libfbclient2 \
libffi6 \ libffi7 \
libfftw3-3 \
libfreetype6 \ libfreetype6 \
libicu63 \ libgif7 \
libglib2.0-0 \
libicu67 \
libimagequant0 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagick++-6.q16-8 \
libmagick++-6.q16hdri-8 \
libmagickcore-6.q16-6 \
libmagickcore-6.q16-6-extra \
libmagickwand-6.q16-6 \ libmagickwand-6.q16-6 \
libmagickwand-6.q16hdri-6 \
libmcrypt4 \ libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \ libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpoppler-glib8 \
libpq5 \ libpq5 \
librabbitmq4 \ librabbitmq4 \
librdkafka1 \ librdkafka1 \
librsvg2-2 \
libssh2-1 \ libssh2-1 \
libsybdb5 \ libsybdb5 \
libtidy5deb1 \ libtidy5deb1 \
libvpx5 \ libvpx6 \
libwebp-dev \ libwebp-dev \
libwebp6 \ libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -751,6 +894,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -797,8 +951,6 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^dba$' \ && php-fpm -m | grep -oiE '^dba$' \
&& php -m | grep -oiE '^dom$' \ && php -m | grep -oiE '^dom$' \
&& php-fpm -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 -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \ && php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^ffi$' \ && php -m | grep -oiE '^ffi$' \
@@ -823,6 +975,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^igbinary$' \ && php-fpm -m | grep -oiE '^igbinary$' \
&& php -m | grep -oiE '^imagick$' \ && php -m | grep -oiE '^imagick$' \
&& php-fpm -m | grep -oiE '^imagick$' \ && php-fpm -m | grep -oiE '^imagick$' \
&& php -m | grep -oiE '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \ && php -m | grep -oiE '^json$' \
@@ -873,6 +1027,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \ && php-fpm -m | grep -oiE '^pdo_pgsql$' \
&& php -m | grep -oiE '^pdo_sqlite$' \ && php -m | grep -oiE '^pdo_sqlite$' \
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \ && php-fpm -m | grep -oiE '^pdo_sqlite$' \
&& php -m | grep -oiE '^pdo_sqlsrv$' \
&& php-fpm -m | grep -oiE '^pdo_sqlsrv$' \
&& php -m | grep -oiE '^pgsql$' \ && php -m | grep -oiE '^pgsql$' \
&& php-fpm -m | grep -oiE '^pgsql$' \ && php-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \ && php -m | grep -oiE '^psr$' \
@@ -910,6 +1066,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^solr$' \ && php-fpm -m | grep -oiE '^solr$' \
&& php -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^spl$' \
&& php-fpm -m | grep -oiE '^spl$' \ && php-fpm -m | grep -oiE '^spl$' \
&& php -m | grep -oiE '^sqlsrv$' \
&& php-fpm -m | grep -oiE '^sqlsrv$' \
&& php -m | grep -oiE '^ssh2$' \ && php -m | grep -oiE '^ssh2$' \
&& php-fpm -m | grep -oiE '^ssh2$' \ && php-fpm -m | grep -oiE '^ssh2$' \
&& php -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^swoole$' \
@@ -926,6 +1084,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xdebug$' \
&& php-fpm -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \ && php -m | grep -oiE '^xml$' \
@@ -938,11 +1100,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

View File

@@ -6,15 +6,18 @@ FROM devilbox/php-fpm:8.0-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
alien \ alien \
firebird-dev \ firebird-dev \
freetds-dev \ freetds-dev \
ghostscript \
libaio-dev \ libaio-dev \
libbz2-dev \ libbz2-dev \
libenchant-dev \ libc-client-dev \
libcurl4-openssl-dev \
libenchant-2-dev \
libevent-dev \ libevent-dev \
libfbclient2 \ libfbclient2 \
libfreetype6-dev \ libfreetype6-dev \
@@ -22,11 +25,18 @@ RUN set -eux \
libib-util \ libib-util \
libicu-dev \ libicu-dev \
libjpeg-dev \ libjpeg-dev \
libkrb5-dev \
libldap2-dev \ libldap2-dev \
libmagickwand-dev \
libmcrypt-dev \
libmemcached-dev \ libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \ libpng-dev \
libpq-dev \ libpq-dev \
libpspell-dev \ libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
libsasl2-dev \ libsasl2-dev \
libsnmp-dev \ libsnmp-dev \
libsodium-dev \ libsodium-dev \
@@ -34,11 +44,15 @@ RUN set -eux \
libtidy-dev \ libtidy-dev \
libvpx-dev \ libvpx-dev \
libwebp-dev \ libwebp-dev \
libwebp6 \
libxml2-dev \ libxml2-dev \
libxpm-dev \ libxpm-dev \
libxslt-dev \ libxslt-dev \
libyaml-dev \
libzip-dev \ libzip-dev \
snmp \ snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \ zlib1g-dev \
ca-certificates \ ca-certificates \
git git
@@ -58,6 +72,28 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi fi
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Custom: Pecl command
&& echo "/usr" | pecl install amqp \
# Enabling
&& docker-php-ext-enable amqp \
&& true
# -------------------- 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 -------------------- # -------------------- Installing PHP Extension: bcmath --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -66,6 +102,20 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: blackfire --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: bz2 -------------------- # -------------------- Installing PHP Extension: bz2 --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -113,7 +163,7 @@ RUN set -eux \
# Installation: Version specific # Installation: Version specific
# Type: Built-in extension # Type: Built-in extension
# Custom: configure command # Custom: configure command
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv \ && docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \
# Installation # Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true && true
@@ -137,6 +187,51 @@ RUN set -eux \
&& true && 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: imagick --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install imagick \
# Enabling
&& docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& 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 -------------------- # -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -157,6 +252,39 @@ RUN set -eux \
&& true && 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 -------------------- # -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Version specific
@@ -181,41 +309,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb -------------------- # -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \ # Default: Pecl command
&& cd /tmp/mongodb \ && pecl install mongodb \
# Custom: Install command
&& git checkout v1.6 \
&& git submodule update --init \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \
&& sed -i'' 's/TSRMLS_SET_CTX(ctx);/\/\/TSRMLS_SET_CTX(ctx);/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' phongo_compat.h \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' src/bson.c \
\
&& sed -i'' 's/php_phongo_handler_binary.compare_objects.*//g' src/BSON/Binary.c \
&& sed -i'' 's/php_phongo_handler_dbpointer.compare_objects.*//g' src/BSON/DBPointer.c \
&& sed -i'' 's/php_phongo_handler_int64.compare_objects.*//g' src/BSON/Int64.c \
&& sed -i'' 's/php_phongo_handler_javascript.compare_objects.*//g' src/BSON/Javascript.c \
&& sed -i'' 's/php_phongo_handler_objectid.compare_objects.*//g' src/BSON/ObjectId.c \
&& sed -i'' 's/php_phongo_handler_symbol.compare_objects.*//g' src/BSON/Symbol.c \
&& sed -i'' 's/php_phongo_handler_timestamp.compare_objects.*//g' src/BSON/Timestamp.c \
&& sed -i'' 's/php_phongo_handler_regex.compare_objects.*//g' src/BSON/Regex.c \
&& sed -i'' 's/php_phongo_handler_server.compare_objects.*//g' src/MongoDB/Server.c \
&& sed -i'' 's/php_phongo_handler_utcdatetime.compare_objects.*//g' src/BSON/UTCDateTime.c \
\
&& phpize \
&& ./configure --enable-mongodb \
&& make all \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable mongodb \ && docker-php-ext-enable mongodb \
&& true && true
@@ -229,6 +326,17 @@ RUN set -eux \
&& true && 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 -------------------- # -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \ RUN set -eux \
# Generic pre-command # Generic pre-command
@@ -339,6 +447,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install pdo_sqlsrv \
# Enabling
&& docker-php-ext-enable pdo_sqlsrv \
&& true
# -------------------- Installing PHP Extension: pgsql -------------------- # -------------------- Installing PHP Extension: pgsql --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -347,6 +466,17 @@ RUN set -eux \
&& true && 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 -------------------- # -------------------- Installing PHP Extension: pspell --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -357,23 +487,22 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis -------------------- # -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \ && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /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 # Custom: Install command
&& phpize \ && REDIS_ARGS=""; \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ fi; \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0 if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \ REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \ fi; \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \ phpize \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \ && ./configure --enable-redis ${REDIS_ARGS} \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \
&& ./configure --enable-redis \
&& make -j$(getconf _NPROCESSORS_ONLN) \ && make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \ && make install \
\ \
@@ -382,6 +511,17 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: rdkafka --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install rdkafka \
# Enabling
&& docker-php-ext-enable rdkafka \
&& true
# -------------------- Installing PHP Extension: shmop -------------------- # -------------------- Installing PHP Extension: shmop --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -412,6 +552,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sockets -------------------- # -------------------- Installing PHP Extension: sockets --------------------
RUN set -eux \ RUN set -eux \
# Version specific pre-command
&& docker-php-ext-configure sockets \
&& sed -i'' 's/.*ucred.*//g' /usr/src/php/ext/sockets/sendrecvmsg.c \
\
# Installation: Generic # Installation: Generic
# Type: Built-in extension # Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
@@ -426,6 +570,39 @@ RUN set -eux \
&& true && 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: sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install sqlsrv \
# Enabling
&& docker-php-ext-enable sqlsrv \
&& true
# -------------------- Installing PHP Extension: swoole --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Custom: Pecl command
&& yes yes | pecl install swoole \
# Enabling
&& docker-php-ext-enable swoole \
&& true
# -------------------- Installing PHP Extension: sysvmsg -------------------- # -------------------- Installing PHP Extension: sysvmsg --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -460,34 +637,34 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress -------------------- # -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \ RUN set -eux \
# Installation: Version specific # Installation: Generic
# Type: GIT extension # Type: PECL extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ # Default: Pecl command
&& cd /tmp/uploadprogress \ && pecl install uploadprogress \
# Custom: Install command
&& true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' || true \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' || true \
&& phpize \
&& ./configure --enable-uploadprogress \
&& make \
&& make install \
\
# Enabling # Enabling
&& docker-php-ext-enable uploadprogress \ && docker-php-ext-enable uploadprogress \
&& true && true
# -------------------- Installing PHP Extension: xmlrpc -------------------- # -------------------- Installing PHP Extension: uuid --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
# Type: Built-in extension # Type: PECL extension
# Custom: configure command # Default: Pecl command
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && pecl install uuid \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ # Enabling
&& docker-php-ext-enable uuid \
&& true
# -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xdebug \
# Enabling
&& docker-php-ext-enable xdebug \
&& true && true
@@ -499,6 +676,28 @@ RUN set -eux \
&& true && true
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& 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 -------------------- # -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \ RUN set -eux \
# Installation: Generic # Installation: Generic
@@ -556,6 +755,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -563,27 +764,38 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \ libaio1 \
libaspell15 \ libaspell15 \
libenchant1c2a \ libc-client2007e \
libenchant-2-2 \
libfbclient2 \ libfbclient2 \
libffi6 \ libffi7 \
libfreetype6 \ libfreetype6 \
libicu63 \ libicu67 \
libjpeg62-turbo \ libjpeg62-turbo \
libmagickwand-6.q16-6 \
libmcrypt4 \
libmemcachedutil2 \ libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \ libpng16-16 \
libpq5 \ libpq5 \
librabbitmq4 \
librdkafka1 \
libsybdb5 \ libsybdb5 \
libtidy5deb1 \ libtidy5deb1 \
libvpx5 \ libvpx6 \
libwebp-dev \
libwebp6 \ libwebp6 \
libxpm4 \ libxpm4 \
libxslt1.1 \ libxslt1.1 \
libyaml-0-2 \
libzip4 \ libzip4 \
snmp \ snmp \
unixodbc \
uuid \
ca-certificates \ ca-certificates \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
@@ -594,6 +806,17 @@ RUN set -eux \
### Post Install ### Post Install
### ###
RUN set -eux \ RUN set -eux \
# ---------- imagick ----------
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- oci8 ---------- # ---------- 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_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_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -622,6 +845,10 @@ RUN set -eux \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini \ && rm -f /usr/local/etc/php/php.ini \
\ \
&& php -m | grep -oiE '^amqp$' \
&& php-fpm -m | grep -oiE '^amqp$' \
&& php -m | grep -oiE '^apcu$' \
&& php-fpm -m | grep -oiE '^apcu$' \
&& php -m | grep -oiE '^bcmath$' \ && php -m | grep -oiE '^bcmath$' \
&& php-fpm -m | grep -oiE '^bcmath$' \ && php-fpm -m | grep -oiE '^bcmath$' \
&& php -m | grep -oiE '^bz2$' \ && php -m | grep -oiE '^bz2$' \
@@ -658,6 +885,12 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^hash$' \ && php-fpm -m | grep -oiE '^hash$' \
&& php -m | grep -oiE '^iconv$' \ && php -m | grep -oiE '^iconv$' \
&& php-fpm -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 '^imagick$' \
&& php-fpm -m | grep -oiE '^imagick$' \
&& php -m | grep -oiE '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \ && php -m | grep -oiE '^json$' \
@@ -668,6 +901,12 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^libxml$' \ && php-fpm -m | grep -oiE '^libxml$' \
&& php -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mbstring$' \
&& php-fpm -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 -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \ && php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mongodb$' \ && php -m | grep -oiE '^mongodb$' \
@@ -676,6 +915,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \
&& php -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^mysqlnd$' \
&& php-fpm -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 -m | grep -oiE '^oci8$' \
&& php-fpm -m | grep -oiE '^oci8$' \ && php-fpm -m | grep -oiE '^oci8$' \
&& php -m | grep -oiE '^Zend Opcache$' \ && php -m | grep -oiE '^Zend Opcache$' \
@@ -700,8 +941,12 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \ && php-fpm -m | grep -oiE '^pdo_pgsql$' \
&& php -m | grep -oiE '^pdo_sqlite$' \ && php -m | grep -oiE '^pdo_sqlite$' \
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \ && php-fpm -m | grep -oiE '^pdo_sqlite$' \
&& php -m | grep -oiE '^pdo_sqlsrv$' \
&& php-fpm -m | grep -oiE '^pdo_sqlsrv$' \
&& php -m | grep -oiE '^pgsql$' \ && php -m | grep -oiE '^pgsql$' \
&& php-fpm -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 -m | grep -oiE '^phar$' \
&& php-fpm -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \
&& php -m | grep -oiE '^posix$' \ && php -m | grep -oiE '^posix$' \
@@ -713,6 +958,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^redis$' \ && php-fpm -m | grep -oiE '^redis$' \
&& php -m | grep -oiE '^reflection$' \ && php -m | grep -oiE '^reflection$' \
&& php-fpm -m | grep -oiE '^reflection$' \ && php-fpm -m | grep -oiE '^reflection$' \
&& php -m | grep -oiE '^rdkafka$' \
&& php-fpm -m | grep -oiE '^rdkafka$' \
&& php -m | grep -oiE '^session$' \ && php -m | grep -oiE '^session$' \
&& php-fpm -m | grep -oiE '^session$' \ && php-fpm -m | grep -oiE '^session$' \
&& php -m | grep -oiE '^shmop$' \ && php -m | grep -oiE '^shmop$' \
@@ -727,8 +974,14 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \
&& php -m | grep -oiE '^sodium$' \ && php -m | grep -oiE '^sodium$' \
&& php-fpm -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 -m | grep -oiE '^spl$' \
&& php-fpm -m | grep -oiE '^spl$' \ && php-fpm -m | grep -oiE '^spl$' \
&& php -m | grep -oiE '^sqlsrv$' \
&& php-fpm -m | grep -oiE '^sqlsrv$' \
&& php -m | grep -oiE '^swoole$' \
&& php-fpm -m | grep -oiE '^swoole$' \
&& php -m | grep -oiE '^sysvmsg$' \ && php -m | grep -oiE '^sysvmsg$' \
&& php-fpm -m | grep -oiE '^sysvmsg$' \ && php-fpm -m | grep -oiE '^sysvmsg$' \
&& php -m | grep -oiE '^sysvsem$' \ && php -m | grep -oiE '^sysvsem$' \
@@ -741,21 +994,34 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \ && php-fpm -m | grep -oiE '^tokenizer$' \
&& php -m | grep -oiE '^uploadprogress$' \ && php -m | grep -oiE '^uploadprogress$' \
&& php-fpm -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \
&& php -m | grep -oiE '^uuid$' \
&& php-fpm -m | grep -oiE '^uuid$' \
&& php -m | grep -oiE '^xdebug$' \
&& php-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \ && php -m | grep -oiE '^xml$' \
&& php-fpm -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \
&& php -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlreader$' \
&& php-fpm -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \
&& php -m | grep -oiE '^xmlrpc$' \
&& php-fpm -m | grep -oiE '^xmlrpc$' \
&& php -m | grep -oiE '^xmlwriter$' \ && php -m | grep -oiE '^xmlwriter$' \
&& php-fpm -m | grep -oiE '^xmlwriter$' \ && php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \ && php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^xlswriter$' \
&& php-fpm -m | grep -oiE '^xlswriter$' \
&& php -m | grep -oiE '^yaml$' \
&& php-fpm -m | grep -oiE '^yaml$' \
&& php -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^zip$' \
&& php-fpm -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \
&& true && 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 ### Ports
### ###

File diff suppressed because it is too large Load Diff

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

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 -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
cron \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -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,84 @@ set_postfix() {
local debug="${7}" local debug="${7}"
local php_ini_file="${php_ini_dir}/devilbox-runtime-sendmail.ini" 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 if ! env_set "${env_varname}"; then
log "info" "\$${env_varname} not set." "${debug}" log "info" "\$${env_varname} not set." "${debug}"
log "info" "Postfix will not be started." "${debug}" log "info" "Postfix will not be started." "${debug}"
echo "" > "${php_ini_file}" echo "" > "${php_ini_file}"
else return
catch_all="$( env_get "${env_varname}" )" fi
if [ "${catch_all}" = "1" ]; then
log "info" "\$${env_varname} set to 1. Enabling postfix catch-all" "${debug}"
# Configure PHP # Retrieve env value
{ enable_mail="$( env_get "${env_varname}" )"
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}"
# PHP mail function logs to file # Enable postfix
if [ "${docker_logs}" != "1" ]; then if [ "${enable_mail}" = "1" ] || [ "${enable_mail}" = "2" ]; then
# Fix PHP mail log file dir/file and permissions
if [ ! -d "$( dirname "${php_mail_log}" )" ]; then if [ "${enable_mail}" = "1" ]; then
run "mkdir -p $( dirname "${php_mail_log}" )" "${debug}" log "info" "\$${env_varname} set to 1. Enabling postfix" "${debug}"
fi else
if [ ! -f "${php_mail_log}" ]; then log "info" "\$${env_varname} set to 2. Enabling postfix catch-all" "${debug}"
run "touch ${php_mail_log}" "${debug}" fi
fi
run "chown ${username}:${groupname} $( dirname "${php_mail_log}" )" "${debug}" # Configure PHP
run "chown ${username}:${groupname} ${php_mail_log}" "${debug}" {
run "chmod 0644 ${php_mail_log}" "${debug}" 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 fi
if [ ! -f "${php_mail_log}" ]; then
# Add Mail dir/file if it does not exist run "touch ${php_mail_log}" "${debug}"
if [ ! -d "/var/mail" ]; then
run "mkdir /var/mail" "${debug}"
fi
if [ ! -f "/var/mail/${username}" ]; then
run "touch /var/mail/${username}" "${debug}"
fi 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 # Add Mail dir/file if it does not exist
run "chmod 0644 /var/mail/${username}" "${debug}" if [ ! -d "/var/mail" ]; then
run "chown ${username}:${groupname} /var/mail" "${debug}" run "mkdir /var/mail" "${debug}"
run "chown ${username}:${groupname} /var/mail/${username}" "${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 # Fix mail dir/file permissions after mount
run "postconf -e 'strict_mailbox_ownership=no'" "${debug}" run "chmod 0644 /var/mail/${username}" "${debug}"
run "chown ${username}:${groupname} /var/mail" "${debug}"
run "chown ${username}:${groupname} /var/mail/${username}" "${debug}"
# Postfix configuration # warning: specify "strict_mailbox_ownership = no" to ignore mailbox ownership mismatch
run "postconf -e 'inet_protocols=ipv4'" "${debug}" 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 'myhostname=localhost'" "${debug}"
run "postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'" "${debug}" run "postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'" "${debug}"
run "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}" run "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}"
run "newaliases" "${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 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 fi
} }

View File

@@ -33,7 +33,7 @@ disable_modules() {
mod="$( echo "${mod}" | xargs )" # trim mod="$( echo "${mod}" | xargs )" # trim
# Find all config files that enable that module # 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 if [ -n "${files}" ]; then
while read -r f; do while read -r f; do

View File

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

View File

@@ -24,9 +24,6 @@ DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
# php-fpm conf.d directory # php-fpm conf.d directory
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d" 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 # This file holds error and access log definitions
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf" 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" 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 # PHP-FPM log dir
DVL_FPM_LOG_DIR="/var/log/php" 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) # Custom ini dir (to be copied to actual ini dir)
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d" DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
@@ -138,7 +138,7 @@ done
### ###
### Supervisor: rsyslogd & postfix ### 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 "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}" supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
fi fi

View File

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

View File

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

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,28 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && 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 \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 - \ && curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb https://apt-archive.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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +121,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -116,7 +136,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -135,7 +155,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -173,25 +193,25 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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 -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -220,21 +240,21 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -321,6 +341,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -339,6 +365,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -353,18 +380,15 @@ RUN set -eux \
# -------------------- mixlib_config -------------------- # -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \ && gem install mixlib-config -v 2.2.4 \
\ \
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify -------------------- # -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -380,13 +404,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -403,7 +427,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -439,39 +466,40 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -482,6 +510,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,28 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && 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 \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 - \ && curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb https://apt-archive.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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +121,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -116,7 +136,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -129,7 +149,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -138,7 +163,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -175,7 +200,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -190,25 +215,25 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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 -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -249,31 +274,37 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -282,7 +313,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- 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 \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -328,11 +359,11 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -371,6 +402,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -389,6 +426,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -403,18 +441,15 @@ RUN set -eux \
# -------------------- mixlib_config -------------------- # -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \ && gem install mixlib-config -v 2.2.4 \
\ \
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify -------------------- # -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -430,13 +465,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -453,7 +488,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -489,46 +527,48 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -539,6 +579,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,28 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && 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 \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 - \ && curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb https://apt-archive.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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +121,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -116,7 +136,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -129,7 +149,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -138,7 +163,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -170,7 +195,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -179,7 +204,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -193,7 +218,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -208,36 +233,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \ && git checkout v1.3.7 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -278,35 +303,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -315,7 +347,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -361,11 +393,11 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -404,6 +436,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -422,6 +460,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -436,18 +475,15 @@ RUN set -eux \
# -------------------- mixlib_config -------------------- # -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \ && gem install mixlib-config -v 2.2.4 \
\ \
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify -------------------- # -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -463,13 +499,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -486,7 +522,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -522,50 +561,52 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -576,6 +617,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,28 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && 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 \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 - \ && curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb https://apt-archive.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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +121,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -116,7 +136,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -129,7 +149,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -138,7 +163,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -170,7 +195,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -179,7 +204,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -193,7 +218,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -202,7 +227,8 @@ RUN set -eux \
\ \
\ \
# -------------------- drupalconsole -------------------- # -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && 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 \ && chmod +x /usr/local/bin/drupal \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -212,36 +238,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -283,35 +309,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -320,7 +353,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -366,23 +399,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -421,6 +454,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -439,6 +478,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -453,18 +493,15 @@ RUN set -eux \
# -------------------- mixlib_config -------------------- # -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \ && gem install mixlib-config -v 2.2.4 \
\ \
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify -------------------- # -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -480,13 +517,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -503,7 +540,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -539,54 +579,56 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -597,6 +639,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && 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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,8 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,7 +151,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -137,7 +165,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -169,7 +197,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +206,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +220,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -206,7 +234,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/docs \
@@ -215,7 +243,8 @@ RUN set -eux \
\ \
\ \
# -------------------- drupalconsole -------------------- # -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && 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 \ && chmod +x /usr/local/bin/drupal \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -225,36 +254,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -296,35 +325,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -333,7 +369,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -379,23 +415,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -434,6 +470,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -452,6 +494,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -472,12 +515,6 @@ RUN set -eux \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -493,13 +530,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -516,7 +553,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -552,55 +592,57 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -611,6 +653,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && 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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mysql-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,8 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,7 +151,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -137,7 +165,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -169,7 +197,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +206,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +220,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -200,24 +228,6 @@ RUN set -eux \
&& rm -rf /usr/local/src/drush8/misc \ && 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 \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
@@ -225,36 +235,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -296,35 +306,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -333,7 +350,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -379,23 +396,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -434,6 +451,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -452,6 +475,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -472,12 +496,6 @@ RUN set -eux \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -493,13 +511,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -516,7 +534,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -552,55 +573,55 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -611,6 +632,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && 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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mariadb-client \ mariadb-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,7 +150,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -137,7 +164,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -169,7 +196,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +205,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +219,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -200,24 +227,6 @@ RUN set -eux \
&& rm -rf /usr/local/src/drush8/misc \ && 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 \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
@@ -225,36 +234,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \ && git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -296,35 +305,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -333,7 +349,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -379,23 +395,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -434,6 +450,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -452,6 +474,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -470,13 +493,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl -v 0.5.0 \
\
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\ \
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
@@ -493,13 +510,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -516,7 +533,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -552,55 +572,55 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -611,6 +631,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && 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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mariadb-client \ mariadb-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,7 +150,12 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -137,7 +164,7 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && 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 --------------------
@@ -169,7 +196,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +205,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +219,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -206,7 +233,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/docs \
@@ -215,7 +242,8 @@ RUN set -eux \
\ \
\ \
# -------------------- drupalconsole -------------------- # -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && 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 \ && chmod +x /usr/local/bin/drupal \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -225,36 +253,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /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 \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -286,7 +314,7 @@ RUN set -eux \
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
&& composer install \ && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
@@ -297,35 +325,42 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -334,7 +369,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -380,23 +415,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -435,6 +470,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -453,6 +494,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -471,13 +513,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl -v 0.5.0 \
\
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\ \
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
@@ -494,13 +530,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -517,7 +553,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -553,55 +592,57 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -612,6 +653,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mariadb-client \ mariadb-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,16 +150,22 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython3-dev \
python3-distutils \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\ \
\ \
# -------------------- nvm -------------------- # -------------------- nvm --------------------
@@ -169,7 +197,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +206,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +220,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -206,7 +234,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/docs \
@@ -215,7 +243,8 @@ RUN set -eux \
\ \
\ \
# -------------------- drupalconsole -------------------- # -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && 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 \ && chmod +x /usr/local/bin/drupal \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -225,36 +254,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -282,36 +311,57 @@ RUN set -eux \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
\ \
# -------------------- 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 -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer -------------------- # -------------------- 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 \ && curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
\ \
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -320,7 +370,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -366,23 +416,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -421,6 +471,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -439,6 +495,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -457,13 +514,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
\ \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl -v 0.5.0 \
\
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\ \
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
@@ -480,13 +531,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -503,7 +554,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -539,54 +593,57 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.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+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\ \
# -------------------- Composer -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -597,6 +654,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mariadb-client \ mariadb-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,16 +150,22 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython3-dev \
python3-distutils \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\ \
\ \
# -------------------- nvm -------------------- # -------------------- nvm --------------------
@@ -169,7 +197,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- drush7 -------------------- # -------------------- drush7 --------------------
@@ -178,7 +206,7 @@ RUN set -eux \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ && 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 \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/docs \
@@ -192,7 +220,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/docs \
@@ -206,7 +234,7 @@ RUN set -eux \
&& 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' ) \ && 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 \ && 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 \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/docs \
@@ -215,7 +243,8 @@ RUN set -eux \
\ \
\ \
# -------------------- drupalconsole -------------------- # -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && 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 \ && chmod +x /usr/local/bin/drupal \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -225,36 +254,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- laravel -------------------- # -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && 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' \ && 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 \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \ && ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\ \
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -282,31 +311,57 @@ RUN set -eux \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
\ \
# -------------------- 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 -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer --------------------
&& curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v3.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& curl -sS -k -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 -------------------- # -------------------- phpunit --------------------
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && curl -sS -k -L --fail https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
\ \
# -------------------- symfony -------------------- # -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -315,7 +370,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -361,23 +416,23 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- asgardcms -------------------- # -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ && 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 -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
\ \
# -------------------- codeception -------------------- # -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/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 -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\ \
# -------------------- lumen -------------------- # -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
\ \
# -------------------- photon -------------------- # -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \ && 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/ \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\ \
# -------------------- prestissimo -------------------- # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ && COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 global require hirak/prestissimo \
\ \
\ \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -416,6 +471,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -434,6 +495,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -454,12 +516,6 @@ RUN set -eux \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -475,13 +531,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -498,7 +554,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -534,53 +593,57 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \ && drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ && drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.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 -------------------- # -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && 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]+$' \ && 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]+$' \ && lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \ && photon --version | grep -E 'Installer [0-9][.0-9]+' \
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -591,6 +654,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,27 +45,30 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\ \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && 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" | 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 \ && 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 \ && 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 \ && 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 \ && 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 \ && 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | 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 \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-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 -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 \ && 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 update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -62,6 +78,7 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
certbot \
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -73,6 +90,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -83,11 +101,14 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mariadb-client \ mariadb-client \
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -101,6 +122,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -115,7 +137,7 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -128,16 +150,22 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- composer -------------------- # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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 -------------------- # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython3-dev \
python3-distutils \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\ \
\ \
# -------------------- nvm -------------------- # -------------------- nvm --------------------
@@ -169,7 +197,7 @@ RUN set -eux \
\ \
\ \
# -------------------- deployer -------------------- # -------------------- deployer --------------------
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS -k -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
\ \
# -------------------- gitflow -------------------- # -------------------- gitflow --------------------
@@ -179,25 +207,36 @@ RUN set -eux \
&& cd / && rm -rf /tmp/gitflow \ && 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' \
\
\
# -------------------- 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
\
# -------------------- linkcheck -------------------- # -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /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 -------------------- # -------------------- mhsendmail --------------------
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ && 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 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
@@ -226,25 +265,37 @@ RUN set -eux \
\ \
\ \
# -------------------- phpcs -------------------- # -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
\ \
# -------------------- phpcbf -------------------- # -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
\ \
# -------------------- php-cs-fixer --------------------
&& curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v3.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& curl -sS -k -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 --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/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 \ && chmod +x /usr/local/bin/symfony \
\ \
# -------------------- wkhtmltopdf -------------------- # -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 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 \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
\ \
@@ -253,7 +304,7 @@ RUN set -eux \
\ \
\ \
# -------------------- wpcli -------------------- # -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
\ \
# -------------------- cleanup -------------------- # -------------------- cleanup --------------------
@@ -335,6 +386,12 @@ RUN set -eux \
# -------------------- mdlint -------------------- # -------------------- mdlint --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ && 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 -------------------- # -------------------- vue_cli --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \
\ \
@@ -353,6 +410,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -373,12 +431,6 @@ RUN set -eux \
# -------------------- mdl -------------------- # -------------------- mdl --------------------
&& gem install mdl -v 0.5.0 \ && gem install mdl -v 0.5.0 \
\ \
# -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \
\
\ \
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
@@ -394,13 +446,13 @@ RUN set -eux \
### ###
RUN set -eux \ RUN set -eux \
# -------------------- ansible -------------------- # -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \ && pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
\ \
# -------------------- yamllint -------------------- # -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \ && pip install --no-cache-dir --force-reinstall yamllint || true \
\ \
# -------------------- yq -------------------- # -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \ && pip install --no-cache-dir --force-reinstall yq || true \
\ \
\ \
&& rm -rf /root/.cache/pip \ && rm -rf /root/.cache/pip \
@@ -417,7 +469,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -453,43 +508,47 @@ RUN set -eux \
RUN set -eux \ RUN set -eux \
# -------------------- Software -------------------- # -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && 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]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& wp --allow-root --version | grep -E '[.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 -------------------- # -------------------- Composer --------------------
\ \
# -------------------- PIP -------------------- # -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\ \
# -------------------- NPM -------------------- # -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[0-9][.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[0-9][.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \ && gulp --version | grep -E '[0-9][.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \ && jsonlint --version | grep -E '[0-9][.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \ && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[0-9][.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[0-9][.0-9]+' \
&& webpack --version | grep -E '[.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 -------------------- # -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[0-9][.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -500,6 +559,13 @@ RUN set -eux \
&& (rm -rf /tmp/.* || true) && (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 files
### ###

View File

@@ -0,0 +1,605 @@
# 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 -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 \
&& 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" | 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 -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -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 \
sqlite3 \
subversion \
sudo \
tig \
tree \
unzip \
vim \
w3m \
wget \
whois \
xz-utils \
yarn \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -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 \
libpython3-dev \
python3-distutils \
&& 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/get-pip.py | python3 \
\
\
# -------------------- 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 -k -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' \
\
\
# -------------------- 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
\
&& 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 \
\
\
# -------------------- 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 \
&& chmod +x /usr/local/bin/phpcs \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf \
&& chmod +x /usr/local/bin/phpcbf \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -k -L --fail https://cs.symfony.com/download/php-cs-fixer-v3.phar > /usr/local/bin/php-cs-fixer \
&& chmod +x /usr/local/bin/php-cs-fixer \
\
\
# -------------------- phpmd --------------------
&& curl -sS -k -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}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
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]+' \
&& 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]+' \
&& 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+' \
&& 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

@@ -24,9 +24,6 @@ DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
# php-fpm conf.d directory # php-fpm conf.d directory
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d" 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 # This file holds error and access log definitions
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf" 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" 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 # PHP-FPM log dir
DVL_FPM_LOG_DIR="/var/log/php" 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) # Custom ini dir (to be copied to actual ini dir)
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d" DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
@@ -138,7 +138,7 @@ done
### ###
### Supervisor: rsyslogd & postfix ### 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 "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}" supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
fi fi

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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 # Allow devilbox user to do anything without password
%devilbox ALL=(ALL) NOPASSWD: ALL %devilbox ALL=(ALL) NOPASSWD: ALL

139
Makefile
View File

@@ -7,6 +7,8 @@ endif
# Docker configuration # Docker configuration
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
DIR = Dockerfiles DIR = Dockerfiles
IMAGE = devilbox/php-fpm IMAGE = devilbox/php-fpm
NO_CACHE = NO_CACHE =
@@ -15,6 +17,11 @@ PHP_EXT_DIR =
# Run checks after each module has been installed (slow, but yields errors faster) # Run checks after each module has been installed (slow, but yields errors faster)
FAIL_FAST = False FAIL_FAST = False
# File lint
FL_VERSION = 0.3
FL_IGNORES = .git/,.github/
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# DEFAULT TARGET # DEFAULT TARGET
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@@ -31,6 +38,8 @@ help:
@echo "Targets" @echo "Targets"
@echo "--------------------------------------------------------------------------------" @echo "--------------------------------------------------------------------------------"
@echo @echo
@echo "lint Lint project files and repository"
@echo
@echo "gen-readme [VERSION=] Update README with PHP modules from built images." @echo "gen-readme [VERSION=] Update README with PHP modules from built images."
@echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates." @echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates."
@echo @echo
@@ -54,7 +63,7 @@ help:
@echo "--------------------------------------------------------------------------------" @echo "--------------------------------------------------------------------------------"
@echo @echo
@echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0'," @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'." @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 " For gen-readme target it is optional and if not"
@echo " specified, it will generate for all versions." @echo " specified, it will generate for all versions."
@echo @echo
@@ -67,21 +76,86 @@ help:
@echo "ARGS Can be added to all build-* and rebuild-* targets" @echo "ARGS Can be added to all build-* and rebuild-* targets"
@echo " to supply additional docker build options." @echo " to supply additional docker build options."
# -------------------------------------------------------------------------------------------------
# Lint Targets
# -------------------------------------------------------------------------------------------------
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
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# GENERATE TARGETS # GENERATE TARGETS
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
gen-readme: gen-readme:
ifeq ($(strip $(VERSION)),) ifeq ($(strip $(VERSION)),)
@echo "Generate README.md for all PHP versions"
cd build; ./gen-readme.sh cd build; ./gen-readme.sh
else else
@echo "Generate README.md for PHP $(VERSION)"
@$(MAKE) --no-print-directory _check-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=base
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods @$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods
cd build; ./gen-readme.sh ${VERSION} cd build; ./gen-readme.sh $(VERSION)
endif endif
gen-dockerfiles: gen-dockerfiles:
docker run --rm \ docker run --rm \
$$(tty -s && echo "-it" || echo) \ $$(tty -s && echo "-it" || echo) \
@@ -90,8 +164,8 @@ gen-dockerfiles:
-e MY_GID=$$(id -g) \ -e MY_GID=$$(id -g) \
-v ${PWD}:/data \ -v ${PWD}:/data \
-w /data/build/ansible \ -w /data/build/ansible \
cytopia/ansible:2.6-tools ansible-playbook generate.yml \ cytopia/ansible:2.8-tools ansible-playbook generate.yml \
-e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.6/site-packages/ansible_mitogen/plugins/strategy \ -e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.8/site-packages/ansible_mitogen/plugins/strategy \
-e ANSIBLE_STRATEGY=mitogen_linear \ -e ANSIBLE_STRATEGY=mitogen_linear \
-e ansible_python_interpreter=/usr/bin/python3 \ -e ansible_python_interpreter=/usr/bin/python3 \
-e \"{build_fail_fast: $(FAIL_FAST)}\" \ -e \"{build_fail_fast: $(FAIL_FAST)}\" \
@@ -178,6 +252,7 @@ build-work:
# REBUILD TARGETS # REBUILD TARGETS
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
rebuild-base: _pull-base-image
rebuild-base: NO_CACHE=--no-cache rebuild-base: NO_CACHE=--no-cache
rebuild-base: build-base rebuild-base: build-base
@@ -226,6 +301,52 @@ test-work: _check-version
./tests/test.sh ${VERSION} work ./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)
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# HELPER TARGETS # HELPER TARGETS
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@@ -259,7 +380,9 @@ ifeq ($(VERSION),7.4)
else else
ifeq ($(VERSION),8.0) ifeq ($(VERSION),8.0)
else 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' or '8.0') 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 ) @$(info )
@$(error Exiting) @$(error Exiting)
endif endif
@@ -273,6 +396,8 @@ endif
endif endif
endif endif
endif endif
endif
@echo "Version $(VERSION) is valid"
_check-image-exists: _check-image-exists:
@@ -285,6 +410,6 @@ _check-image-exists:
fi; fi;
_pull-root-image: _pull-base-image:
@echo "Pulling root image for PHP ${VERSION}" @echo "Pulling root image for PHP ${VERSION}"
@docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';) @docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';)

115
README.md
View File

@@ -1,9 +1,8 @@
# PHP-FPM Docker images # PHP-FPM Docker images
[![Linting](https://github.com/devilbox/docker-php-fpm/workflows/Linting/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=Linting) [![lint](https://github.com/devilbox/docker-php-fpm/workflows/lint/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=lint)
[![CI](https://github.com/devilbox/docker-php-fpm/workflows/PHP-CI/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-CI) [![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/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly) [![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases) [![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) [![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) [![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group)
@@ -25,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 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 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.0](https://github.com/devilbox/docker-php-fpm-8.0)
* [PHP-FPM 8.1](https://github.com/devilbox/docker-php-fpm-8.1)
#### Documentation #### Documentation
@@ -113,7 +113,7 @@ One main problem with a running Docker container is to **synchronize the ownersh
#### Unsynchronized permissions #### 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 ```shell
[Host] | [Container] [Host] | [Container]
@@ -221,7 +221,7 @@ The following table shows a more complete overview about the offered Docker imag
<tbody> <tbody>
<tr> <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><code>devilbox/php-fpm:5.2-base</code></td>
<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> <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>
@@ -297,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> <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> </td>
</tr> </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> <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><code>devilbox/php-fpm:5.2-mods</code></td>
<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> <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>
@@ -376,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> <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> </td>
</tr> </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> <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><code>devilbox/php-fpm:5.2-prod</code></td>
<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> <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>
@@ -455,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> <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> </td>
</tr> </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> <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><code>devilbox/php-fpm:5.2-work</code></td>
<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> <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>
@@ -534,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> <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> </td>
</tr> </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> </tbody>
</table> </table>
@@ -607,52 +635,57 @@ Check out this table to see which Docker image provides what PHP modules.
<tr> <tr>
<th>5.3</th> <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-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, 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, 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, uuid, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.4</th> <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-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, 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, 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, uuid, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.5</th> <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-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, 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, 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, uuid, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.6</th> <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-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, 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, 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, uuid, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.0</th> <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-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, 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, 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, uuid, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.1</th> <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-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, 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, 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, uuid, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.2</th> <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-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, 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, 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, uuid, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.3</th> <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-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">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, 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, 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, uuid, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.4</th> <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-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">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, 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, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, 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, 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, uuid, vips, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>8.0</th> <th>8.0</th>
<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-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">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, 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, 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-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, 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, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, uuid, 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">amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, mbstring, 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, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, uuid, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -674,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.3-base
docker pull devilbox/php-fpm:7.4-base docker pull devilbox/php-fpm:7.4-base
docker pull devilbox/php-fpm:8.0-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> 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>
@@ -691,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.3-mods
docker pull devilbox/php-fpm:7.4-mods docker pull devilbox/php-fpm:7.4-mods
docker pull devilbox/php-fpm:8.0-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> 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>
@@ -708,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.3-prod
docker pull devilbox/php-fpm:7.4-prod docker pull devilbox/php-fpm:7.4-prod
docker pull devilbox/php-fpm:8.0-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. Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting.
@@ -725,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.3-work
docker pull devilbox/php-fpm:7.4-work docker pull devilbox/php-fpm:7.4-work
docker pull devilbox/php-fpm:8.0-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. 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.
@@ -786,7 +823,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MODULES</code></td> <td><code>ENABLE_MODULES</code></td>
<td>string</td> <td>string</td>
<td><code>''</code></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>
<tr> <tr>
<td><code>DISABLE_MODULES</code></td> <td><code>DISABLE_MODULES</code></td>
@@ -798,7 +835,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MAIL</code></td> <td><code>ENABLE_MAIL</code></td>
<td>bool</td> <td>bool</td>
<td><code>0</code></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>
<tr> <tr>
<td><code>FORWARD_PORTS_TO_LOCALHOST</code></td> <td><code>FORWARD_PORTS_TO_LOCALHOST</code></td>
@@ -845,7 +882,7 @@ Have a look at the following table to see all offered volumes for each Docker im
</thead> </thead>
<tbody> <tbody>
<tr> <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><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> <td>Mount this directory into your host computer and add custom <code>\*.ini</code> files in order to alter php behaviour.</td>
</tr> </tr>
@@ -871,7 +908,11 @@ Have a look at the following table to see all offered volumes for each Docker im
</tr> </tr>
<tr> <tr>
<td><code>/var/mail</code></td> <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>
<tr> <tr>
<td colspan="3"></td> <td colspan="3"></td>
@@ -936,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. 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 #### What tools can you expect
@@ -1000,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><a href="https://gruntjs.com/">grunt</a></td>
<td>Grunt command line JS tool.</td> <td>Grunt command line JS tool.</td>
</tr> </tr>
<tr>
<td><a href="https://brew.sh/">Homebrew</a></td>
<td>The Missing Package Manager for macOS (or Linux).</td>
</tr>
<tr> <tr>
<td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td> <td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td>
<td>Json command line linter.</td> <td>Json command line linter.</td>
@@ -1016,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><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> <td>Search for URLs in files (optionally limited by extension) and validate their HTTP status code.</td>
</tr> </tr>
<tr>
<td><a href="http://linuxbrew.sh">linuxbrew</a></td>
<td>The Homebrew package manager for Linux.</td>
</tr>
<tr> <tr>
<td><a href="https://github.com/markdownlint/markdownlint">mdl</a></td> <td><a href="https://github.com/markdownlint/markdownlint">mdl</a></td>
<td>Markdown command line linter.</td> <td>Markdown command line linter.</td>
@@ -1056,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 href="https://github.com/FriendsOfPHP/PHP-CS-Fixer">php-cs-fixer</a></td>
<td>A tool to automatically fix PHP Coding Standards issues.</td> <td>A tool to automatically fix PHP Coding Standards issues.</td>
</tr> </tr>
<tr>
<td><a href="https://phpmd.org">phpmd</a></td>
<td>PHP Mess Detector.</td>
</tr>
<tr> <tr>
<td><a href="https://photoncms.com/resources/installing">photon</a></td> <td><a href="https://photoncms.com/resources/installing">photon</a></td>
<td>Photon CMS cli.</td> <td>Photon CMS cli.</td>
@@ -1065,7 +1110,7 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td>Sass CSS compiler.</td> <td>Sass CSS compiler.</td>
</tr> </tr>
<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> <td>Sass/CSS command line linter.</td>
</tr> </tr>
<tr> <tr>
@@ -1134,7 +1179,10 @@ $ docker run -d \
```shell ```shell
# Create config directory to be mounted with dummy configuration # Create config directory to be mounted with dummy configuration
$ mkdir config $ mkdir config
# Xdebug 2
$ echo "xdebug.enable = 1" > config/xdebug.ini $ echo "xdebug.enable = 1" > config/xdebug.ini
# Xdebug 3
$ echo "xdebug.mode = debug" > config/xdebug.ini
# Run container and mount it # Run container and mount it
$ docker run -d \ $ docker run -d \
@@ -1186,12 +1234,12 @@ $ docker run -d \
#### Launch Postfix for mail-catching #### 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 ```shell
$ docker run -d \ $ docker run -d \
-p 127.0.0.1:9000:9000 \ -p 127.0.0.1:9000:9000 \
-v /tmp/mail:/var/mail \ -v /tmp/mail:/var/mail \
-e ENABLE_MAIL=1 \ -e ENABLE_MAIL=2 \
-t devilbox/php-fpm:7.2-prod -t devilbox/php-fpm:7.2-prod
``` ```
@@ -1238,10 +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> <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>
[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly) [![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
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> <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 ; Memory
; Note: "memory_limit" should be larger than "post_max_size" ; 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 ; Timeouts
max_execution_time = {{ item.cfg[item.key].max_execution_time | default(item.cfg[item.alt].max_execution_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) }} max_input_time = {{ item.cfg[item.key].max_input_time | default(item.cfg[item.alt].max_input_time) }}
; Uploads ; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize" ; 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) }} 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) }} 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) }} max_file_uploads = {{ item.cfg[item.key].max_file_uploads | default(item.cfg[item.alt].max_file_uploads) }}
; Vars ; 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 #} {# Only available since PHP >=5.4 #}
{% if not (php_version == 5.2 or php_version == 5.3 ) %} {% 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 %} {% 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 ; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting ; 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) }} 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) }} 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) }} 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_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) }} display_startup_errors = {{ item.cfg[item.key].display_startup_errors | default(item.cfg[item.alt].display_startup_errors) }}
{# Only available before PHP 7.2 #} {# 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 %} {% 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 %} {% endif %}
log_errors = {{ item.cfg[item.key].log_errors | default(item.cfg[item.alt].log_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) }} html_errors = {{ item.cfg[item.key].html_errors | default(item.cfg[item.alt].html_errors) }}
; Xdebug settings ; Xdebug settings
xdebug.default_enable = {{ item.cfg[item.key].xdebug_default_enable | default(item.cfg[item.alt].xdebug_default_enable) }} {% 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.profiler_enable = {{ item.cfg[item.key].xdebug_profiler_enable | default(item.cfg[item.alt].xdebug_profiler_enable) }} xdebug.default_enable = {{ item.cfg[item.key].xdebug2_default_enable | default(item.cfg[item.alt].xdebug2_default_enable) }}
xdebug.remote_enable = {{ item.cfg[item.key].xdebug_remote_enable | default(item.cfg[item.alt].xdebug_remote_enable) }} xdebug.profiler_enable = {{ item.cfg[item.key].xdebug2_profiler_enable | default(item.cfg[item.alt].xdebug2_profiler_enable) }}
xdebug.remote_autostart = {{ item.cfg[item.key].xdebug_remote_autostart | default(item.cfg[item.alt].xdebug_remote_autostart) }} 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

@@ -5,6 +5,8 @@ FROM devilbox/php-fpm-5.2
FROM devilbox/php-fpm-5.3 FROM devilbox/php-fpm-5.3
{% elif php_version == 8.0 %} {% elif php_version == 8.0 %}
FROM devilbox/php-fpm-8.0 FROM devilbox/php-fpm-8.0
{% elif php_version == 8.1 %}
FROM devilbox/php-fpm-8.1
{% else %} {% else %}
FROM php:{{ php_version }}-fpm FROM php:{{ php_version }}-fpm
{% endif %} {% endif %}
@@ -61,8 +63,8 @@ RUN set -eux \
} | tee /etc/apt/sources.list } | tee /etc/apt/sources.list
{% endif %} {% endif %}
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@@ -31,9 +31,9 @@ FROM devilbox/php-fpm:{{ php_version }}-base as builder
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
{% for build_dep in build_deps | unique | sort %} {% for build_dep in build_deps | unique | sort %}
{{ build_dep }} \ {{ build_dep }} \
{% endfor %} {% endfor %}
@@ -324,6 +324,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-mods"
ARG EXT_DIR ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${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/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/ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -331,8 +333,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
{# Loop over enabled run-time dependencies -#} {# Loop over enabled run-time dependencies -#}
{%- set run_deps = [] -%} {%- set run_deps = [] -%}
{%- for ext in extensions_enabled -%} {%- for ext in extensions_enabled -%}
@@ -430,6 +432,13 @@ RUN set -eux \
{% endif %} {% 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 ### Ports
### ###

View File

@@ -26,9 +26,9 @@ LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-prod"
### Install ### Install
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
locales-all \ locales-all \
postfix \ postfix \
postfix-pcre \ postfix-pcre \
@@ -36,12 +36,14 @@ RUN set -eux \
rsyslog \ rsyslog \
socat \ socat \
supervisor \ supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
\ \
&& rm -rf /etc/supervisor* \ && rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/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/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/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-work"
LABEL "org.opencontainers.image.description"="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
### ###
### Envs ### Envs
### ###
@@ -32,9 +45,11 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools ### Install Tools
### ###
RUN set -eux \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
@@ -65,8 +80,8 @@ RUN set -eux \
{%- endif -%} {%- endif -%}
{%- endif -%} {%- endif -%}
{%- endfor -%}{{ "\n\t" }}\ {%- endfor -%}{{ "\n\t" }}\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
aspell \ aspell \
autoconf \ autoconf \
@@ -76,6 +91,9 @@ RUN set -eux \
blackfire-agent \ blackfire-agent \
build-essential \ build-essential \
bzip2 \ bzip2 \
{% if php_version != 5.2 and php_version != 5.3 and php_version != 5.4 and php_version != 5.5 %}
certbot \
{% endif %}
coreutils \ coreutils \
dnsutils \ dnsutils \
dos2unix \ dos2unix \
@@ -87,6 +105,7 @@ RUN set -eux \
git-svn \ git-svn \
ghostscript \ ghostscript \
graphviz \ graphviz \
gsfonts \
hostname \ hostname \
htop \ htop \
imagemagick \ imagemagick \
@@ -97,15 +116,18 @@ RUN set -eux \
libffi-dev \ libffi-dev \
libssl-dev \ libssl-dev \
libyaml-dev \ libyaml-dev \
locales \
make \ make \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0] %} {% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] %}
mariadb-client \ mariadb-client \
{% else %} {% else %}
mysql-client \ mysql-client \
{% endif %} {% endif %}
mupdf \
mupdf-tools \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -119,6 +141,7 @@ RUN set -eux \
ruby-dev \ ruby-dev \
shellcheck \ shellcheck \
silversearcher-ag \ silversearcher-ag \
sqlite3 \
subversion \ subversion \
sudo \ sudo \
tig \ tig \
@@ -133,7 +156,10 @@ RUN set -eux \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ {% if php_version in [5.6, 7.0] %}
zsh-common \
{% endif %}
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -224,13 +250,13 @@ RUN set -eux \
{%- endif -%} {%- endif -%}
{#- Version specific gem version available? -#} {#- Version specific gem version available? -#}
{%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%} {%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['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? -#} {#- Generic gem version available? -#}
{%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%} {%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['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]['all']['version'] }} \
{#- No version info available -#} {#- No version info available -#}
{%- else -%} {%- else -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }} \ {{ "\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 -%} {%- endif -%}
{#- Symlinks available? -#} {#- Symlinks available? -#}
{%- if 'link' in composer_available[tool] -%} {%- if 'link' in composer_available[tool] -%}
@@ -308,6 +334,7 @@ RUN set -eux \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \ && rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \ && rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -380,13 +407,13 @@ RUN set -eux \
{%- endif -%} {%- endif -%}
{#- Version specific gem version available? -#} {#- Version specific gem version available? -#}
{%- if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] -%} {%- 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'] }} \ {{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} || true \
{#- Generic gem version available? -#} {#- Generic gem version available? -#}
{%- elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] -%} {%- 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'] }} \ {{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} || true \
{#- No version info available -#} {#- No version info available -#}
{%- else -%} {%- else -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \ {{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} || true \
{%- endif -%} {%- endif -%}
{#- Fail fast version -#} {#- Fail fast version -#}
{%- if build_fail_fast -%} {%- if build_fail_fast -%}
@@ -420,7 +447,10 @@ RUN set -eux \
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${HOME}/.yarn/bin:${PATH}"'; \
echo 'PATH="${HOME}/.composer/vendor/bin:${PATH}"'; \
echo 'PATH="/opt/nvm/versions/node/$(nvm version default)/bin:${PATH}"'; \
echo "export PATH"; \ echo "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -502,6 +532,7 @@ RUN set -eux \
{%- endif -%} {%- endif -%}
{% endfor %}{{ "\n\t" }}\ {% endfor %}{{ "\n\t" }}\
# -------------------- Cleanup -------------------- # -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -513,6 +544,13 @@ RUN set -eux \
{% endif %} {% 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 ### Copy files
### ###

View File

@@ -33,6 +33,7 @@ php_all_versions:
- 7.3 - 7.3
- 7.4 - 7.4
- 8.0 - 8.0
- 8.1
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------

View File

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

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