Compare commits

...

285 Commits
0.111 ... 0.137

Author SHA1 Message Date
cytopia
52c1a907f9 Merge pull request #232 from devilbox/release-0.137
Release 0.137
2022-03-26 15:41:05 +01:00
cytopia
e19d955965 Fix linting pipeline 2022-03-26 13:53:00 +01:00
cytopia
c0af9f91a6 Update CHANGELOG 2022-03-26 13:49:04 +01:00
cytopia
5f8551e742 Finalize new pipelines 2022-03-26 13:47:53 +01:00
cytopia
b774432a7a Re-enable tests 2022-03-26 13:47:07 +01:00
cytopia
e856fe1da4 Verify docker save 2022-03-26 01:32:07 +01:00
cytopia
1ed1c7eb81 Add test download 2022-03-26 01:16:44 +01:00
cytopia
756b6bc0fe Integrate retry for upload artifact 2022-03-26 00:54:48 +01:00
cytopia
4e9969ef75 Fix if condition 2022-03-25 21:57:31 +01:00
cytopia
1b67f7b02d Fix action name 2022-03-25 21:47:12 +01:00
cytopia
9fda4fd0a2 Use verifyer to upload artifacts 2022-03-25 21:43:19 +01:00
cytopia
4858303a1b Remove limited retries 2022-03-25 19:38:51 +01:00
cytopia
2e3115ef04 Use retry for artifact download 2022-03-25 19:31:19 +01:00
cytopia
8989b52602 Use shorter build names 2022-03-25 17:25:32 +01:00
cytopia
ee6b735f17 Fix test-case 2022-03-25 17:23:43 +01:00
cytopia
20b45a0b79 Remove non-existing matrix var 2022-03-25 16:49:52 +01:00
cytopia
687969b59b Separate PHP 5.2 2022-03-25 16:24:00 +01:00
cytopia
111c8a412f Enable all versions 2022-03-25 16:21:08 +01:00
cytopia
1d27f22e3f Organize workflow files 2022-03-25 16:17:50 +01:00
cytopia
4b8668623b Test with am64 only 2022-03-25 15:55:22 +01:00
cytopia
7b7a680e0b Test manifest 2022-03-25 15:52:31 +01:00
cytopia
49d9459df8 Ensure deploy tag is present 2022-03-25 15:36:59 +01:00
cytopia
efad9eaa48 Fix paths 2022-03-25 15:33:07 +01:00
cytopia
22231fc61c Fix deploy 2022-03-25 15:31:52 +01:00
cytopia
f971d8d4b8 Limit retries 2022-03-25 15:18:32 +01:00
cytopia
5498275047 Fix makefile 2022-03-25 15:15:51 +01:00
cytopia
a6f9bd8219 Test deploy 2022-03-25 15:04:43 +01:00
cytopia
ea47aa2ba5 Streamline build 2022-03-25 15:02:20 +01:00
cytopia
5094da0ae6 Build correct flavour 2022-03-25 14:16:24 +01:00
cytopia
38d4f0c222 Disable debug 2022-03-25 14:12:05 +01:00
cytopia
853962c4e9 Set outputs 2022-03-25 14:11:23 +01:00
cytopia
8d50798d54 Show more outputs 2022-03-25 14:04:32 +01:00
cytopia
b50a688add show debug 2022-03-25 14:01:09 +01:00
cytopia
99bd1d2cdb Add debug stage 2022-03-25 13:47:01 +01:00
cytopia
ac368b8725 Fix missing char 2022-03-25 13:40:34 +01:00
cytopia
c815e9040c Fix workflow 2022-03-25 13:39:06 +01:00
cytopia
61ccae6fc1 Fix workflow 2022-03-25 13:37:16 +01:00
cytopia
f7699f9c84 Fix aa build 2022-03-25 13:26:03 +01:00
cytopia
1cab69c0ab Add new workflow 2022-03-25 13:24:56 +01:00
cytopia
2158817a05 Fix Makefile 2022-03-25 13:24:09 +01:00
cytopia
29d34dcdb2 Go full build chain 2022-03-25 01:43:34 +01:00
cytopia
ff04507e50 Dont check if image exists before loading it from disk 2022-03-25 01:30:09 +01:00
cytopia
a448549b82 Make artifact name unique 2022-03-25 01:23:45 +01:00
cytopia
e808575164 Add generic flavour 2022-03-25 01:16:19 +01:00
cytopia
643e1a7478 Pick fast builder 2022-03-25 01:14:48 +01:00
cytopia
f3758cec56 Build mods 2022-03-25 01:13:18 +01:00
cytopia
ec5d6734fa Remove tests for now 2022-03-25 01:02:46 +01:00
cytopia
ab91e0794b Fix Makefile 2022-03-25 01:02:33 +01:00
cytopia
b6f926cf8a Fix tests 2022-03-25 00:53:26 +01:00
cytopia
1609e8ea61 Fix Makefile 2022-03-25 00:50:24 +01:00
cytopia
389e0bad20 Fix tests 2022-03-25 00:50:11 +01:00
cytopia
e48ceef4a6 Fix Makefile 2022-03-25 00:37:53 +01:00
cytopia
b659089ff9 Fix git cmd 2022-03-25 00:32:41 +01:00
cytopia
e8e92eceb7 Fix reusable workflow 2022-03-25 00:30:50 +01:00
cytopia
14c25cf670 Try out new workflow run 2022-03-25 00:29:07 +01:00
cytopia
8679dbee6a Give some additional startup time 2022-03-24 18:07:43 +01:00
cytopia
6ccf44b5a9 Fix README generation test 2022-03-24 17:37:02 +01:00
cytopia
2826053fc0 Probe for test email repeatedly 2022-03-24 17:31:05 +01:00
cytopia
1eb30660a6 CI: Limit retries on failure 2022-03-24 13:03:12 +01:00
cytopia
81ef92f91e Test: Better check to see if PHP-FPM is running 2022-03-24 13:02:49 +01:00
cytopia
663f716031 Removed Ansible due to arm64 issues 2022-03-23 21:32:01 +01:00
cytopia
ea52cc0969 Fix mysql CI test 2022-03-23 15:28:13 +01:00
cytopia
ee14a4d46e Fix base/ tests for quemu envs 2022-03-23 14:15:57 +01:00
cytopia
d894a2bff7 Fix work/ integration tests 2022-03-23 14:12:00 +01:00
cytopia
cdfca15613 Fix work/ tests 2022-03-23 13:36:21 +01:00
cytopia
d1061273b0 Fix prod/ tests 2022-03-23 13:27:02 +01:00
cytopia
1c31dbe3bf tests: update headlines 2022-03-23 13:26:28 +01:00
cytopia
7975126bdf tests: adjust container startup waiting time 2022-03-23 13:26:10 +01:00
cytopia
ffaee357fd Fix mods/ tests 2022-03-23 12:03:43 +01:00
cytopia
a0e7ae7131 Fix base/ tests 2022-03-23 11:51:19 +01:00
cytopia
7041e6ef0a Adjust CI tests 2022-03-23 11:26:50 +01:00
cytopia
176f48d063 Fix mhsendmail install 2022-03-23 00:27:00 +01:00
cytopia
dc15215156 Optimize images 2022-03-23 00:15:08 +01:00
cytopia
7693a4ea3f Removed mongodb cmd client and apt repositories due to arm64 issues 2022-03-22 23:20:19 +01:00
cytopia
4ac5a7ab10 Fix broken software on non-amd64 platforms 2022-03-22 23:17:53 +01:00
cytopia
2b60cd648d Removed postgres cmd client and apt repositories due to arm64 issues 2022-03-22 23:01:15 +01:00
cytopia
492d23b9f8 Removed homebrew due to arm64 issues 2022-03-22 22:58:08 +01:00
cytopia
b852001495 Enable arm64 tests in CI 2022-03-22 22:52:30 +01:00
cytopia
5eb8ce8187 Ensured CI tests are platform agnostic (amd64 vs arm64) 2022-03-22 22:50:11 +01:00
cytopia
d1fd0addaa Update nightly tag 2022-03-22 22:21:10 +01:00
cytopia
0aceceabda Fixed imklog: cannot open kernel log (/proc/kmsg): Operation not permitted. 2022-03-22 22:20:17 +01:00
cytopia
42933391b6 Test arm64 builds 2022-03-22 12:39:38 +01:00
cytopia
436babd549 Merge pull request #231 from devilbox/release-0.136
Release 0.136
2022-03-21 22:16:40 +01:00
cytopia
abfeef2e5c Remove testing files 2022-03-21 22:15:33 +01:00
cytopia
896c8f6c80 Fix soap module build for PHP 7.4 2022-03-21 19:15:03 +01:00
cytopia
7f71dd2493 Update PHP modules in README 2022-03-21 19:14:43 +01:00
cytopia
8318b43d2f Ensure to check against mhash module 2022-03-21 16:31:17 +01:00
cytopia
6a00f19e88 Fix snmp module for PHP 7.4 2022-03-21 16:22:06 +01:00
cytopia
e97261bc87 Update PHP modules in README 2022-03-21 16:18:48 +01:00
cytopia
06ac183215 Fix build for PHP 7.0 2022-03-21 15:39:26 +01:00
cytopia
0181f196f6 Update module section 2022-03-21 15:23:33 +01:00
cytopia
4e5da07e21 Make install of symfony cli platform independent 2022-03-21 15:21:24 +01:00
cytopia
6c6470c181 Fix build 2022-03-21 14:59:34 +01:00
cytopia
80f03e7512 Integrate new PHP-FPM images 2022-03-21 12:02:09 +01:00
cytopia
157945dada Fix syntax error 2022-03-18 18:41:13 +01:00
cytopia
116aa387fb Changed PHP 5.5 to Debian stretch 2022-03-18 13:35:03 +01:00
cytopia
e33041ca55 Switch PHP 5.5 base image to devilbox/php-fpm-5.5 for arm64 support 2022-03-18 12:59:38 +01:00
cytopia
2d489beb2c Test arm64 builds 2022-03-18 12:22:37 +01:00
cytopia
cb9437b4f3 Updated CHANGELOG 2022-03-18 12:22:22 +01:00
cytopia
9505770a8c Update nightly 2022-03-18 12:22:06 +01:00
cytopia
919a6887a6 Removed amqp on PHP 5.3 2022-03-18 12:21:37 +01:00
cytopia
b352de6939 Fixed install of mongodb-org-shell and mongodb-org-tools 2022-03-18 12:19:00 +01:00
cytopia
456447070a Merge pull request #230 from devilbox/release-0.135
Release 0.135
2022-03-18 12:07:36 +01:00
cytopia
ac508caee4 Remove arm64 test 2022-03-18 01:23:47 +01:00
cytopia
6b4596688c Removed codeception from PHP 5.3 2022-03-18 01:19:10 +01:00
cytopia
98569594bf Make alien respect architecture 2022-03-17 23:09:35 +01:00
cytopia
8b9dbdf36b Fix build of wkhtmltopdf 2022-03-17 22:08:45 +01:00
cytopia
fdc024fac3 Fix debs for PHP 5.2 and PHP 5.3 2022-03-17 21:05:17 +01:00
cytopia
f36d0818b0 Removed ioncube extension for PHP 5.2, PHP 5.3 and PHP 5.4 2022-03-17 20:29:46 +01:00
cytopia
361192deee Fix debs for PHP 5.2 and PHP 5.3 2022-03-17 20:22:23 +01:00
cytopia
b937b99641 Fix syntax error 2022-03-17 18:49:20 +01:00
cytopia
a7b96c7cf5 Disable PHP 5.2 in arm64 builds 2022-03-17 18:39:31 +01:00
cytopia
45e25586e3 Removed mongodb extension from PHP 5.3 due to build errors 2022-03-17 18:39:15 +01:00
cytopia
df59c7b7bc Show commands used in Makefile 2022-03-17 18:35:37 +01:00
cytopia
c18bac4387 Ensure dpkg-dev is installed 2022-03-17 18:26:47 +01:00
cytopia
0239ff0a78 Fix ioncube architecture install 2022-03-17 17:59:11 +01:00
cytopia
02c8c9d6ec Variablize architecture 2022-03-17 17:24:18 +01:00
cytopia
207b78df6f Fix gd build for PHP 5.2 and PHP 5.3 2022-03-17 16:55:34 +01:00
cytopia
20c5b88e52 Fix amqp extension for PHP 5.2 2022-03-17 16:52:42 +01:00
cytopia
5585109fb8 Variablize Docker platform 2022-03-17 16:36:13 +01:00
cytopia
2517c33bae Removed photoncms binaries (their GitHub organization went private) 2022-03-17 16:09:07 +01:00
cytopia
b0c487ff28 Test ARM64 builds 2022-03-17 15:54:19 +01:00
cytopia
e16fdce860 Use correct run_deps for Debian version 2022-03-17 15:44:26 +01:00
cytopia
31489459ad Ensure mkdir does not fail if directory already exists 2022-03-17 15:39:31 +01:00
cytopia
64e290a359 Update nightly workflow 2022-03-17 15:22:25 +01:00
cytopia
e145f9cec8 Fixed pidof issue on QUEMU by replacing it with pgrep 2022-03-17 15:12:39 +01:00
cytopia
40ac8e4ef0 Fixed cloning of gitflow 2022-03-17 14:59:54 +01:00
cytopia
1640850b75 Changed PHP 5.2 and PHP 5.3 base images to Debian stretch 2022-03-17 14:55:22 +01:00
cytopia
42a0a4f7ac Merge pull request #226 from devilbox/release-0.134
Release 0.134
2022-02-03 19:10:23 +01:00
cytopia
69689351c8 Update project files 2022-02-03 14:33:51 +01:00
cytopia
865f18a212 Add extension xdebug to PHP 8.2 2022-02-03 14:33:27 +01:00
cytopia
f0b758e5fc Merge pull request #225 from devilbox/release-0.133
Release 0.133
2022-02-03 00:44:18 +01:00
cytopia
d3e642b5f6 Add PHP 8.2 2022-02-02 12:39:31 +01:00
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
143 changed files with 12516 additions and 4122 deletions

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

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

172
.github/workflows/action_branch.yml vendored Normal file
View File

@@ -0,0 +1,172 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: build
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
push:
jobs:
# -----------------------------------------------------------------------------------------------
# (1/8) Determine parameter settings
# -----------------------------------------------------------------------------------------------
params:
uses: ./.github/workflows/params.yml
# -----------------------------------------------------------------------------------------------
# (2/8) Configure Build and Deploy Matrices
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: ./.github/workflows/zzz-reuse-configure.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
matrix: ${{ needs.params.outputs.matrix }}
refs: ${{ needs.params.outputs.refs }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (3/8) Build & Test base
# -----------------------------------------------------------------------------------------------
base:
needs:
- params
- configure
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: base
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (4/8) Build & Test mods
# -----------------------------------------------------------------------------------------------
mods:
needs:
- params
- configure
- base
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: mods
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (5/8) Build & Test prod
# -----------------------------------------------------------------------------------------------
prod:
needs:
- params
- configure
- base
- mods
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: prod
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (6/8) Build & Test work
# -----------------------------------------------------------------------------------------------
work:
needs:
- params
- configure
- base
- mods
- prod
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: work
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (7/8) Push images
# -----------------------------------------------------------------------------------------------
push-image:
needs:
- params
- configure
- base
- mods
- prod
- work
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (8/8) Push Manifests
# -----------------------------------------------------------------------------------------------
push-manifest:
needs:
- params
- configure
- base
- mods
- prod
- work
- push-image
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
with:
enabled: true
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
params_matrix: ${{ needs.params.outputs.matrix }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}

View File

@@ -0,0 +1,174 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: build
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
pull_request:
jobs:
# -----------------------------------------------------------------------------------------------
# (1/8) Determine parameter settings
# -----------------------------------------------------------------------------------------------
params:
uses: ./.github/workflows/params.yml
# Only run for forks (contributor)
if: github.event.pull_request.head.repo.fork
# -----------------------------------------------------------------------------------------------
# (2/8) Configure Build and Deploy Matrices
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: ./.github/workflows/zzz-reuse-configure.yml
with:
enabled: true
can_deploy: false
matrix: ${{ needs.params.outputs.matrix }}
refs: ${{ needs.params.outputs.refs }}
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (3/8) Build & Test base
# -----------------------------------------------------------------------------------------------
base:
needs:
- params
- configure
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: false
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: base
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (4/8) Build & Test mods
# -----------------------------------------------------------------------------------------------
mods:
needs:
- params
- configure
- base
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: false
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: mods
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (5/8) Build & Test prod
# -----------------------------------------------------------------------------------------------
prod:
needs:
- params
- configure
- base
- mods
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: false
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: prod
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (6/8) Build & Test work
# -----------------------------------------------------------------------------------------------
work:
needs:
- params
- configure
- base
- mods
- prod
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: false
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: work
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (7/8) Push images
# -----------------------------------------------------------------------------------------------
push-image:
needs:
- params
- configure
- base
- mods
- prod
- work
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
with:
enabled: true
can_deploy: false
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ""
dockerhub_password: ""
# -----------------------------------------------------------------------------------------------
# (8/8) Push Manifests
# -----------------------------------------------------------------------------------------------
push-manifest:
needs:
- params
- configure
- base
- mods
- prod
- work
- push-image
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
with:
enabled: true
can_deploy: false
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
params_matrix: ${{ needs.params.outputs.matrix }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ""
dockerhub_password: ""

174
.github/workflows/action_schedule.yml vendored Normal file
View File

@@ -0,0 +1,174 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: nightly
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# Runs daily
schedule:
- cron: '0 0 * * *'
jobs:
# -----------------------------------------------------------------------------------------------
# (1/8) Determine parameter settings
# -----------------------------------------------------------------------------------------------
params:
uses: ./.github/workflows/params.yml
# -----------------------------------------------------------------------------------------------
# (2/8) Configure Build and Deploy Matrices
# -----------------------------------------------------------------------------------------------
configure:
needs: [params]
uses: ./.github/workflows/zzz-reuse-configure.yml
with:
enabled: true
can_deploy: true
matrix: ${{ needs.params.outputs.matrix }}
refs: ${{ needs.params.outputs.refs }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (3/8) Build & Test base
# -----------------------------------------------------------------------------------------------
base:
needs:
- params
- configure
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: true
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: base
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (4/8) Build & Test mods
# -----------------------------------------------------------------------------------------------
mods:
needs:
- params
- configure
- base
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: true
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: mods
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (5/8) Build & Test prod
# -----------------------------------------------------------------------------------------------
prod:
needs:
- params
- configure
- base
- mods
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: true
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: prod
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (6/8) Build & Test work
# -----------------------------------------------------------------------------------------------
work:
needs:
- params
- configure
- base
- mods
- prod
uses: ./.github/workflows/zzz-reuse-build.yml
with:
enabled: true
can_deploy: true
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
flavour: work
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (7/8) Push images
# -----------------------------------------------------------------------------------------------
push-image:
needs:
- params
- configure
- base
- mods
- prod
- work
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
with:
enabled: true
can_deploy: true
build_matrix: ${{ needs.configure.outputs.matrix_build }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
# -----------------------------------------------------------------------------------------------
# (8/8) Push Manifests
# -----------------------------------------------------------------------------------------------
push-manifest:
needs:
- params
- configure
- base
- mods
- prod
- work
- push-image
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
with:
enabled: true
can_deploy: true
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
params_matrix: ${{ needs.params.outputs.matrix }}
has_refs: ${{ needs.configure.outputs.has_refs }}
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}

View File

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

76
.github/workflows/params.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: params
# -------------------------------------------------------------------------------------------------
# Custom Variables
# -------------------------------------------------------------------------------------------------
env:
MATRIX: >-
[
{
"NAME": "PHP",
"VERSION": ["5.2"],
"FLAVOUR": ["default"],
"ARCH": ["linux/amd64"]
},
{
"NAME": "PHP",
"VERSION": ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"],
"FLAVOUR": ["default"],
"ARCH": ["linux/amd64"]
}
]
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
workflow_call:
outputs:
matrix:
description: "The determined version matrix"
value: ${{ jobs.params.outputs.matrix }}
refs:
description: "The determined git ref matrix (only during scheduled run)"
value: ${{ jobs.params.outputs.refs }}
jobs:
params:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
refs: ${{ steps.set-refs.outputs.matrix }}
steps:
- name: "[Set-Output] Matrix"
id: set-matrix
run: |
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
id: set-refs
uses: cytopia/git-ref-matrix-action@v0.1.4
with:
repository_default_branch: master
branches: master
num_latest_tags: 1
if: github.event_name == 'schedule'
- name: "[DEBUG] Show settings'"
run: |
echo 'Matrix'
echo '--------------------'
echo '${{ steps.set-matrix.outputs.matrix }}'
echo
echo 'Matrix: Refs'
echo '--------------------'
echo '${{ steps.set-matrix-refs.outputs.matrix }}'
echo

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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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,333 +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}"
- name: Show git info
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: |
git log | head -20
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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 in $(seq ${RETRIES}); do
echo "[${n}/${RETRIES}] ${*}";
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-')))
)

423
.github/workflows/zzz-reuse-build.yml vendored Normal file
View File

@@ -0,0 +1,423 @@
---
name: Build multi-arch images
on:
workflow_call:
###
### Variables
###
inputs:
enabled:
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
required: true
type: boolean
can_deploy:
description: 'Determines wheather this workflow will also deploy (login and push).'
required: true
type: boolean
build_matrix:
description: 'The build matrix'
required: true
type: string
has_refs:
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
required: true
type: string
artifact_prefix:
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
required: true
type: string
flavour:
description: 'The flavour to build (base, mods, prod or work).'
required: true
type: string
###
### Secrets
###
secrets:
dockerhub_username:
description: 'The username for Dockerhub.'
required: false
dockerhub_password:
description: 'The password for Dockerhub.'
required: false
jobs:
# -----------------------------------------------------------------------------------------------
# JOB: BUILD
# -----------------------------------------------------------------------------------------------
build:
name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.flavour }} (${{ matrix.arch }}) ${{ matrix.refs }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.build_matrix) }}
if: inputs.enabled
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: "[SETUP] Checkout repository (current)"
uses: actions/checkout@v3
with:
fetch-depth: 0
if: inputs.has_refs == 0
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ matrix.refs }}
if: inputs.has_refs != 0
- name: "[SETUP] Setup QEMU environment"
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: "[SETUP] Set artifact names"
id: set-artifact-name
run: |
PRE_HASH="$( git rev-parse HEAD | head -c 10 )"
VERSION="${{ matrix.version }}"
ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )"
NAME_BASE="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-base"
NAME_MODS="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-mods"
NAME_PROD="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-prod"
NAME_WORK="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-work"
echo "::set-output name=base::${NAME_BASE}"
echo "::set-output name=mods::${NAME_MODS}"
echo "::set-output name=prod::${NAME_PROD}"
echo "::set-output name=work::${NAME_WORK}"
# ------------------------------------------------------------
# Artifact Import
# ------------------------------------------------------------
###
### Download and import base
###
- name: "[Artifact Load] Download base"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.base }}
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'mods' }}
- name: "[Artifact Load] Import base"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.base }}
if: ${{ inputs.flavour == 'mods' }}
###
### Download and import mods
###
- name: "[Artifact Load] Download mods"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.mods }}
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'prod' }}
- name: "[Artifact Load] Import mods"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.mods }}
if: ${{ inputs.flavour == 'prod' }}
###
### Download and import prod
###
- name: "[Artifact Load] Download prod"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.prod }}
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'work' }}
- name: "[Artifact Load] Import prod"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.prod }}
if: ${{ inputs.flavour == 'work' }}
# ------------------------------------------------------------
# Build
# ------------------------------------------------------------
- name: Build
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make build VERSION=${{ matrix.version }} FLAVOUR=${{ inputs.flavour }} ARCH=${{ matrix.arch }}
# ------------------------------------------------------------
# Test
# ------------------------------------------------------------
- name: Test
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make test VERSION=${{ matrix.version }} FLAVOUR=${{ inputs.flavour }} ARCH=${{ matrix.arch }}
# ------------------------------------------------------------
# Artifact Expot (base)
# ------------------------------------------------------------
###
### Export and Upload base
###
- name: "[Artifact Save] Export base"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make save-verify VERSION=${{ matrix.version }} FLAVOUR=base ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.base }} INFILE=${{ steps.set-artifact-name.outputs.base }}
if: ${{ inputs.flavour == 'base' }}
###
### Try 1
###
- name: "[Artifact Save] Upload base"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.base }}
path: ${{ steps.set-artifact-name.outputs.base }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'base' }}
- name: "[Artifact Save] Download base (verify)"
continue-on-error: true
id: download-base-1
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.base }}
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
if: ${{ inputs.flavour == 'base' }}
###
### Try 2
###
- name: "[Artifact Save] Upload base (retry)"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.base }}
path: ${{ steps.set-artifact-name.outputs.base }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
- name: "[Artifact Save] Download base (verify 2)"
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.base }}
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
# ------------------------------------------------------------
# Artifact Expot (mods)
# ------------------------------------------------------------
###
### Export and Upload mods
###
- name: "[Artifact Save] Export mods"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make save-verify VERSION=${{ matrix.version }} FLAVOUR=mods ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.mods }} INFILE=${{ steps.set-artifact-name.outputs.mods }}
if: ${{ inputs.flavour == 'mods' }}
###
### Try 1
###
- name: "[Artifact Save] Upload mods"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.mods }}
path: ${{ steps.set-artifact-name.outputs.mods }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'mods' }}
- name: "[Artifact Save] Download mods (verify)"
continue-on-error: true
id: download-mods-1
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.mods }}
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
if: ${{ inputs.flavour == 'mods' }}
###
### Try 2
###
- name: "[Artifact Save] Upload mods (retry)"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.mods }}
path: ${{ steps.set-artifact-name.outputs.mods }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
- name: "[Artifact Save] Download mods (verify 2)"
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.mods }}
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
# ------------------------------------------------------------
# Artifact Expot (prod)
# ------------------------------------------------------------
###
### Export and Upload prod
###
- name: "[Artifact Save] Export prod"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make save-verify VERSION=${{ matrix.version }} FLAVOUR=prod ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.prod }} INFILE=${{ steps.set-artifact-name.outputs.prod }}
if: ${{ inputs.flavour == 'prod' }}
###
### Try 1
###
- name: "[Artifact Save] Upload prod"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.prod }}
path: ${{ steps.set-artifact-name.outputs.prod }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'prod' }}
- name: "[Artifact Save] Download prod (verify)"
continue-on-error: true
id: download-prod-1
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.prod }}
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
if: ${{ inputs.flavour == 'prod' }}
###
### Try 2
###
- name: "[Artifact Save] Upload prod (retry)"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.prod }}
path: ${{ steps.set-artifact-name.outputs.prod }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
- name: "[Artifact Save] Download prod (verify 2)"
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.prod }}
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
# ------------------------------------------------------------
# Artifact Expot (work)
# ------------------------------------------------------------
###
### Export and Upload work
###
- name: "[Artifact Save] Export work"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make save-verify VERSION=${{ matrix.version }} FLAVOUR=work ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.work }} INFILE=${{ steps.set-artifact-name.outputs.work }}
if: ${{ inputs.flavour == 'work' }}
###
### Try 1
###
- name: "[Artifact Save] Upload work"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.work }}
path: ${{ steps.set-artifact-name.outputs.work }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'work' }}
- name: "[Artifact Save] Download work (verify)"
continue-on-error: true
id: download-work-1
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.work }}
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
if: ${{ inputs.flavour == 'work' }}
###
### Try 2
###
- name: "[Artifact Save] Upload work (retry)"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/upload-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.work }}
path: ${{ steps.set-artifact-name.outputs.work }}
if-no-files-found: error
attempt_limit: 20
attempt_delay: 10000
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}
- name: "[Artifact Save] Download work (verify 2)"
uses: actions/download-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.work }}
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}

View File

@@ -0,0 +1,148 @@
---
name: Configure Pipeline for multi-arch image build
on:
workflow_call:
###
### Variables
###
inputs:
enabled:
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
required: true
type: boolean
can_deploy:
description: 'Determines wheather this workflow will also deploy (login and push).'
required: true
type: boolean
matrix:
description: 'The version build matrix as JSON string ( list of objects: [{NAME, VERSION[], ARCH[]}] ).'
required: true
type: string
refs:
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
required: false
type: string
###
### Secrets
###
secrets:
dockerhub_username:
description: 'The username for Dockerhub.'
required: false
dockerhub_password:
description: 'The password for Dockerhub.'
required: false
###
### Outouts
###
outputs:
can_login:
description: "Can we login"
value: ${{ jobs.configure.outputs.can_login }}
has_refs:
description: "Do we have refs"
value: ${{ jobs.configure.outputs.has_refs }}
matrix_build:
description: "The determined build matrix"
value: ${{ jobs.configure.outputs.matrix_build }}
matrix_deploy:
description: "The determined deploy matrix"
value: ${{ jobs.configure.outputs.matrix_deploy }}
artifact_prefix:
description: "The determined unique artifact prefix"
value: ${{ jobs.configure.outputs.artifact_prefix }}
jobs:
# -----------------------------------------------------------------------------------------------
# JOB (1/3): CONFIGURE
# -----------------------------------------------------------------------------------------------
configure:
name: Configure
if: inputs.enabled
runs-on: ubuntu-latest
###
### Outputs
###
outputs:
can_login: ${{ steps.set-login.outputs.can_login }}
has_refs: ${{ steps.set-matrix.outputs.has_refs }}
matrix_build: ${{ steps.set-matrix.outputs.matrix_build }}
matrix_deploy: ${{ steps.set-matrix.outputs.matrix_deploy }}
artifact_prefix: ${{ steps.set-artifact-prefix.outputs.prefix }}
###
### Steps
###
steps:
- name: "[Set-Output] Set Docker login capabilities"
id: set-login
shell: bash
run: |
if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then
echo "::set-output name=can_login::0"
else
echo "::set-output name=can_login::1"
fi
env:
ENV_USER: ${{ secrets.dockerhub_username }}
ENV_PASS: ${{ secrets.dockerhub_password }}
- name: "[Set-Output] Set Build Matrix & Deploy Matrix"
id: set-matrix
shell: bash
run: |
if [ "${{ inputs.refs }}" != "" ]; then
MATRIX_BUILD="$( \
jq -M -c \
--argjson refs '${{ inputs.refs }}' \
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \
)"
MATRIX_DEPLOY="$( \
jq -M -c \
--argjson refs '${{ inputs.refs }}' \
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \
)"
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
echo "::set-output name=has_refs::1"
else
MATRIX_BUILD="$( \
jq -M -c \
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[]})' <<<'${{ inputs.matrix }}' \
)"
MATRIX_DEPLOY="$( \
jq -M -c \
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[]})' <<<'${{ inputs.matrix }}' \
)"
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
echo "::set-output name=has_refs::0"
fi
- name: "[Set-Output] Set unique Artifact prefix"
id: set-artifact-prefix
shell: bash
run: |
PRE_DATE="$( date +"%s" )"
PRE_RAND="$( echo $RANDOM | md5sum | head -c 10 )"
echo "::set-output name=prefix::${PRE_DATE}-${PRE_RAND}"
- name: "[DEBUG] Show Workflow Inputs"
shell: bash
run: |
echo 'enabled: ${{ inputs.enabled }}'
echo 'can_deploy: ${{ inputs.can_deploy }}'
echo 'matrix: ${{ inputs.matrix }}'
echo 'refs: ${{ inputs.refs }}'
- name: "[DEBUG] Show Determined Settings"
shell: bash
run: |
echo 'can_login=${{ steps.set-login.outputs.can_login }}'
echo 'has_refs=${{ steps.set-matrix.outputs.has_refs }}'
echo 'matrix_build=${{ steps.set-matrix.outputs.matrix_build }}'
echo 'matrix_deploy=${{ steps.set-matrix.outputs.matrix_deploy }}'
echo 'artifact_prefix=${{ steps.set-artifact-prefix.outputs.prefix }}'

View File

@@ -0,0 +1,242 @@
name: Deploy multi-arch images
on:
workflow_call:
###
### Variables
###
inputs:
enabled:
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
required: true
type: boolean
can_deploy:
description: 'Determines wheather this workflow will also deploy (login and push).'
required: true
type: boolean
build_matrix:
description: 'The build matrix'
required: true
type: string
has_refs:
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
required: true
type: string
artifact_prefix:
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
required: true
type: string
###
### Secrets
###
secrets:
dockerhub_username:
description: 'The username for Dockerhub.'
required: false
dockerhub_password:
description: 'The password for Dockerhub.'
required: false
jobs:
deploy:
name: ${{ matrix.name }}-${{ matrix.version }} (${{ matrix.arch }}) ${{ matrix.refs }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.build_matrix) }}
if: inputs.enabled
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: "[SETUP] Checkout repository (current)"
uses: actions/checkout@v3
with:
fetch-depth: 0
if: inputs.has_refs == 0
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ matrix.refs }}
if: inputs.has_refs != 0
- name: "[SETUP] Setup QEMU environment"
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: "[SETUP] Determine Docker tag"
id: tag
uses: cytopia/docker-tag-action@v0.4.15
- name: "[SETUP] Set artifact names"
id: set-artifact-name
run: |
PRE_HASH="$( git rev-parse HEAD | head -c 10 )"
VERSION="${{ matrix.version }}"
ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )"
NAME_BASE="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-base"
NAME_MODS="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-mods"
NAME_PROD="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-prod"
NAME_WORK="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-work"
echo "::set-output name=base::${NAME_BASE}"
echo "::set-output name=mods::${NAME_MODS}"
echo "::set-output name=prod::${NAME_PROD}"
echo "::set-output name=work::${NAME_WORK}"
# ------------------------------------------------------------
# Artifact Import
# ------------------------------------------------------------
###
### Download and import base
###
- name: "[Artifact Load] Download base"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.base }}
attempt_limit: 20
attempt_delay: 10000
- name: "[Artifact Load] Import base"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.base }}
###
### Download and import mods
###
- name: "[Artifact Load] Download mods"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.mods }}
attempt_limit: 20
attempt_delay: 10000
- name: "[Artifact Load] Import mods"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.mods }}
###
### Download and import prod
###
- name: "[Artifact Load] Download prod"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.prod }}
attempt_limit: 20
attempt_delay: 10000
- name: "[Artifact Load] Import prod"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.prod }}
###
### Download and import prod
###
- name: "[Artifact Load] Download work"
uses: Wandalen/wretry.action@v1.0.11
with:
action: actions/download-artifact@v3
with: |
name: ${{ steps.set-artifact-name.outputs.work }}
attempt_limit: 20
attempt_delay: 10000
- name: "[Artifact Load] Import work"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make load INFILE=${{ steps.set-artifact-name.outputs.work }}
# ------------------------------------------------------------
# Re-tag images
# ------------------------------------------------------------
- name: "[Docker Tag] base"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make tag VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Docker Tag] mods"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make tag VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Docker Tag] prod"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make tag VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Docker Tag] work"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make tag VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Docker Tag] Show images"
run: |
docker images
# ------------------------------------------------------------
# Login
# ------------------------------------------------------------
- name: "Login"
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
if: ${{ inputs.can_deploy }}
# ------------------------------------------------------------
# Push images
# ------------------------------------------------------------
- name: "[Push Image] base"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make push VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
if: ${{ inputs.can_deploy }}
- name: "[Push Image] mods"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make push VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
if: ${{ inputs.can_deploy }}
- name: "[Push Image] prod"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make push VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
if: ${{ inputs.can_deploy }}
- name: "[Push Image] work"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make push VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}
if: ${{ inputs.can_deploy }}

View File

@@ -0,0 +1,162 @@
name: Deploy multi-arch image manifests
on:
workflow_call:
###
### Variables
###
inputs:
enabled:
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
required: true
type: boolean
can_deploy:
description: 'Determines wheather this workflow will also deploy (login and push).'
required: true
type: boolean
deploy_matrix:
description: 'The version deploy matrix as JSON string ( list of objects: [{NAME, VERSION[], ARCH[]}] ).'
required: true
type: string
params_matrix:
description: 'The build matrix set via params.yml.'
required: true
type: string
artifact_prefix:
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
required: true
type: string
has_refs:
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
required: true
type: string
###
### Secrets
###
secrets:
dockerhub_username:
description: 'The username for Dockerhub.'
required: false
dockerhub_password:
description: 'The password for Dockerhub.'
required: false
jobs:
# -----------------------------------------------------------------------------------------------
# JOB (3/3): DEPLOY
# -----------------------------------------------------------------------------------------------
deploy:
name: ${{ matrix.name }}-${{ matrix.version }} (${{ matrix.flavour }}) ${{ matrix.refs }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.deploy_matrix) }}
if: inputs.enabled && inputs.can_deploy
steps:
# ------------------------------------------------------------
# Setup repository
# ------------------------------------------------------------
- name: "[SETUP] Checkout repository (current)"
uses: actions/checkout@v3
with:
fetch-depth: 0
if: ${{ inputs.has_refs == 0 }}
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ matrix.refs }}
if: ${{ inputs.has_refs != 0 }}
- name: "[SETUP] Setup QEMU environment"
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: "[SETUP] Determine Docker tag"
id: tag
uses: cytopia/docker-tag-action@v0.4.15
- name: "[SETUP] Determine manifest arches"
id: manifest
run: |
ARCHES="$( echo '${{ inputs.params_matrix }}' \
| jq 'group_by(.NAME, .VERSION, .ARCH)' \
| jq 'map({NAME: .[].NAME, VERSION: .[].VERSION[], FLAVOUR: .[].FLAVOUR[], ARCHES: .[].ARCH|join(",")})' \
| jq '.[] | select(.NAME=="${{ matrix.name }}" and .VERSION=="${{ matrix.version }}" and .FLAVOUR=="${{ matrix.flavour }}") | .ARCHES' \
| jq -c -M \
)"
echo "::set-output name=arches::${ARCHES}"
echo "ARCHES: ${ARCHES}"
# ------------------------------------------------------------
# Login
# ------------------------------------------------------------
- name: "Login"
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# ------------------------------------------------------------
# Create Manifest
# ------------------------------------------------------------
- name: "[Create Manifest] base (${{ steps.manifest.outputs.arches }})"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=base ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Create Manifest] mods (${{ steps.manifest.outputs.arches }})"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=mods ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Create Manifest] prod (${{ steps.manifest.outputs.arches }})"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=prod ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Create Manifest] work (${{ steps.manifest.outputs.arches }})"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=work ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
# ------------------------------------------------------------
# Deploy Manifest
# ------------------------------------------------------------
- name: "[Push Manifest] base: ${{ steps.tag.outputs.docker-tag }}"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Push Manifest] mods: ${{ steps.tag.outputs.docker-tag }}"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Push Manifest] prod: ${{ steps.tag.outputs.docker-tag }}"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
- name: "[Push Manifest] work: ${{ steps.tag.outputs.docker-tag }}"
uses: cytopia/shell-command-retry-action@v0.1.2
with:
command: |
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}

75
.gitignore vendored
View File

@@ -1,74 +1,3 @@
######################################
# CUSTOM
######################################
build/ansible/*.retry
######################################
# GENERIC
######################################
###### std ######
.lock
*.log
###### patches/diffs ######
*.patch
*.diff
*.orig
*.rej
######################################
# Operating Systems
######################################
###### OSX ######
._*
.DS*
.Spotlight-V100
.Trashes
###### Windows ######
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.lnk
######################################
# Editors
######################################
###### Sublime ######
*.sublime-workspace
*.sublime-project
###### Eclipse ######
.classpath
.buildpath
.project
.settings/
###### Netbeans ######
nbproject/private/
###### Intellij IDE ######
.idea/
.idea_modules/
###### vim ######
*.swp
*.swo
*~
###### TextMate ######
.tm_properties
*.tmproj
###### BBEdit ######
*.bbprojectd
*.bbproject
Makefile.docker
Makefile.lint

View File

@@ -1,143 +0,0 @@
---
###
### Travis settings
###
sudo: required
language: minimal
services:
- docker
###
### Build Matrix
###
env:
global:
- IMAGE: devilbox/php-fpm
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
make login USERNAME="${DOCKER_USERNAME}" PASSWORD="${DOCKER_PASSWORD}";
if [ "${TRAVIS_BRANCH}" == "master" ]; then
echo "Pushing latest";
make push TAG="${PHP}-base" &&
make push TAG="${PHP}-mods" &&
make push TAG="${PHP}-prod" &&
make push TAG="${PHP}-work";
elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then
echo "Pushing branch ${TRAVIS_BRANCH}";
make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${TRAVIS_BRANCH}" &&
make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${TRAVIS_BRANCH}" &&
make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${TRAVIS_BRANCH}" &&
make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${TRAVIS_BRANCH}" &&
make push TAG="${PHP}-base-${TRAVIS_BRANCH}" &&
make push TAG="${PHP}-mods-${TRAVIS_BRANCH}" &&
make push TAG="${PHP}-prod-${TRAVIS_BRANCH}" &&
make push TAG="${PHP}-work-${TRAVIS_BRANCH}";
elif [ -n "${TRAVIS_TAG}" ]; then
echo "Pushing tag ${TRAVIS_TAG}";
make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${TRAVIS_TAG}" &&
make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${TRAVIS_TAG}" &&
make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${TRAVIS_TAG}" &&
make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${TRAVIS_TAG}" &&
make push TAG="${PHP}-base-${TRAVIS_TAG}" &&
make push TAG="${PHP}-mods-${TRAVIS_TAG}" &&
make push TAG="${PHP}-prod-${TRAVIS_TAG}" &&
make push TAG="${PHP}-work-${TRAVIS_TAG}";
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}";
make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${MY_TAG}" &&
make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${MY_TAG}" &&
make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${MY_TAG}" &&
make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${MY_TAG}" &&
make push TAG="${PHP}-base-${MY_TAG}" &&
make push TAG="${PHP}-mods-${MY_TAG}" &&
make push TAG="${PHP}-prod-${MY_TAG}" &&
make push TAG="${PHP}-work-${MY_TAG}";
fi
else
echo "Skipping push to dockerhub on normal branches";
fi
else
echo "Skipping push to dockerhub on PR";
fi

View File

@@ -4,6 +4,284 @@
## Unreleased
## Release 0.137
#### Fixed
- Fixed imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
#### Changed
- Ensured CI tests are platform agnostic (amd64 vs arm64)
- Ensured CI pipeline will work for long-running jobs
#### Removed
- Removed homebrew due to arm64 issues
- Removed postgres cmd client and apt repositories due to arm64 issues
- Removed mongodb cmd client and apt repositories due to arm64 issues
- Removed Ansible due to arm64 issues
## Release 0.136
#### Fixed
- Fixed `mongodb-org-shell` and `mongodb-org-tools` install
#### Added
- Re-added `mongodb` for PHP 5.3
#### Changed
- Switch PHP 5.4 base image to [devilbox/php-fpm-5.4](https://github.com/devilbox/docker-php-fpm-5.4) for potential arm64 support
- Switch PHP 5.5 base image to [devilbox/php-fpm-5.5](https://github.com/devilbox/docker-php-fpm-5.5) for potential arm64 support
- Changed base image back to Debian Jessie for PHP 5.2 and PHP 5.3
## Release 0.135
#### Fixed
- Fixed cloning of gitflow
- Fixed pidof issue on QUEMU by replacing it with pgrep [#854](https://github.com/cytopia/devilbox/issues/854)
#### Changed
- Changed PHP 5.2 and PHP 5.3 base images to Debian stretch
- Removed photoncms binaries (their GitHub organization went private)
- Removed `mongodb` extension from PHP 5.3 due to build errors
- Removed `ioncube` extension for PHP 5.2, PHP 5.3 and PHP 5.4 (arm64 only supported from PHP 5.5 onwards)
- Removed `codeception` from PHP 5.3
## Release 0.134
#### Changed
- Added extension `xdebug` to PHP 8.2
## Release 0.133
#### Added
- Added PHP 8.2: https://github.com/devilbox/docker-php-fpm-8.2
## 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

View File

@@ -44,15 +44,10 @@ RUN set -eux \
### Upgrade (install ps)
###
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
procps \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -44,15 +44,10 @@ RUN set -eux \
### Upgrade (install ps)
###
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
procps \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -1,5 +1,5 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM php:5.4-fpm
FROM devilbox/php-fpm-5.4
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -44,15 +44,10 @@ RUN set -eux \
### Upgrade (install ps)
###
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
procps \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -1,5 +1,5 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM php:5.5-fpm
FROM devilbox/php-fpm-5.5
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -44,15 +44,10 @@ RUN set -eux \
### Upgrade (install ps)
###
RUN set -eux \
&& rm -f /etc/apt/sources.list \
&& { \
echo "deb http://ftp.debian.org/debian jessie main"; \
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
} | tee /etc/apt/sources.list
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
procps \
&& rm -rf /var/lib/apt/lists/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,106 @@
# 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
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

@@ -0,0 +1,106 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-8.2
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.2-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.2-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.2-base"
###
### Envs
###
ENV MY_USER="devilbox" \
MY_GROUP="devilbox" \
MY_UID="1000" \
MY_GID="1000" \
PHP_VERSION="8.2"
###
### 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
dpkg-dev \
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.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.2.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.2' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]

View File

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

View File

@@ -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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,48 @@
; ############################################################
; # Devilbox PHP defaults for 8.2-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,8 @@ FROM devilbox/php-fpm:5.2-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
firebird-dev \
freetds-dev \
libbz2-dev \
@@ -26,24 +25,46 @@ RUN set -eux \
libmagic-dev \
libmcrypt-dev \
libmemcached-dev \
libmysqlclient-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librecode-dev \
libsasl2-dev \
libsnmp-dev \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
snmp \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -60,29 +81,12 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: ioncube --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install amqp-1.4.0 \
&& pecl install amqp-1.6.1 \
# Enabling
&& docker-php-ext-enable amqp \
&& true
@@ -150,29 +154,19 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: ftp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ftp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libpng.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -200,7 +194,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -231,7 +225,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -242,8 +236,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -292,6 +287,25 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: mysql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
# -------------------- Installing PHP Extension: oauth --------------------
RUN set -eux \
# Installation: Version specific
@@ -325,7 +339,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -340,6 +354,17 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
RUN set -eux \
# Installation: Generic
@@ -375,14 +400,6 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: recode --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
&& true
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Version specific
@@ -412,6 +429,16 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: soap --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& true
# -------------------- Installing PHP Extension: sockets --------------------
RUN set -eux \
# Installation: Generic
@@ -458,7 +485,7 @@ RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& true
@@ -561,6 +588,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -568,8 +597,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
libaspell15 \
libc-client2007e \
libenchant1c2a \
@@ -577,6 +606,7 @@ RUN set -eux \
libfreetype6 \
libicu52 \
libjpeg62-turbo \
libmagic1 \
libmcrypt4 \
libmemcachedutil2 \
libmysqlclient18 \
@@ -587,9 +617,11 @@ RUN set -eux \
libsybdb5 \
libtidy-0.99-0 \
libvpx1 \
libwebp5 \
libxpm4 \
libxslt1.1 \
snmp \
zlib1g \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -676,6 +708,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mhash$' \
&& php-fpm -m | grep -oiE '^mhash$' \
&& php -m | grep -oiE '^mongo$' \
&& php-fpm -m | grep -oiE '^mongo$' \
&& php -m | grep -oiE '^mysql$' \
@@ -764,6 +798,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.3-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
freetds-dev \
@@ -28,6 +27,7 @@ RUN set -eux \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libmysqlclient-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
@@ -40,14 +40,37 @@ RUN set -eux \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
snmp \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -64,23 +87,6 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: ioncube --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.3.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Version specific
@@ -151,24 +157,19 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: ftp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ftp --with-openssl-dir \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libpng.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -185,7 +186,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -206,7 +207,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -235,7 +236,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -244,18 +245,11 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: mbstring --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \
&& true
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -315,10 +309,21 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
# -------------------- Installing PHP Extension: mysql --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
@@ -337,19 +342,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -357,7 +370,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -387,7 +400,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -404,10 +417,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
@@ -558,12 +572,23 @@ RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -672,6 +697,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -679,8 +706,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
libaio1 \
libaspell15 \
libc-client2007e \
@@ -701,10 +728,13 @@ RUN set -eux \
libsybdb5 \
libtidy-0.99-0 \
libvpx1 \
libwebp5 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
snmp \
uuid \
zlib1g \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -716,7 +746,7 @@ RUN set -eux \
###
RUN set -eux \
# ---------- oci8 ----------
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -805,6 +835,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mhash$' \
&& php-fpm -m | grep -oiE '^mhash$' \
&& php -m | grep -oiE '^mongo$' \
&& php-fpm -m | grep -oiE '^mongo$' \
&& php -m | grep -oiE '^mongodb$' \
@@ -886,6 +918,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -907,6 +941,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.4-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
freetds-dev \
@@ -28,6 +27,7 @@ RUN set -eux \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libmysqlclient-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
@@ -40,14 +40,37 @@ RUN set -eux \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
snmp \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -64,23 +87,6 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: ioncube --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.4.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Version specific
@@ -107,7 +113,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install bcmath \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
&& true
@@ -115,7 +121,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install bz2 \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
&& true
@@ -123,7 +129,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install calendar \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
&& true
@@ -131,7 +137,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install dba \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
&& true
@@ -139,7 +145,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install enchant \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \
&& true
@@ -147,30 +153,25 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install exif \
&& true
# -------------------- Installing PHP Extension: ftp --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ftp --with-openssl-dir \
&& docker-php-ext-install ftp \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libpng.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-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
&& docker-php-ext-install gd \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -178,17 +179,17 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install gettext \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
&& true
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install gmp \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
&& true
@@ -206,12 +207,12 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/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 imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
@@ -219,7 +220,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install interbase \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
&& true
@@ -228,35 +229,28 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install intl \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
&& docker-php-ext-install ldap \
&& true
# -------------------- Installing PHP Extension: mbstring --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install mbstring \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
&& true
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
&& docker-php-ext-install mcrypt \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -319,15 +313,18 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install mysql \
# Custom: configure command
&& docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
&& docker-php-ext-install mysqli \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
@@ -345,27 +342,35 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install oci8 \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -388,17 +393,17 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pcntl \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
&& true
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pdo_dblib \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
&& true
@@ -406,17 +411,18 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pdo_firebird \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& true
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
&& docker-php-ext-install pdo_mysql \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
@@ -424,7 +430,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
&& true
@@ -432,7 +438,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pgsql \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
&& true
@@ -466,7 +472,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install pspell \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
&& true
@@ -496,7 +502,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install shmop \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
&& true
@@ -506,7 +512,7 @@ RUN set -eux \
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure snmp --with-openssl-dir \
&& docker-php-ext-install snmp \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true
@@ -516,7 +522,7 @@ RUN set -eux \
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
&& docker-php-ext-install soap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& true
@@ -524,7 +530,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install sockets \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
&& true
@@ -543,7 +549,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install sysvmsg \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
&& true
@@ -551,7 +557,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install sysvsem \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
&& true
@@ -559,7 +565,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install sysvshm \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
&& true
@@ -568,7 +574,7 @@ RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install tidy \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& true
@@ -577,19 +583,30 @@ RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure wddx --with-libxml-dir=/usr \
&& docker-php-ext-install wddx \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \
&& true
@@ -610,7 +627,7 @@ RUN set -eux \
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
&& docker-php-ext-install xmlrpc \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
&& true
@@ -618,7 +635,7 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install xsl \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
&& true
@@ -640,7 +657,7 @@ RUN set -eux \
# Custom: configure command
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
# Installation
&& docker-php-ext-install zip \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& true
@@ -691,6 +708,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -698,8 +717,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
libaio1 \
libaspell15 \
libc-client2007e \
@@ -720,10 +739,13 @@ RUN set -eux \
libsybdb5 \
libtidy-0.99-0 \
libvpx1 \
libwebp5 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
snmp \
uuid \
zlib1g \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -735,7 +757,7 @@ RUN set -eux \
###
RUN set -eux \
# ---------- oci8 ----------
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -824,6 +846,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mhash$' \
&& php-fpm -m | grep -oiE '^mhash$' \
&& php -m | grep -oiE '^mongo$' \
&& php-fpm -m | grep -oiE '^mongo$' \
&& php -m | grep -oiE '^mongodb$' \
@@ -907,6 +931,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -928,6 +954,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.5-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
freetds-dev \
@@ -30,6 +29,7 @@ RUN set -eux \
libmagickwand-dev \
libmcrypt-dev \
libmemcached-dev \
libmysqlclient-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
@@ -37,21 +37,42 @@ RUN set -eux \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librecode-dev \
libsasl2-dev \
libsnmp-dev \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp5 \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
snmp \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -74,7 +95,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.5.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -158,11 +179,16 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libjpeg.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libpng.* /usr/lib/ && \
ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ && \
mkdir /usr/include/freetype2/freetype && \
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
\
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --with-gd --with-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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -179,7 +205,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -222,7 +248,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -251,7 +277,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -262,8 +288,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -327,14 +354,17 @@ RUN set -eux \
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
@@ -353,19 +383,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -373,7 +411,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -400,7 +438,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -417,10 +455,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
@@ -475,14 +514,6 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: recode --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
&& true
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Version specific
@@ -590,12 +621,23 @@ RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -704,6 +746,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -711,8 +755,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \
libaspell15 \
@@ -740,6 +784,8 @@ RUN set -eux \
libxslt1.1 \
libyaml-0-2 \
snmp \
uuid \
zlib1g \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -762,7 +808,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -853,6 +899,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mhash$' \
&& php-fpm -m | grep -oiE '^mhash$' \
&& php -m | grep -oiE '^mongo$' \
&& php-fpm -m | grep -oiE '^mongo$' \
&& php -m | grep -oiE '^mongodb$' \
@@ -936,6 +984,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -957,6 +1007,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.6-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
freetds-dev \
@@ -28,6 +27,7 @@ RUN set -eux \
libkrb5-dev \
libldap2-dev \
libmagickwand-dev \
libmariadbclient-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
@@ -44,16 +44,37 @@ RUN set -eux \
libtidy-dev \
libvpx-dev \
libwebp-dev \
libwebp6 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
libzip-dev \
snmp \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -76,7 +97,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.6.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -174,11 +195,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Version specific pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# 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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -195,7 +216,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -238,7 +259,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -267,7 +288,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -278,8 +299,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -343,6 +365,8 @@ RUN set -eux \
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Default: configure command
&& docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
&& true
@@ -350,8 +374,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
@@ -370,19 +395,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -390,7 +423,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -417,7 +450,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -434,10 +467,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
@@ -607,12 +641,23 @@ RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -720,6 +765,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -727,8 +774,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \
libaspell15 \
@@ -757,6 +804,7 @@ RUN set -eux \
libyaml-0-2 \
libzip4 \
snmp \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -779,7 +827,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -870,6 +918,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mhash$' \
&& php-fpm -m | grep -oiE '^mhash$' \
&& php -m | grep -oiE '^mongo$' \
&& php-fpm -m | grep -oiE '^mongo$' \
&& php -m | grep -oiE '^mongodb$' \
@@ -953,6 +1003,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -974,6 +1026,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,46 +6,60 @@ FROM devilbox/php-fpm:7.0-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
fftw-dev \
firebird-dev \
freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \
libfftw3-dev \
libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \
libmariadbclient-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librecode-dev \
librsvg2-dev \
libsasl2-dev \
libsnmp-dev \
libssh2-1-dev \
libssl-dev \
libtidy-dev \
libtool \
libvpx-dev \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux2 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
@@ -53,9 +67,31 @@ RUN set -eux \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -78,7 +114,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.0.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -176,11 +212,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# 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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -197,7 +233,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -240,7 +276,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -269,7 +305,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -280,8 +316,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -299,10 +336,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
&& pecl install memcache-4.0.5.2 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
@@ -321,10 +358,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install mongodb \
&& pecl install mongodb-1.9.2 \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
@@ -332,8 +369,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
&& true
@@ -352,19 +390,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -372,7 +418,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -399,7 +445,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -416,10 +462,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_mysql --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
# Default: configure command
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
&& true
@@ -427,19 +474,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Generic
@@ -479,10 +534,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
&& pecl install psr-1.1.0 \
# Enabling
&& docker-php-ext-enable psr \
&& true
@@ -522,9 +577,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
@@ -645,20 +715,46 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -698,6 +794,17 @@ RUN set -eux \
&& 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
@@ -766,6 +873,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -773,37 +882,56 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \
libfftw3-3 \
libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu57 \
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.q16hdri-3 \
libmariadbclient18 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librecode0 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5 \
libvpx4 \
libwebp6 \
libwebpdemux2 \
libwebpmux2 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -826,7 +954,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -1004,6 +1132,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1018,6 +1150,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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$' \
@@ -1025,6 +1159,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,46 +6,61 @@ FROM devilbox/php-fpm:7.1-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
fftw-dev \
firebird-dev \
freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \
libfftw3-dev \
libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \
libib-util \
libicu-dev \
libimagequant-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \
libmariadb-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librecode-dev \
librsvg2-dev \
libsasl2-dev \
libsnmp-dev \
libssh2-1-dev \
libssl-dev \
libtidy-dev \
libtool \
libvpx-dev \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
@@ -53,9 +68,31 @@ RUN set -eux \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -78,7 +115,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.1.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -176,11 +213,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# 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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -197,7 +234,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -240,7 +277,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -259,8 +296,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true
@@ -268,7 +306,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -279,8 +317,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
&& true
@@ -298,10 +337,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
&& pecl install memcache-4.0.5.2 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
@@ -320,10 +359,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install mongodb \
&& pecl install mongodb-1.11.1 \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
@@ -351,19 +390,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -371,7 +418,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -398,7 +445,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -426,19 +473,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Generic
@@ -478,10 +533,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
&& pecl install psr-1.1.0 \
# Enabling
&& docker-php-ext-enable psr \
&& true
@@ -521,9 +576,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
@@ -611,10 +681,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: swoole --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Custom: Pecl command
&& yes yes | pecl install swoole \
# Default: Pecl command
&& pecl install swoole-4.4.26 \
# Enabling
&& docker-php-ext-enable swoole \
&& true
@@ -654,20 +724,46 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress-1.1.4 \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -680,10 +776,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install xdebug \
&& pecl install xdebug-2.9.8 \
# Enabling
&& docker-php-ext-enable xdebug \
&& true
@@ -707,6 +803,17 @@ RUN set -eux \
&& 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
@@ -775,6 +882,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -782,38 +891,57 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \
libfftw3-3 \
libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu63 \
libimagequant0 \
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.q16hdri-6 \
libmariadbd19 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librecode0 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -836,7 +964,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -1016,6 +1144,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1030,6 +1162,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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$' \
@@ -1037,6 +1171,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,46 +6,61 @@ FROM devilbox/php-fpm:7.2-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
fftw-dev \
firebird-dev \
freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \
libfftw3-dev \
libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \
libib-util \
libicu-dev \
libimagequant-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \
libmariadb-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librecode-dev \
librsvg2-dev \
libsasl2-dev \
libsnmp-dev \
libssh2-1-dev \
libssl-dev \
libtidy-dev \
libtool \
libvpx-dev \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
@@ -53,9 +68,31 @@ RUN set -eux \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -78,7 +115,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.2.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -176,11 +213,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# 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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -197,7 +234,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -240,7 +277,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -259,8 +296,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& true
@@ -268,7 +306,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -301,10 +339,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
&& pecl install memcache-4.0.5.2 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
@@ -354,19 +392,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -374,7 +420,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -401,7 +447,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -429,19 +475,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Version specific
@@ -463,10 +517,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install pdo_sqlsrv \
&& pecl install pdo_sqlsrv-5.8.1 \
# Enabling
&& docker-php-ext-enable pdo_sqlsrv \
&& true
@@ -482,10 +536,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
&& pecl install psr-1.1.0 \
# Enabling
&& docker-php-ext-enable psr \
&& true
@@ -525,9 +579,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
@@ -593,10 +662,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install sqlsrv \
&& pecl install sqlsrv-5.8.1 \
# Enabling
&& docker-php-ext-enable sqlsrv \
&& true
@@ -659,19 +728,45 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -711,6 +806,17 @@ RUN set -eux \
&& 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
@@ -779,6 +885,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -786,38 +894,57 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \
libfftw3-3 \
libfreetype6 \
libgif7 \
libglib2.0-0 \
libicu63 \
libimagequant0 \
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.q16hdri-6 \
libmariadbd19 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librecode0 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -840,7 +967,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -1022,6 +1149,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1036,6 +1167,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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$' \
@@ -1043,6 +1176,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,46 +6,60 @@ FROM devilbox/php-fpm:7.3-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
fftw-dev \
firebird-dev \
freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \
libfftw3-dev \
libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \
libib-util \
libicu-dev \
libimagequant-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \
libmariadb-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librecode-dev \
librsvg2-dev \
libsasl2-dev \
libsnmp-dev \
libssh2-1-dev \
libssl-dev \
libtidy-dev \
libtool \
libvpx-dev \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
@@ -53,9 +67,31 @@ RUN set -eux \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -78,7 +114,7 @@ RUN set -eux \
# 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 \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.3.so" "${EXTENSION_DIR}/ioncube.so" \
@@ -157,14 +193,6 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: enchant --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \
&& true
# -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \
# Installation: Generic
@@ -176,11 +204,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# 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
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -197,7 +225,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -240,7 +268,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -268,7 +296,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -301,10 +329,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
&& pecl install memcache-4.0.5.2 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
@@ -354,19 +382,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -374,7 +410,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -401,7 +437,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -429,19 +465,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Version specific
@@ -463,10 +507,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install pdo_sqlsrv \
&& pecl install pdo_sqlsrv-5.9.0 \
# Enabling
&& docker-php-ext-enable pdo_sqlsrv \
&& true
@@ -525,9 +569,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
@@ -593,10 +652,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sqlsrv --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install sqlsrv \
&& pecl install sqlsrv-5.9.0 \
# Enabling
&& docker-php-ext-enable sqlsrv \
&& true
@@ -659,19 +718,45 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -711,6 +796,17 @@ RUN set -eux \
&& 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
@@ -779,6 +875,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -786,38 +884,56 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \
libfftw3-3 \
libfreetype6 \
libicu63 \
libgif7 \
libglib2.0-0 \
libicu67 \
libimagequant0 \
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.q16hdri-6 \
libmariadbd19 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librecode0 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libwebp-dev \
libvpx6 \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -840,7 +956,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -885,8 +1001,6 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^dba$' \
&& php -m | grep -oiE '^dom$' \
&& php-fpm -m | grep -oiE '^dom$' \
&& php -m | grep -oiE '^enchant$' \
&& php-fpm -m | grep -oiE '^enchant$' \
&& php -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^fileinfo$' \
@@ -1022,6 +1136,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1036,6 +1154,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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$' \
@@ -1043,6 +1163,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,55 +6,92 @@ FROM devilbox/php-fpm:7.4-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
fftw-dev \
firebird-dev \
freetds-dev \
ghostscript \
gobject-introspection \
gtk-doc-tools \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libexif-dev \
libexpat1-dev \
libfbclient2 \
libffi-dev \
libfftw3-dev \
libfreetype6-dev \
libgif-dev \
libglib2.0-dev \
libgmp-dev \
libib-util \
libicu-dev \
libimagequant-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagick++-dev \
libmagickcore-6.q16-dev \
libmagickwand-dev \
libmariadb-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpoppler-glib-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
librsvg2-dev \
libsasl2-dev \
libsnmp-dev \
libssh2-1-dev \
libssl-dev \
libtidy-dev \
libtool \
libvpx-dev \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -71,6 +108,23 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: ioncube --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_$(dpkg-architecture --query DEB_HOST_GNU_CPU | sed 's/_/-/g').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 --------------------
RUN set -eux \
# Installation: Generic
@@ -139,14 +193,6 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: enchant --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \
&& true
# -------------------- Installing PHP Extension: exif --------------------
RUN set -eux \
# Installation: Generic
@@ -158,28 +204,19 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ffi --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \
&& cd /tmp/ffi \
# Custom: Install command
&& phpize \
&& ./configure --with-ffi \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable ffi \
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ffi \
&& true
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv \
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -196,7 +233,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
@@ -239,7 +276,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -259,7 +296,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -270,7 +307,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mcrypt \
@@ -292,10 +329,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
&& pecl install memcache-4.0.5.2 \
# Enabling
&& docker-php-ext-enable memcache \
&& true
@@ -349,19 +386,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -369,7 +414,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -396,7 +441,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -424,19 +469,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Version specific
@@ -456,6 +509,17 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -501,9 +565,24 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install redis \
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& REDIS_ARGS=""; \
if [ -d "/usr/local/include/php/ext/igbinary" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
fi; \
if [ -d "/usr/local/include/php/ext/msgpack" ]; then \
REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
fi; \
phpize \
&& ./configure --enable-redis ${REDIS_ARGS} \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
# Enabling
&& docker-php-ext-enable redis \
&& true
@@ -532,6 +611,8 @@ RUN set -eux \
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure snmp --with-snmp \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true
@@ -541,6 +622,8 @@ RUN set -eux \
RUN set -eux \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure soap --enable-soap \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& true
@@ -565,6 +648,17 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -622,19 +716,45 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Default: Install command
&& phpize \
&& ./configure --enable-uploadprogress \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -665,6 +785,17 @@ RUN set -eux \
&& 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
@@ -734,6 +865,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -741,37 +874,56 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
fftw2 \
ghostscript \
gir1.2-poppler-0.18 \
imagemagick-6.q16 \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libexif12 \
libexpat1 \
libfbclient2 \
libffi6 \
libffi7 \
libfftw3-3 \
libfreetype6 \
libicu63 \
libgif7 \
libglib2.0-0 \
libicu67 \
libimagequant0 \
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.q16hdri-6 \
libmariadbd19 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libwebp-dev \
libvpx6 \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -794,7 +946,7 @@ RUN set -eux \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
# ---------- 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -839,8 +991,6 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^dba$' \
&& php -m | grep -oiE '^dom$' \
&& php-fpm -m | grep -oiE '^dom$' \
&& php -m | grep -oiE '^enchant$' \
&& php-fpm -m | grep -oiE '^enchant$' \
&& php -m | grep -oiE '^exif$' \
&& php-fpm -m | grep -oiE '^exif$' \
&& php -m | grep -oiE '^ffi$' \
@@ -917,6 +1067,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \
&& php -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-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \
@@ -954,6 +1106,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^solr$' \
&& php -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-fpm -m | grep -oiE '^ssh2$' \
&& php -m | grep -oiE '^swoole$' \
@@ -970,6 +1124,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \
@@ -982,6 +1140,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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$' \
@@ -989,6 +1149,13 @@ RUN set -eux \
&& 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
###

View File

@@ -6,15 +6,17 @@ FROM devilbox/php-fpm:8.0-base as builder
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
alien \
firebird-dev \
freetds-dev \
ghostscript \
libaio-dev \
libbz2-dev \
libenchant-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-2-dev \
libevent-dev \
libfbclient2 \
libfreetype6-dev \
@@ -22,11 +24,19 @@ RUN set -eux \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagickwand-dev \
libmariadb-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
librabbitmq-dev \
librdkafka-dev \
libsasl2-dev \
libsnmp-dev \
libsodium-dev \
@@ -37,11 +47,35 @@ RUN set -eux \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
libzip-dev \
snmp \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
# Build tools
autoconf \
bison \
bisonc++ \
ca-certificates \
git
curl \
dpkg-dev \
file \
flex \
g++ \
gcc \
git \
lemon \
libc-client-dev \
libc-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
patch \
pkg-config \
re2c \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
@@ -58,6 +92,28 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
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 --------------------
RUN set -eux \
# Installation: Generic
@@ -66,6 +122,20 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -109,11 +179,11 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gd --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libXpm.* /usr/lib/ \
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv \
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& true
@@ -130,13 +200,58 @@ RUN set -eux \
# -------------------- Installing PHP Extension: gmp --------------------
RUN set -eux \
# Generic pre-command
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& ln /usr/include/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/gmp.h /usr/include/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
&& true
# -------------------- Installing PHP Extension: igbinary --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install igbinary \
# Enabling
&& docker-php-ext-enable igbinary \
&& true
# -------------------- Installing PHP Extension: 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/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Generic
@@ -148,7 +263,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libldap* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
@@ -157,6 +272,39 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: mcrypt --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mcrypt \
# Enabling
&& docker-php-ext-enable mcrypt \
&& true
# -------------------- Installing PHP Extension: msgpack --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install msgpack \
# Enabling
&& docker-php-ext-enable msgpack \
&& true
# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
# Enabling
&& docker-php-ext-enable memcache \
&& true
# -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \
# Installation: Version specific
@@ -179,6 +327,17 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mongodb \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
# -------------------- Installing PHP Extension: mysqli --------------------
RUN set -eux \
# Installation: Generic
@@ -187,22 +346,41 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: oauth --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install oauth \
# Enabling
&& docker-php-ext-enable oauth \
&& true
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
\
# Installation: Generic
# Type: Built-in extension
@@ -210,7 +388,7 @@ RUN set -eux \
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
# Generic post-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -237,7 +415,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_dblib --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
@@ -265,19 +443,27 @@ RUN set -eux \
# -------------------- Installing PHP Extension: pdo_oci --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
\
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& alien \
-v \
--target=$( dpkg --print-architecture ) \
-i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture \
--query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.$(dpkg-architecture --query DEB_HOST_GNU_CPU).rpm \
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\
# Installation: Version specific
@@ -297,6 +483,17 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -305,6 +502,17 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
# Enabling
&& docker-php-ext-enable psr \
&& true
# -------------------- Installing PHP Extension: pspell --------------------
RUN set -eux \
# Installation: Generic
@@ -315,20 +523,22 @@ RUN set -eux \
# -------------------- Installing PHP Extension: redis --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
# Custom: Install command
&& sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \
&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \
&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \
&& sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \
&& phpize \
&& ./configure --enable-redis \
&& 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 \
\
@@ -337,6 +547,17 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -367,6 +588,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: sockets --------------------
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
# Type: Built-in extension
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
@@ -381,6 +606,39 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -413,17 +671,34 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
# Enabling
&& docker-php-ext-enable uploadprogress \
&& 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: xdebug --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/xdebug/xdebug /tmp/xdebug \
&& cd /tmp/xdebug \
# Default: Install command
&& phpize \
&& ./configure --enable-xdebug \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install xdebug \
# Enabling
&& docker-php-ext-enable xdebug \
&& true
@@ -437,6 +712,28 @@ RUN set -eux \
&& 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 --------------------
RUN set -eux \
# Installation: Generic
@@ -494,6 +791,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-mods"
ARG EXT_DIR
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
@@ -501,27 +800,38 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \
libaspell15 \
libenchant1c2a \
libc-client2007e \
libenchant-2-2 \
libfbclient2 \
libffi6 \
libffi7 \
libfreetype6 \
libicu63 \
libicu67 \
libjpeg62-turbo \
libmagickwand-6.q16-6 \
libmariadbd19 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpq5 \
librabbitmq4 \
librdkafka1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libvpx6 \
libwebp6 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
uuid \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -532,8 +842,19 @@ RUN set -eux \
### Post Install
###
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 ----------
&& 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/$(dpkg-architecture --query DEB_HOST_GNU_CPU)/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
@@ -560,6 +881,10 @@ RUN set -eux \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& 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-fpm -m | grep -oiE '^bcmath$' \
&& php -m | grep -oiE '^bz2$' \
@@ -596,6 +921,12 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^hash$' \
&& php -m | grep -oiE '^iconv$' \
&& php-fpm -m | grep -oiE '^iconv$' \
&& php -m | grep -oiE '^igbinary$' \
&& php-fpm -m | grep -oiE '^igbinary$' \
&& php -m | grep -oiE '^imagick$' \
&& php-fpm -m | grep -oiE '^imagick$' \
&& php -m | grep -oiE '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \
@@ -606,12 +937,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^libxml$' \
&& php -m | grep -oiE '^mbstring$' \
&& php-fpm -m | grep -oiE '^mbstring$' \
&& php -m | grep -oiE '^mcrypt$' \
&& php-fpm -m | grep -oiE '^mcrypt$' \
&& php -m | grep -oiE '^msgpack$' \
&& php-fpm -m | grep -oiE '^msgpack$' \
&& php -m | grep -oiE '^memcache$' \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mongodb$' \
&& php-fpm -m | grep -oiE '^mongodb$' \
&& php -m | grep -oiE '^mysqli$' \
&& php-fpm -m | grep -oiE '^mysqli$' \
&& php -m | grep -oiE '^mysqlnd$' \
&& php-fpm -m | grep -oiE '^mysqlnd$' \
&& php -m | grep -oiE '^oauth$' \
&& php-fpm -m | grep -oiE '^oauth$' \
&& php -m | grep -oiE '^oci8$' \
&& php-fpm -m | grep -oiE '^oci8$' \
&& php -m | grep -oiE '^Zend Opcache$' \
@@ -636,8 +977,12 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \
&& php -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-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \
&& php-fpm -m | grep -oiE '^psr$' \
&& php -m | grep -oiE '^phar$' \
&& php-fpm -m | grep -oiE '^phar$' \
&& php -m | grep -oiE '^posix$' \
@@ -649,6 +994,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^redis$' \
&& php -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-fpm -m | grep -oiE '^session$' \
&& php -m | grep -oiE '^shmop$' \
@@ -663,8 +1010,14 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^sockets$' \
&& php -m | grep -oiE '^sodium$' \
&& php-fpm -m | grep -oiE '^sodium$' \
&& php -m | grep -oiE '^solr$' \
&& php-fpm -m | grep -oiE '^solr$' \
&& php -m | grep -oiE '^spl$' \
&& php-fpm -m | grep -oiE '^spl$' \
&& php -m | grep -oiE '^sqlsrv$' \
&& php-fpm -m | grep -oiE '^sqlsrv$' \
&& php -m | grep -oiE '^swoole$' \
&& php-fpm -m | grep -oiE '^swoole$' \
&& php -m | grep -oiE '^sysvmsg$' \
&& php-fpm -m | grep -oiE '^sysvmsg$' \
&& php -m | grep -oiE '^sysvsem$' \
@@ -675,6 +1028,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^tidy$' \
&& php -m | grep -oiE '^tokenizer$' \
&& php-fpm -m | grep -oiE '^tokenizer$' \
&& php -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$' \
@@ -685,11 +1042,22 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -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-fpm -m | grep -oiE '^zip$' \
&& true
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Ports
###

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
@@ -36,12 +35,17 @@ RUN set -eux \
rsyslog \
socat \
supervisor \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -0,0 +1,101 @@
# 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
cron \
rsyslog \
socat \
supervisor \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& 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

@@ -0,0 +1,101 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
FROM devilbox/php-fpm:8.2-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.2-prod"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.2-prod"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.2-prod"
###
### Install
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
locales-all \
postfix \
postfix-pcre \
cron \
rsyslog \
socat \
supervisor \
&& rm -rf /var/lib/apt/lists/* \
\
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
\
# Setup Supervisor
&& 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.2' \
&& /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

@@ -88,6 +88,7 @@ set_postfix() {
# 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 "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}"
run "newaliases" "${debug}"

View File

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

View File

@@ -29,15 +29,15 @@ MAILPID="/var/spool/postfix/pid/master.pid"
###
### Sanity checks
###
if ! command -v pidof >/dev/null 2>&1; then
echo "pidof is required for cleaning up tail command."
if ! command -v pgrep >/dev/null 2>&1; then
echo "pgrep is required for cleaning up tail command."
exit 1
fi
# Give rsyslogd some time to start up
sleep 2
if ! pidof rsyslogd >/dev/null 2>&1; then
if ! pgrep rsyslogd >/dev/null 2>&1; then
echo "rsyslogd is not running, but required for mail logging."
exit 1
fi

View File

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

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:5.2-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,28 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS -L --fail "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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +96,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +108,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +130,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,6 +137,20 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
@@ -138,7 +162,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -170,7 +194,7 @@ RUN set -eux \
\
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -181,22 +205,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -223,26 +237,30 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& 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 \
\
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- cleanup --------------------
@@ -386,9 +404,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -410,7 +425,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -450,16 +468,14 @@ RUN set -eux \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
\
# -------------------- 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]+$' \
\
@@ -491,6 +507,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:5.3-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,28 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS -L --fail "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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +96,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +108,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +130,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +137,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +170,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -178,7 +207,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -187,7 +216,7 @@ RUN set -eux \
\
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -198,22 +227,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -252,42 +271,46 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -336,12 +359,8 @@ RUN set -eux \
### Install Composer (PHP)
###
RUN set -eux \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require codeception/codeception \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/* \
@@ -442,9 +461,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -466,7 +482,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -508,7 +527,6 @@ RUN set -eux \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& git-flow version | grep -E '[0-9][.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][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -516,14 +534,12 @@ RUN set -eux \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -555,6 +571,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:5.4-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,28 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS -L --fail "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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +96,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +108,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +130,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +137,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +170,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +202,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +211,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +225,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -205,7 +234,7 @@ RUN set -eux \
\
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -227,22 +256,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -281,51 +300,55 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- cleanup --------------------
@@ -371,11 +394,11 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/* \
@@ -476,9 +499,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -500,7 +520,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -545,7 +568,6 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -554,14 +576,13 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -593,6 +614,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:5.5-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,28 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS -L --fail "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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +96,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +108,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +130,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +137,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +170,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +202,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +211,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +225,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -205,12 +234,12 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -232,22 +261,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -287,51 +306,55 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- cleanup --------------------
@@ -377,23 +400,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -494,9 +513,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -518,7 +534,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -564,7 +583,6 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -573,17 +591,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -615,6 +631,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:5.6-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,7 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
zsh-common \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +139,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +172,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +204,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +213,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +227,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -210,7 +241,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' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
@@ -219,12 +250,12 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +277,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -301,47 +322,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 libxfont1 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -391,23 +416,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -505,9 +526,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -529,7 +547,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -576,7 +597,6 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -585,17 +605,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -627,6 +645,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:7.0-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,7 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
zsh-common \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +139,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +172,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +204,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +213,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +227,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -204,27 +235,8 @@ RUN set -eux \
&& 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 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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 --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +258,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -301,47 +303,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 libxfont1 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -391,23 +397,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -505,9 +507,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -529,7 +528,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -571,12 +573,9 @@ RUN set -eux \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -585,17 +584,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -627,6 +624,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:7.1-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +138,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +171,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +203,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +212,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +226,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -204,27 +234,8 @@ RUN set -eux \
&& 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 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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 --------------------
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +257,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -301,47 +302,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -391,23 +396,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -489,7 +490,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \
\
# -------------------- mdl --------------------
&& gem install mdl \
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
@@ -505,9 +506,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -529,7 +527,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -571,12 +572,9 @@ RUN set -eux \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -585,17 +583,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -627,6 +623,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:7.2-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,12 +138,31 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
@@ -141,7 +171,7 @@ RUN set -eux \
&& 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 | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/pip/2.7/get-pip.py | python \
\
\
# -------------------- nvm --------------------
@@ -173,7 +203,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +212,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +226,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -210,7 +240,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' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
@@ -224,7 +254,7 @@ RUN set -eux \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +276,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -302,47 +322,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -392,23 +416,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -490,7 +510,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \
\
# -------------------- mdl --------------------
&& gem install mdl \
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
@@ -506,9 +526,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -530,7 +547,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -577,7 +597,6 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -586,17 +605,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -628,6 +645,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:7.3-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,21 +138,41 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& 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 \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\
\
# -------------------- nvm --------------------
@@ -173,7 +204,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +213,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +227,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -210,7 +241,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' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
@@ -224,7 +255,7 @@ RUN set -eux \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +277,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -302,47 +323,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- php-cs-fixer --------------------
&& curl -sS -L --fail https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
&& 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 \
\
\
# -------------------- phpmd --------------------
&& curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -392,23 +417,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -490,7 +511,7 @@ RUN set -eux \
&& gem install rb-inotify -v 0.9.10 \
\
# -------------------- mdl --------------------
&& gem install mdl \
&& gem install mdl -v 0.5.0 \
\
\
&& rm -rf /root/.gem \
@@ -506,9 +527,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -530,7 +548,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -577,7 +598,6 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
@@ -586,17 +606,15 @@ RUN set -eux \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -628,6 +646,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:7.4-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,21 +138,41 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& 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 \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\
\
# -------------------- nvm --------------------
@@ -173,7 +204,7 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- drush7 --------------------
@@ -182,7 +213,7 @@ RUN set -eux \
&& git checkout 7.4.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
&& rm -rf /usr/local/src/drush7/.git \
&& rm -rf /usr/local/src/drush7/docs \
@@ -196,7 +227,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' ) \
\
&& 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_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
&& rm -rf /usr/local/src/drush8/.git \
&& rm -rf /usr/local/src/drush8/docs \
@@ -210,7 +241,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' ) \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress' \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-1 install --no-interaction --no-progress' \
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
&& rm -rf /usr/local/src/drush9/.git \
&& rm -rf /usr/local/src/drush9/docs \
@@ -224,7 +255,7 @@ RUN set -eux \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
@@ -246,22 +277,12 @@ RUN set -eux \
&& 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -302,42 +323,51 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -387,23 +417,19 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- asgardcms --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- codeception --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- lumen --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/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/ \
\
# -------------------- photon --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -501,9 +527,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -525,7 +548,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -572,25 +598,23 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
&& photon --version | grep -E 'Installer [0-9][.0-9]+' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
@@ -622,6 +646,13 @@ RUN set -eux \
&& (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
###

View File

@@ -2,6 +2,7 @@
FROM devilbox/php-fpm:8.0-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### Labels
@@ -22,6 +23,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-work"
###
### Re-activate modules which have been deactivated in mods.
### NOTE: They will be removed at the very bottom
###
RUN set -eux \
&& if find /usr/local/lib/php/extensions/ -name phalcon.so | grep phalcon; then \
echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini; \
fi \
&& if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \
echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \
fi
###
### Envs
###
@@ -32,27 +46,25 @@ ENV BASH_PROFILE=".bashrc"
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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" 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 \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
&& curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& 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 -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
ack-grep \
aspell \
autoconf \
@@ -85,9 +97,8 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
@@ -98,13 +109,14 @@ RUN set -eux \
openssh-client \
patch \
patchelf \
postgresql-client \
# postgresql-client \
redis-tools \
rsync \
rubygems \
ruby-dev \
shellcheck \
silversearcher-ag \
sqlite3 \
subversion \
sudo \
tig \
@@ -119,7 +131,6 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
@@ -127,21 +138,41 @@ RUN set -eux \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### Install custom software
###
RUN set -eux \
# -------------------- composer --------------------
&& curl -sS -L --fail 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 --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& 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 \
&& rm -rf /var/lib/apt/lists/* \
\
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python \
&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python3 \
\
\
# -------------------- nvm --------------------
@@ -173,37 +204,38 @@ RUN set -eux \
\
\
# -------------------- deployer --------------------
&& curl -sS -L --fail 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 \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& git clone https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
\
# -------------------- 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 \
\
\
# -------------------- 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 --------------------
&& 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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- mysqldumpsecure --------------------
@@ -230,37 +262,46 @@ RUN set -eux \
\
\
# -------------------- phpcs --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- phpcbf --------------------
&& curl -sS -L --fail 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 \
\
\
# -------------------- 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 -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& 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 \
&& curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- wpcli --------------------
@@ -405,9 +446,6 @@ RUN set -eux \
### Install pip (Python) packages
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
@@ -429,7 +467,10 @@ RUN set -eux \
###
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 ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -470,20 +511,20 @@ RUN set -eux \
&& 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]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[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.+\)" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& 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]+$' \
\
@@ -515,6 +556,13 @@ RUN set -eux \
&& (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
###

View File

@@ -0,0 +1,602 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:8.1-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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 \
&& 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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 \
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 \
&& 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)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### 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 https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
\
# -------------------- 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 --------------------
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- 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_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 )" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- 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 \
# -------------------- 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]+' \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& 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

@@ -0,0 +1,584 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:8.2-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
ARG ARCH
###
### 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.2-work"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.2-work"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.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
###
ENV BASH_PROFILE=".bashrc"
###
### Install Tools
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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 \
&& 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 \
&& DEBIAN_FRONTEND=noninteractive apt-get install -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 \
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 \
&& 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)
###
### Instal Architecture Dependent software
###
#RUN set -eux \
# && if [ "${ARCH}" = "linux/amd64" ]; then \
# DEBIAN_FRONTEND=noninteractive apt-get update \
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
# mongodb-org-shell \
# mongodb-org-tools; \
# fi \
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
# && rm -rf /var/lib/apt/lists/*
###
### 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 https://github.com/petervanderdoes/gitflow-avh /tmp/gitflow \
&& cd /tmp/gitflow \
&& make install \
&& cd / && rm -rf /tmp/gitflow \
\
\
# -------------------- linkcheck --------------------
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
\
\
# -------------------- mhsendmail --------------------
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
\
# -------------------- 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 \
\
\
# -------------------- 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_$(dpkg-architecture --query DEB_HOST_ARCH)" > /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 )" \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
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; \
fi \
\
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*; \
fi \
\
\
# -------------------- 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 \
# -------------------- 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.2' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& 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.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.2.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

@@ -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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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