Compare commits

...

114 Commits
0.105 ... 0.124

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

Signed-off-by: Anatoli Nicolae <desk@anatolinicolae.com>
2020-01-29 15:09:56 +01:00
95 changed files with 6112 additions and 2408 deletions

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

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

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

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

View File

@@ -1,27 +1,55 @@
---
###
### Lints all generic and json files in the whole git repository
###
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: lint
name: Linting
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
# 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 workflow
run: |
make lint-workflow
- 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 }}

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -60,10 +60,18 @@ set_uid() {
fi
# Change uid and fix homedir permissions
log "info" "Changing user '${username}' uid to: ${uid}" "${debug}"
run "usermod -u ${uid} ${username}" "${debug}"
run "chown -R ${username} ${homedir} || 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

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

@@ -172,7 +172,7 @@ ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype
# 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
@@ -242,8 +242,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
@@ -455,7 +456,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
@@ -561,6 +562,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/
@@ -764,6 +767,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

@@ -168,7 +168,7 @@ RUN set -eux \
# 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
@@ -254,8 +254,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
@@ -555,7 +556,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
@@ -672,6 +673,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/
@@ -907,6 +910,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

@@ -168,7 +168,7 @@ RUN set -eux \
# 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 \
&& true
@@ -254,8 +254,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 mcrypt \
&& true
@@ -574,7 +575,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
@@ -691,6 +692,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/
@@ -928,6 +931,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

@@ -12,6 +12,7 @@ RUN set -eux \
alien \
firebird-dev \
freetds-dev \
ghostscript \
libaio-dev \
libbz2-dev \
libc-client-dev \
@@ -26,6 +27,7 @@ RUN set -eux \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmagickwand-dev \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
@@ -41,6 +43,7 @@ RUN set -eux \
libssl-dev \
libtidy-dev \
libvpx-dev \
libwebp5 \
libxml2-dev \
libxpm-dev \
libxslt-dev \
@@ -159,7 +162,7 @@ RUN set -eux \
# 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
@@ -194,6 +197,28 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: imagick --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install imagick \
# Enabling
&& docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
@@ -237,8 +262,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
@@ -562,7 +588,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
@@ -679,6 +705,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/
@@ -688,6 +716,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \
libaspell15 \
libc-client2007e \
@@ -696,6 +725,7 @@ RUN set -eux \
libfreetype6 \
libicu52 \
libjpeg62-turbo \
libmagickwand-6.q16-2 \
libmcrypt4 \
libmemcachedutil2 \
libmysqlclient18 \
@@ -708,6 +738,7 @@ RUN set -eux \
libsybdb5 \
libtidy-0.99-0 \
libvpx1 \
libwebp5 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
@@ -722,6 +753,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -790,6 +832,8 @@ RUN set -eux \
&& 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 '^interbase$' \
@@ -916,6 +960,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

@@ -12,6 +12,7 @@ RUN set -eux \
alien \
firebird-dev \
freetds-dev \
ghostscript \
libaio-dev \
libbz2-dev \
libc-client-dev \
@@ -177,7 +178,7 @@ RUN set -eux \
# 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
@@ -220,6 +221,17 @@ RUN set -eux \
&& 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
@@ -266,8 +278,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
@@ -318,10 +331,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.7.5 \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
@@ -592,7 +605,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install uploadprogress \
@@ -708,6 +721,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/
@@ -717,6 +732,7 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ghostscript \
libaio1 \
libaspell15 \
libc-client2007e \
@@ -754,6 +770,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -950,6 +977,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

@@ -10,41 +10,57 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
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 \
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 \
@@ -179,7 +195,7 @@ RUN set -eux \
# 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
@@ -222,6 +238,17 @@ RUN set -eux \
&& 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
@@ -268,8 +295,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
@@ -287,10 +315,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
@@ -510,9 +538,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
@@ -633,7 +676,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
@@ -647,6 +690,26 @@ RUN set -eux \
&& 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
@@ -686,12 +749,23 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: yaml --------------------
# -------------------- Installing PHP Extension: xlswriter --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml \
&& pecl install xlswriter \
# Enabling
&& docker-php-ext-enable xlswriter \
&& true
# -------------------- Installing PHP Extension: yaml --------------------
RUN set -eux \
# Installation: Version specific
# Type: PECL extension
# Default: Pecl command
&& pecl install yaml-2.0.4 \
# Enabling
&& docker-php-ext-enable yaml \
&& true
@@ -754,6 +828,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/
@@ -763,28 +839,46 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -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 \
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 \
@@ -801,6 +895,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -980,6 +1085,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 '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -994,6 +1101,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$' \
@@ -1001,6 +1110,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

@@ -10,41 +10,58 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
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 \
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 \
@@ -179,7 +196,7 @@ RUN set -eux \
# 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
@@ -222,6 +239,17 @@ RUN set -eux \
&& 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
@@ -267,8 +295,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
@@ -286,10 +315,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
@@ -509,9 +538,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
@@ -599,10 +643,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
@@ -642,7 +686,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
@@ -656,6 +700,26 @@ RUN set -eux \
&& 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
@@ -668,10 +732,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
@@ -695,6 +759,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
@@ -763,6 +838,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/
@@ -772,29 +849,48 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -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 \
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 \
@@ -811,6 +907,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -992,6 +1099,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 '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1006,6 +1115,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$' \
@@ -1013,6 +1124,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

@@ -10,41 +10,58 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
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 \
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 \
@@ -179,7 +196,7 @@ RUN set -eux \
# 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
@@ -222,6 +239,17 @@ RUN set -eux \
&& 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
@@ -289,10 +317,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
@@ -451,10 +479,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
@@ -513,9 +541,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
@@ -581,10 +624,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
@@ -646,7 +689,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
@@ -660,6 +703,26 @@ RUN set -eux \
&& 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
@@ -699,6 +762,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
@@ -767,6 +841,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/
@@ -776,29 +852,48 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -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 \
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 \
@@ -815,6 +910,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -998,6 +1104,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 '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1012,6 +1120,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$' \
@@ -1019,6 +1129,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

@@ -10,41 +10,58 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
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 \
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 \
@@ -179,7 +196,7 @@ RUN set -eux \
# 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
@@ -222,6 +239,17 @@ RUN set -eux \
&& 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
@@ -289,10 +317,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
@@ -513,9 +541,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
@@ -646,7 +689,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
@@ -660,6 +703,26 @@ RUN set -eux \
&& 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
@@ -699,6 +762,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
@@ -767,6 +841,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/
@@ -776,29 +852,48 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -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 \
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 \
@@ -815,6 +910,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -998,6 +1104,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 '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^wddx$' \
&& php-fpm -m | grep -oiE '^wddx$' \
&& php -m | grep -oiE '^xdebug$' \
@@ -1012,6 +1120,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$' \
@@ -1019,6 +1129,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

@@ -10,45 +10,65 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
alien \
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 \
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 \
zlib1g-dev \
ca-certificates \
git
@@ -68,6 +88,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_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.4.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& true
# -------------------- Installing PHP Extension: amqp --------------------
RUN set -eux \
# Installation: Generic
@@ -176,7 +213,7 @@ RUN set -eux \
# 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
@@ -219,6 +256,29 @@ RUN set -eux \
&& pecl install imagick \
# Enabling
&& docker-php-ext-enable imagick \
# Generic post-command
&& sed -i'' 's|.*"thread".*| <policy domain="resource" name="thread" value="1"/>|g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS2".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS3".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"EPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PDF".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"XPS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="coder".*"PS".*||g' /etc/ImageMagick-6/policy.xml \
&& sed -i'' 's|.*<policy domain="delegate".*pattern="gs".*||g' /etc/ImageMagick-6/policy.xml \
\
&& true
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
@@ -244,7 +304,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 \
@@ -266,10 +326,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
@@ -475,9 +535,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
@@ -504,10 +579,9 @@ RUN set -eux \
# -------------------- Installing PHP Extension: snmp --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure snmp --with-openssl-dir \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& true
@@ -540,6 +614,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
@@ -596,7 +681,7 @@ RUN set -eux \
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
@@ -610,6 +695,26 @@ RUN set -eux \
&& 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
@@ -640,6 +745,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
@@ -709,6 +825,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/
@@ -718,33 +836,54 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -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 \
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 \
libmcrypt4 \
libmemcachedutil2 \
libnghttp2-14 \
libpng16-16 \
libpoppler-glib8 \
libpq5 \
librabbitmq4 \
librdkafka1 \
librsvg2-2 \
libssh2-1 \
libsybdb5 \
libtidy5deb1 \
libvpx5 \
libwebp-dev \
libwebp6 \
libwebpdemux2 \
libwebpmux3 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
unixodbc \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -755,6 +894,17 @@ 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_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
@@ -827,6 +977,8 @@ RUN set -eux \
&& 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$' \
@@ -914,6 +1066,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$' \
@@ -930,6 +1084,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 '^vips$' \
&& php-fpm -m | grep -oiE '^vips$' \
&& php -m | grep -oiE '^xdebug$' \
&& php-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \
@@ -942,6 +1098,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$' \
@@ -949,6 +1107,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

@@ -14,6 +14,8 @@ RUN set -eux \
freetds-dev \
libaio-dev \
libbz2-dev \
libc-client-dev \
libcurl4-openssl-dev \
libenchant-dev \
libevent-dev \
libfbclient2 \
@@ -22,8 +24,11 @@ RUN set -eux \
libib-util \
libicu-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmcrypt-dev \
libmemcached-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
@@ -37,6 +42,7 @@ RUN set -eux \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libyaml-dev \
libzip-dev \
snmp \
zlib1g-dev \
@@ -58,6 +64,17 @@ RUN set -eux \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
fi
# -------------------- Installing PHP Extension: apcu --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install apcu \
# Enabling
&& docker-php-ext-enable apcu \
&& true
# -------------------- Installing PHP Extension: bcmath --------------------
RUN set -eux \
# Installation: Generic
@@ -66,6 +83,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
@@ -113,7 +144,7 @@ RUN set -eux \
# 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
@@ -137,6 +168,29 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: igbinary --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install igbinary \
# Enabling
&& docker-php-ext-enable igbinary \
&& true
# -------------------- Installing PHP Extension: imap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
&& true
# -------------------- Installing PHP Extension: intl --------------------
RUN set -eux \
# Installation: Generic
@@ -157,6 +211,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
@@ -181,41 +268,10 @@ RUN set -eux \
# -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \
&& cd /tmp/mongodb \
# Custom: Install command
&& git checkout v1.6 \
&& git submodule update --init \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \
&& sed -i'' 's/TSRMLS_SET_CTX(ctx);/\/\/TSRMLS_SET_CTX(ctx);/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' phongo_compat.h \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' src/bson.c \
\
&& sed -i'' 's/php_phongo_handler_binary.compare_objects.*//g' src/BSON/Binary.c \
&& sed -i'' 's/php_phongo_handler_dbpointer.compare_objects.*//g' src/BSON/DBPointer.c \
&& sed -i'' 's/php_phongo_handler_int64.compare_objects.*//g' src/BSON/Int64.c \
&& sed -i'' 's/php_phongo_handler_javascript.compare_objects.*//g' src/BSON/Javascript.c \
&& sed -i'' 's/php_phongo_handler_objectid.compare_objects.*//g' src/BSON/ObjectId.c \
&& sed -i'' 's/php_phongo_handler_symbol.compare_objects.*//g' src/BSON/Symbol.c \
&& sed -i'' 's/php_phongo_handler_timestamp.compare_objects.*//g' src/BSON/Timestamp.c \
&& sed -i'' 's/php_phongo_handler_regex.compare_objects.*//g' src/BSON/Regex.c \
&& sed -i'' 's/php_phongo_handler_server.compare_objects.*//g' src/MongoDB/Server.c \
&& sed -i'' 's/php_phongo_handler_utcdatetime.compare_objects.*//g' src/BSON/UTCDateTime.c \
\
&& phpize \
&& ./configure --enable-mongodb \
&& make all \
&& make install \
\
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install mongodb \
# Enabling
&& docker-php-ext-enable mongodb \
&& true
@@ -229,6 +285,17 @@ 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
@@ -347,6 +414,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
@@ -357,16 +435,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 \
&& 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 \
\
@@ -419,6 +503,17 @@ 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: sysvmsg --------------------
RUN set -eux \
# Installation: Generic
@@ -451,36 +546,14 @@ RUN set -eux \
&& true
# -------------------- Installing PHP Extension: uploadprogress --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
&& cd /tmp/uploadprogress \
# Custom: Install command
&& true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' || true \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' || true \
&& phpize \
&& ./configure --enable-uploadprogress \
&& make \
&& make install \
\
# Enabling
&& docker-php-ext-enable uploadprogress \
&& true
# -------------------- Installing PHP Extension: xmlrpc --------------------
# -------------------- Installing PHP Extension: xdebug --------------------
RUN set -eux \
# Installation: Generic
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
# Type: PECL extension
# Default: Pecl command
&& pecl install xdebug \
# Enabling
&& docker-php-ext-enable xdebug \
&& true
@@ -492,6 +565,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
@@ -549,6 +644,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/
@@ -560,12 +657,14 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libaio1 \
libaspell15 \
libc-client2007e \
libenchant1c2a \
libfbclient2 \
libffi6 \
libfreetype6 \
libicu63 \
libjpeg62-turbo \
libmcrypt4 \
libmemcachedutil2 \
libpng16-16 \
libpq5 \
@@ -575,6 +674,7 @@ RUN set -eux \
libwebp6 \
libxpm4 \
libxslt1.1 \
libyaml-0-2 \
libzip4 \
snmp \
ca-certificates \
@@ -615,6 +715,8 @@ 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 '^apcu$' \
&& php-fpm -m | grep -oiE '^apcu$' \
&& php -m | grep -oiE '^bcmath$' \
&& php-fpm -m | grep -oiE '^bcmath$' \
&& php -m | grep -oiE '^bz2$' \
@@ -651,6 +753,10 @@ 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 '^imap$' \
&& php-fpm -m | grep -oiE '^imap$' \
&& php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \
@@ -661,6 +767,12 @@ 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$' \
@@ -669,6 +781,8 @@ RUN set -eux \
&& 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$' \
@@ -695,6 +809,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \
&& php -m | grep -oiE '^pgsql$' \
&& php-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \
&& php-fpm -m | grep -oiE '^psr$' \
&& php -m | grep -oiE '^phar$' \
&& php-fpm -m | grep -oiE '^phar$' \
&& php -m | grep -oiE '^posix$' \
@@ -720,6 +836,8 @@ 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 '^sysvmsg$' \
@@ -732,23 +850,32 @@ 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 '^xdebug$' \
&& php-fpm -m | grep -oiE '^xdebug$' \
&& php -m | grep -oiE '^xml$' \
&& php-fpm -m | grep -oiE '^xml$' \
&& php -m | grep -oiE '^xmlreader$' \
&& php-fpm -m | grep -oiE '^xmlreader$' \
&& php -m | grep -oiE '^xmlrpc$' \
&& php-fpm -m | grep -oiE '^xmlrpc$' \
&& php -m | grep -oiE '^xmlwriter$' \
&& php-fpm -m | grep -oiE '^xmlwriter$' \
&& php -m | grep -oiE '^xsl$' \
&& php-fpm -m | grep -oiE '^xsl$' \
&& php -m | grep -oiE '^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
###

View File

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

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

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

View File

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

View File

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

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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -48,7 +63,7 @@ RUN set -eux \
&& 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 \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -135,7 +154,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,18 +197,6 @@ 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 \
@@ -360,6 +367,9 @@ RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
\
@@ -381,13 +391,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -404,7 +414,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -440,38 +453,37 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
\
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -485,6 +497,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -48,7 +63,7 @@ RUN set -eux \
&& 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 \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -129,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -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 --------------------
@@ -175,7 +199,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 \
@@ -195,18 +219,6 @@ 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 \
@@ -334,11 +346,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/* \
@@ -416,6 +428,9 @@ RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
\
@@ -437,13 +452,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -460,7 +475,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -496,46 +514,45 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -549,6 +566,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -48,7 +63,7 @@ RUN set -eux \
&& 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 \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -129,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -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 --------------------
@@ -179,7 +203,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 \
@@ -193,7 +217,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 \
@@ -224,18 +248,6 @@ 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 \
@@ -368,11 +380,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/* \
@@ -450,6 +462,9 @@ RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
\
@@ -471,13 +486,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -494,7 +509,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -530,50 +548,49 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -587,6 +604,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -48,7 +63,7 @@ RUN set -eux \
&& 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 \
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
@@ -74,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -84,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -129,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -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 --------------------
@@ -179,7 +203,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 \
@@ -193,7 +217,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 \
@@ -202,7 +226,8 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
@@ -228,18 +253,6 @@ 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 \
@@ -373,23 +386,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -467,6 +480,9 @@ RUN set -eux \
# -------------------- mixlib_config --------------------
&& gem install mixlib-config -v 2.2.4 \
\
# -------------------- ffi --------------------
&& gem install ffi -v 1.12.2 \
\
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \
\
@@ -488,13 +504,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -511,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -547,54 +566,53 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -608,6 +626,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -115,6 +135,7 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -128,7 +149,12 @@ RUN set -eux \
###
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 \
@@ -137,7 +163,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 +204,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 \
@@ -192,7 +218,7 @@ RUN set -eux \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& 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 \
@@ -206,7 +232,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 \
@@ -215,7 +241,8 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
@@ -241,18 +268,6 @@ 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 \
@@ -386,23 +401,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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,13 +516,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -524,7 +539,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -560,55 +578,54 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -622,6 +639,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mysql-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -115,6 +135,7 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
zsh-common \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -128,7 +149,12 @@ RUN set -eux \
###
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 \
@@ -137,7 +163,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 +204,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 \
@@ -192,7 +218,7 @@ RUN set -eux \
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
\
&& 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 \
@@ -200,24 +226,6 @@ 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 --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
@@ -241,18 +249,6 @@ 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 \
@@ -386,23 +382,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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,13 +497,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -524,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -560,55 +559,52 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -622,6 +618,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -128,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -137,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 --------------------
@@ -178,7 +203,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 \
@@ -192,7 +217,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 \
@@ -200,24 +225,6 @@ 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 --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \
@@ -241,18 +248,6 @@ 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 \
@@ -386,23 +381,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -484,7 +479,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 \
@@ -501,13 +496,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -524,7 +519,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -560,55 +558,52 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -622,6 +617,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -128,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -137,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 --------------------
@@ -178,7 +203,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 \
@@ -192,7 +217,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 \
@@ -206,7 +231,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 \
@@ -215,7 +240,8 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
@@ -228,7 +254,7 @@ RUN set -eux \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \
&& git checkout v4.0.0 \
\
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer install --no-interaction --no-progress --no-dev' \
@@ -241,18 +267,6 @@ 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 \
@@ -387,23 +401,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -485,7 +499,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 \
@@ -502,13 +516,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -525,7 +539,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -561,55 +578,54 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -623,6 +639,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -128,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -137,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 --------------------
@@ -178,7 +203,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 \
@@ -192,7 +217,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 \
@@ -206,7 +231,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 \
@@ -215,7 +240,8 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
@@ -241,18 +267,6 @@ 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 \
@@ -387,23 +401,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -485,7 +499,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 \
@@ -502,13 +516,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -525,7 +539,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -561,55 +578,54 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -623,6 +639,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

@@ -22,6 +22,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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -62,6 +77,7 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
certbot \
coreutils \
dnsutils \
dos2unix \
@@ -73,6 +89,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -83,11 +100,14 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
mariadb-client \
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -128,7 +148,12 @@ RUN set -eux \
###
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 \
@@ -137,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 --------------------
@@ -178,7 +203,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 \
@@ -192,7 +217,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 \
@@ -206,7 +231,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 \
@@ -215,7 +240,8 @@ RUN set -eux \
\
\
# -------------------- drupalconsole --------------------
&& curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" \
&& curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \
\
# -------------------- gitflow --------------------
@@ -241,18 +267,6 @@ 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 \
@@ -382,23 +396,23 @@ 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 \
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-2 global require photoncms/installer \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
\
# -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer 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/* \
@@ -497,13 +511,13 @@ RUN set -eux \
###
RUN set -eux \
# -------------------- ansible --------------------
&& pip install --no-cache-dir --force-reinstall ansible \
&& pip install --no-cache-dir --force-reinstall ansible || true \
\
# -------------------- yamllint --------------------
&& pip install --no-cache-dir --force-reinstall yamllint \
&& pip install --no-cache-dir --force-reinstall yamllint || true \
\
# -------------------- yq --------------------
&& pip install --no-cache-dir --force-reinstall yq \
&& pip install --no-cache-dir --force-reinstall yq || true \
\
\
&& rm -rf /root/.cache/pip \
@@ -520,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -556,54 +573,53 @@ RUN set -eux \
RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& regex-grep --version | grep -E '[.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \
&& regex-grep --version | grep -E '[0-9][.0-9]+' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' \
&& git-flow version | grep -E '[0-9][.0-9]+' \
&& laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
&& phalcon commands | grep -E '[0-9][.0-9]+' \
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Composer --------------------
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' \
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.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]+$' \
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
\
# -------------------- NPM --------------------
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& stylelint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
&& 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]+' \
&& mdl --version | grep -E '[0-9][.0-9]+' \
\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
@@ -617,6 +633,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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

140
Makefile
View File

@@ -7,6 +7,8 @@ endif
# Docker configuration
# -------------------------------------------------------------------------------------------------
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
DIR = Dockerfiles
IMAGE = devilbox/php-fpm
NO_CACHE =
@@ -15,6 +17,11 @@ PHP_EXT_DIR =
# Run checks after each module has been installed (slow, but yields errors faster)
FAIL_FAST = False
# File lint
FL_VERSION = 0.3
FL_IGNORES = .git/,.github/
# -------------------------------------------------------------------------------------------------
# DEFAULT TARGET
# -------------------------------------------------------------------------------------------------
@@ -31,6 +38,8 @@ help:
@echo "Targets"
@echo "--------------------------------------------------------------------------------"
@echo
@echo "lint Lint project files and repository"
@echo
@echo "gen-readme [VERSION=] Update README with PHP modules from built images."
@echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates."
@echo
@@ -54,7 +63,7 @@ help:
@echo "--------------------------------------------------------------------------------"
@echo
@echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0',"
@echo " '7.1', '7.2', '7.3', '7.4', '8.0'."
@echo " '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'."
@echo " For gen-readme target it is optional and if not"
@echo " specified, it will generate for all versions."
@echo
@@ -67,21 +76,86 @@ help:
@echo "ARGS Can be added to all build-* and rebuild-* targets"
@echo " to supply additional docker build options."
# -------------------------------------------------------------------------------------------------
# Lint Targets
# -------------------------------------------------------------------------------------------------
lint: lint-files
lint: lint-yaml
lint: lint-changelog
lint: lint-workflow
lint-workflow:
@echo "################################################################################"
@echo "# Lint Workflow"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \
echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
exit 1; \
else \
echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
fi
@echo
lint-changelog:
@echo "################################################################################"
@echo "# Lint Changelog"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
if ! grep -E "^## Release $${GIT_NEXT_TAG}$$" CHANGELOG.md >/dev/null; then \
echo "[ERR] Missing '## Release $${GIT_NEXT_TAG}' section in CHANGELOG.md"; \
exit 1; \
else \
echo "[OK] Section '## Release $${GIT_NEXT_TAG}' present in CHANGELOG.md"; \
fi
@echo
lint-files:
@echo "################################################################################"
@echo "# Lint Files"
@echo "################################################################################"
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-cr --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-crlf --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-single-newline --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-space --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8 --text --ignore '$(FL_IGNORES)' --path .
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8-bom --text --ignore '$(FL_IGNORES)' --path .
@echo
lint-yaml:
@# Lint all files
@echo "################################################################################"
@echo "# Lint Yaml"
@echo "################################################################################"
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/yamllint .
@echo
# -------------------------------------------------------------------------------------------------
# GENERATE TARGETS
# -------------------------------------------------------------------------------------------------
gen-readme:
ifeq ($(strip $(VERSION)),)
@echo "Generate README.md for all PHP versions"
cd build; ./gen-readme.sh
else
@echo "Generate README.md for PHP $(VERSION)"
@$(MAKE) --no-print-directory _check-version
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=base
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods
cd build; ./gen-readme.sh ${VERSION}
cd build; ./gen-readme.sh $(VERSION)
endif
gen-dockerfiles:
docker run --rm \
$$(tty -s && echo "-it" || echo) \
@@ -90,8 +164,8 @@ gen-dockerfiles:
-e MY_GID=$$(id -g) \
-v ${PWD}:/data \
-w /data/build/ansible \
cytopia/ansible:2.6-tools ansible-playbook generate.yml \
-e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.6/site-packages/ansible_mitogen/plugins/strategy \
cytopia/ansible:2.8-tools ansible-playbook generate.yml \
-e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.8/site-packages/ansible_mitogen/plugins/strategy \
-e ANSIBLE_STRATEGY=mitogen_linear \
-e ansible_python_interpreter=/usr/bin/python3 \
-e \"{build_fail_fast: $(FAIL_FAST)}\" \
@@ -178,7 +252,7 @@ build-work:
# REBUILD TARGETS
# -------------------------------------------------------------------------------------------------
rebuild-base: _pull-root-image
rebuild-base: _pull-base-image
rebuild-base: NO_CACHE=--no-cache
rebuild-base: build-base
@@ -227,6 +301,52 @@ test-work: _check-version
./tests/test.sh ${VERSION} work
# -------------------------------------------------------------------------------------------------
# DOCKERHUB TARGETS
# -------------------------------------------------------------------------------------------------
login:
ifeq ($(strip $(USERNAME)),)
@$(info This make target requires the USERNAME variable to be set.)
@$(info make login USERNAME= PASSWORD=)
@$(info )
@$(error Exiting)
endif
ifeq ($(strip $(PASSWORD)),)
@$(info This make target requires the PASSWORD variable to be set.)
@$(info make login USERNAME= PASSWORD=)
@$(info )
@$(error Exiting)
endif
@yes | docker login --username $(USERNAME) --password $(PASSWORD)
push:
ifeq ($(strip $(TAG)),)
@$(info This make target requires the TAG variable to be set.)
@$(info make push TAG=)
@$(info )
@$(error Exiting)
endif
docker push $(IMAGE):$(TAG)
tag:
ifeq ($(strip $(OLD_TAG)),)
@$(info This make target requires the OLD_TAG variable to be set.)
@$(info make tag OLD_TAG= NEW_TAG=)
@$(info )
@$(error Exiting)
endif
ifeq ($(strip $(NEW_TAG)),)
@$(info This make target requires the NEW_TAG variable to be set.)
@$(info make tag OLD_TAG= NEW_TAG=)
@$(info )
@$(error Exiting)
endif
docker tag $(IMAGE):$(OLD_TAG) $(IMAGE):$(NEW_TAG)
# -------------------------------------------------------------------------------------------------
# HELPER TARGETS
# -------------------------------------------------------------------------------------------------
@@ -260,7 +380,9 @@ ifeq ($(VERSION),7.4)
else
ifeq ($(VERSION),8.0)
else
@$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' or '8.0')
ifeq ($(VERSION),8.1)
else
@$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' or '8.1')
@$(info )
@$(error Exiting)
endif
@@ -274,6 +396,8 @@ endif
endif
endif
endif
endif
@echo "Version $(VERSION) is valid"
_check-image-exists:
@@ -286,6 +410,6 @@ _check-image-exists:
fi;
_pull-root-image:
_pull-base-image:
@echo "Pulling root image for PHP ${VERSION}"
@docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';)

View File

@@ -1,9 +1,8 @@
# PHP-FPM Docker images
[![Linting](https://github.com/devilbox/docker-php-fpm/workflows/Linting/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=Linting)
[![CI](https://github.com/devilbox/docker-php-fpm/workflows/PHP-CI/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-CI)
[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![lint](https://github.com/devilbox/docker-php-fpm/workflows/lint/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=lint)
[![build](https://github.com/devilbox/docker-php-fpm/workflows/build/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=build)
[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
[![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases)
[![Gitter](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group)
@@ -25,6 +24,7 @@ Have a look at the following Devilbox base images for which no official versions
* [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3)
* [PHP-FPM 7.4](https://github.com/devilbox/docker-php-fpm-7.4)
* [PHP-FPM 8.0](https://github.com/devilbox/docker-php-fpm-8.0)
* [PHP-FPM 8.1](https://github.com/devilbox/docker-php-fpm-8.1)
#### Documentation
@@ -113,7 +113,7 @@ One main problem with a running Docker container is to **synchronize the ownersh
#### Unsynchronized permissions
Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it.
Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it.
```shell
[Host] | [Container]
@@ -221,7 +221,7 @@ The following table shows a more complete overview about the offered Docker imag
<tbody>
<tr>
<td rowspan="11"><strong>base</strong></td>
<td rowspan="12"><strong>base</strong></td>
<td><code>devilbox/php-fpm:5.2-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-base.svg" /></a>
@@ -297,9 +297,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-base.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>mods</strong></td>
<td rowspan="12"><strong>mods</strong></td>
<td><code>devilbox/php-fpm:5.2-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-mods.svg" /></a>
@@ -376,9 +383,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-mods.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>prod</strong></td>
<td rowspan="12"><strong>prod</strong></td>
<td><code>devilbox/php-fpm:5.2-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-prod.svg" /></a>
@@ -455,9 +469,16 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-prod.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="11"><strong>work</strong></td>
<td rowspan="12"><strong>work</strong></td>
<td><code>devilbox/php-fpm:5.2-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-work.svg" /></a>
@@ -534,6 +555,13 @@ The following table shows a more complete overview about the offered Docker imag
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:8.1-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.1-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.1-work.svg" /></a>
</td>
</tr>
</tbody>
</table>
@@ -617,7 +645,7 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>5.5</th>
<td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.6</th>
@@ -627,32 +655,37 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>7.0</th>
<td id="70-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.1</th>
<td id="71-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.2</th>
<td id="72-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.3</th>
<td id="73-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, wddx, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.4</th>
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="74-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
<td id="74-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, vips, xdebug, xlswriter, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>8.0</th>
<td id="80-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="80-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="80-mods">apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>8.1</th>
<td id="81-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="81-mods">apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xml, xmlreader, xmlwriter, xsl, yaml, zip, zlib</td>
</tr>
</tbody>
</table>
@@ -674,6 +707,7 @@ docker pull devilbox/php-fpm:7.2-base
docker pull devilbox/php-fpm:7.3-base
docker pull devilbox/php-fpm:7.4-base
docker pull devilbox/php-fpm:8.0-base
docker pull devilbox/php-fpm:8.1-base
```
Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub>
@@ -691,6 +725,7 @@ docker pull devilbox/php-fpm:7.2-mods
docker pull devilbox/php-fpm:7.3-mods
docker pull devilbox/php-fpm:7.4-mods
docker pull devilbox/php-fpm:8.0-mods
docker pull devilbox/php-fpm:8.1-mods
```
Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub></td>
@@ -708,6 +743,7 @@ docker pull devilbox/php-fpm:7.2-prod
docker pull devilbox/php-fpm:7.3-prod
docker pull devilbox/php-fpm:7.4-prod
docker pull devilbox/php-fpm:8.0-prod
docker pull devilbox/php-fpm:8.1-prod
```
Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting.
@@ -725,6 +761,7 @@ docker pull devilbox/php-fpm:7.2-work
docker pull devilbox/php-fpm:7.3-work
docker pull devilbox/php-fpm:7.4-work
docker pull devilbox/php-fpm:8.0-work
docker pull devilbox/php-fpm:8.1-work
```
Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this.
@@ -786,7 +823,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MODULES</code></td>
<td>string</td>
<td><code>''</code></td>
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=blackfire, ioncube</code></td>
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=blackfire, ioncube, psr, phalcon</code></td>
</tr>
<tr>
<td><code>DISABLE_MODULES</code></td>
@@ -845,7 +882,7 @@ Have a look at the following table to see all offered volumes for each Docker im
</thead>
<tbody>
<tr>
<td rowspan="7"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td rowspan="8"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td><code>/etc/php-custom.d</code></td>
<td>Mount this directory into your host computer and add custom <code>\*.ini</code> files in order to alter php behaviour.</td>
</tr>
@@ -873,6 +910,10 @@ Have a look at the following table to see all offered volumes for each Docker im
<td><code>/var/mail</code></td>
<td>Emails caught be the postfix catch-all (<code>ENABLE_MAIL=2</code>) will be available in this directory.</td>
</tr>
<tr>
<td><code>/etc/supervisor/custom.d</code></td>
<td>Mount this directory into your host computer and add your own `*.conf` supervisor start-up files.<br/><br/>**Note:** Directory and file permission will be recursively set to this of `NEW_UID` and `NEW_GID`.</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
@@ -936,7 +977,7 @@ If you plan to use the PHP-FPM image for development, hence being able to execut
The **work** Docker image has many common tools already installed which on one hand increases its image size, but on the other hand removes the necessity to install those tools locally.
You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by travis-ci it is assured that you are always at the latest version of your favorite dev tool.
You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by GitHub Actions it is assured that you are always at the latest version of your favorite dev tool.
#### What tools can you expect
@@ -1016,10 +1057,6 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://github.com/cytopia/linkcheck">linkcheck</a></td>
<td>Search for URLs in files (optionally limited by extension) and validate their HTTP status code.</td>
</tr>
<tr>
<td><a href="http://linuxbrew.sh">linuxbrew</a></td>
<td>The Homebrew package manager for Linux.</td>
</tr>
<tr>
<td><a href="https://github.com/markdownlint/markdownlint">mdl</a></td>
<td>Markdown command line linter.</td>
@@ -1138,7 +1175,10 @@ $ docker run -d \
```shell
# Create config directory to be mounted with dummy configuration
$ mkdir config
# Xdebug 2
$ echo "xdebug.enable = 1" > config/xdebug.ini
# Xdebug 3
$ echo "xdebug.mode = debug" > config/xdebug.ini
# Run container and mount it
$ docker run -d \
@@ -1242,10 +1282,9 @@ $ docker exec -it php mysqldump-secure
<h2><img id="automated-builds" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Automated builds</h2>
[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)
Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.
Docker images are built and tested every night by **[GitHub Actions](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.
<h2><img id="contributing" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Contributing</h2>

View File

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

View File

@@ -5,6 +5,8 @@ FROM devilbox/php-fpm-5.2
FROM devilbox/php-fpm-5.3
{% elif php_version == 8.0 %}
FROM devilbox/php-fpm-8.0
{% elif php_version == 8.1 %}
FROM devilbox/php-fpm-8.1
{% else %}
FROM php:{{ php_version }}-fpm
{% endif %}

View File

@@ -324,6 +324,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-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/
@@ -430,6 +432,13 @@ RUN set -eux \
{% endif %}
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Ports
###

View File

@@ -40,8 +40,10 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
\
&& rm -rf /etc/supervisor* \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /var/log/supervisor \
&& mkdir -p /etc/supervisor/conf.d \
&& mkdir -p /etc/supervisor/custom.d \
&& chown devilbox:devilbox /etc/supervisor/custom.d \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \

View File

@@ -22,6 +22,19 @@ LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-work"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-work"
###
### 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
###
@@ -35,6 +48,8 @@ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
apt-transport-https \
ca-certificates \
curl \
dirmngr \
gnupg \
@@ -76,6 +91,9 @@ RUN set -eux \
blackfire-agent \
build-essential \
bzip2 \
{% if php_version != 5.2 and php_version != 5.3 and php_version != 5.4 and php_version != 5.5 %}
certbot \
{% endif %}
coreutils \
dnsutils \
dos2unix \
@@ -87,6 +105,7 @@ RUN set -eux \
git-svn \
ghostscript \
graphviz \
gsfonts \
hostname \
htop \
imagemagick \
@@ -97,15 +116,18 @@ RUN set -eux \
libffi-dev \
libssl-dev \
libyaml-dev \
locales \
make \
mongodb-org-shell \
mongodb-org-tools \
moreutils \
{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0] %}
{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] %}
mariadb-client \
{% else %}
mysql-client \
{% endif %}
mupdf \
mupdf-tools \
nano \
net-tools \
netcat \
@@ -133,6 +155,9 @@ RUN set -eux \
zip \
zlib1g-dev \
zsh \
{% if php_version in [5.6, 7.0] %}
zsh-common \
{% endif %}
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \
\
@@ -224,13 +249,13 @@ RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['version'] }} \
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['version'] }} \
{#- Generic gem version available? -#}
{%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['version'] }} \
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer global require {{ composer_available[tool]['name'] }} \
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" COMPOSER_MEMORY_LIMIT=-1 /usr/local/bin/composer-{{ composer_available[tool]['version'] }} global require {{ composer_available[tool]['name'] }} \
{%- endif -%}
{#- Symlinks available? -#}
{%- if 'link' in composer_available[tool] -%}
@@ -381,13 +406,13 @@ RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} \
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} || true \
{#- Generic gem version available? -#}
{%- elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} \
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} || true \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} || true \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
@@ -421,7 +446,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}:${HOME}/.yarn/bin"'; \
echo 'PATH="${PATH}:${HOME}/.composer/vendor/bin"'; \
echo 'PATH="${PATH}:/usr/local/bin:/usr/local/sbin"'; \
echo 'PATH="${PATH}:/opt/nvm/versions/node/$(nvm version default)/bin"'; \
echo "export PATH"; \
echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -515,6 +543,13 @@ RUN set -eux \
{% endif %}
# Deactive PSR and Phalcon:
# https://github.com/devilbox/docker-php-fpm/issues/201
RUN set -eux \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \
&& rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \
###
### Copy files
###

View File

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

View File

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

View File

@@ -101,6 +101,7 @@ extensions_enabled:
- tidy
- tokenizer
- uploadprogress
- vips
- wddx
- xdebug
- xml
@@ -108,6 +109,7 @@ extensions_enabled:
- xmlrpc
- xmlwriter
- xsl
- xlswriter
- yaml
- zip
@@ -143,7 +145,7 @@ extensions_enabled:
# command: [required] Custom command to install and enable a module
extensions_available:
amqp:
disabled: [8.0]
disabled: [8.0, 8.1]
5.2:
run_dep: [librabbitmq1]
type: pecl
@@ -166,7 +168,7 @@ extensions_available:
build_dep: [librabbitmq-dev]
run_dep: [librabbitmq4]
apcu:
disabled: [5.2, 8.0]
disabled: [5.2]
5.3:
type: pecl
version: 4.0.11
@@ -185,7 +187,7 @@ extensions_available:
all:
type: builtin
blackfire:
disabled: [5.2, 5.3, 5.4, 5.5, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 8.1]
all:
type: custom
command: |
@@ -223,7 +225,7 @@ extensions_available:
all:
type: builtin
ffi:
already_avail: [8.0]
already_avail: [8.0, 8.1]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3]
all:
type: git
@@ -236,7 +238,7 @@ extensions_available:
build_dep: [libffi-dev]
run_dep: [libffi6]
fileinfo:
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
5.2:
type: pecl
build_dep: [libmagic-dev]
@@ -245,7 +247,7 @@ extensions_available:
filter:
already_avail: "{{ php_all_versions }}" # Available by default
ftp:
already_avail: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
all:
type: builtin
configure: --with-openssl-dir
@@ -259,55 +261,58 @@ extensions_available:
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 \
configure: --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
configure: --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
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.3:
type: builtin
pre: 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
configure: --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
configure: --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
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.4:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --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
configure: --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
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.5:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --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
configure: --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
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.6:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --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
configure: --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
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
7.0:
type: builtin
configure: --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
configure: --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
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
7.1:
type: builtin
configure: --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
configure: --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
7.2:
type: builtin
configure: --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
configure: --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
7.3:
type: builtin
configure: --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
configure: --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
7.4:
type: builtin
configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv
configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype
8.0:
type: builtin
configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv
configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype
8.1:
type: builtin
configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --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
configure: --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
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev]
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx5, libfreetype6, libwebp6]
gettext:
@@ -324,7 +329,7 @@ extensions_available:
iconv:
already_avail: "{{ php_all_versions }}"
igbinary:
disabled: [8.0]
disabled: []
5.2:
type: pecl
version: 2.0.7
@@ -343,19 +348,35 @@ extensions_available:
all:
type: pecl
imagick:
disabled: [5.2, 5.3, 5.4, 5.5, 8.0] # 5.3, 5.4 and 5.5 segfaults
disabled: [5.2, 5.3, 5.4, 8.0, 8.1] # Only available since 5.3. 5.3 and 5.4 segfaults
5.5:
type: pecl
build_dep: [libmagickwand-dev, libwebp5, ghostscript]
run_dep: [libmagickwand-6.q16-2, libwebp5, ghostscript]
5.6:
type: pecl
run_dep: [libmagickwand-6.q16-3, libwebp6]
run_dep: [libmagickwand-6.q16-3, libwebp6, ghostscript]
7.0:
type: pecl
run_dep: [libmagickwand-6.q16-3, libwebp6]
run_dep: [libmagickwand-6.q16-3, libwebp6, ghostscript]
all:
type: pecl
build_dep: [libmagickwand-dev, libwebp6]
run_dep: [libmagickwand-6.q16-6, libwebp-dev]
build_dep: [libmagickwand-dev, libwebp6, ghostscript]
run_dep: [libmagickwand-6.q16-6, libwebp-dev, ghostscript]
# https://bugs.php.net/bug.php?id=77683
# https://github.com/Imagick/imagick/issues/262 (policy prevents PDF from being read)
post: |
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 \
imap:
disabled: [7.4, 8.0] # TODO: re-enable. currently fails with: configure: error: OpenSSL libraries not found.
disabled: []
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/
@@ -363,7 +384,7 @@ extensions_available:
build_dep: [libc-client-dev, libkrb5-dev, libcurl4-openssl-dev]
run_dep: [libc-client2007e]
interbase:
disabled: [7.4, 8.0]
disabled: [7.4, 8.0, 8.1]
all:
type: builtin
build_dep: [libfbclient2, libib-util, firebird-dev]
@@ -392,7 +413,7 @@ extensions_available:
build_dep: [libicu-dev]
run_dep: [libicu63]
ioncube:
disabled: [7.4, 8.0]
disabled: [8.0, 8.1]
all:
type: custom
command: |
@@ -416,25 +437,37 @@ extensions_available:
libxml:
already_avail: "{{ php_all_versions }}" # Available by default
mbstring:
already_avail: [5.2, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.2, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
all:
type: builtin
mcrypt:
disabled: [8.0]
disabled: []
5.2:
type: builtin
5.3:
type: builtin
5.4:
type: builtin
5.5:
type: builtin
5.6:
type: builtin
7.0:
type: builtin
7.1:
type: builtin
7.2:
type: pecl
version: 1.0.1
7.3:
type: pecl
version: 1.0.2
7.4:
type: pecl
all:
type: builtin
type: pecl
run_dep: [libmcrypt4]
build_dep: [libmcrypt-dev]
memcache:
disabled: [8.0]
disabled: []
5.2:
type: pecl
version: 2.2.7
@@ -450,6 +483,21 @@ extensions_available:
5.6:
type: pecl
version: 2.2.7
7.0:
type: pecl
version: 4.0.5.2
7.1:
type: pecl
version: 4.0.5.2
7.2:
type: pecl
version: 4.0.5.2
7.3:
type: pecl
version: 4.0.5.2
7.4:
type: pecl
version: 4.0.5.2
all:
type: pecl
build_dep: [zlib1g-dev]
@@ -486,12 +534,24 @@ extensions_available:
&& ./configure --enable-memcached \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
8.1:
type: git
git_url: https://github.com/php-memcached-dev/php-memcached
git_ref: master
command: |
true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.1
&& sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \
&& phpize \
&& ./configure --enable-memcached \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
all:
type: pecl
build_dep: [zlib1g-dev, libmemcached-dev, libevent-dev]
run_dep: [libmemcachedutil2]
mongo:
disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0] # Deprecated
disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] # Deprecated
5.2:
type: pecl
command: yes yes | pecl install mongo-1.5.8
@@ -510,44 +570,14 @@ extensions_available:
5.5:
type: pecl
version: 1.5.5
8.0:
type: git
git_url: https://github.com/mongodb/mongo-php-driver
command: |
git checkout v1.6 \
&& git submodule update --init \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \
&& sed -i'' 's/TSRMLS_SET_CTX(ctx);/\/\/TSRMLS_SET_CTX(ctx);/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' php_phongo.c \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' phongo_compat.h \
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' src/bson.c \
\
&& sed -i'' 's/php_phongo_handler_binary.compare_objects.*//g' src/BSON/Binary.c \
&& sed -i'' 's/php_phongo_handler_dbpointer.compare_objects.*//g' src/BSON/DBPointer.c \
&& sed -i'' 's/php_phongo_handler_int64.compare_objects.*//g' src/BSON/Int64.c \
&& sed -i'' 's/php_phongo_handler_javascript.compare_objects.*//g' src/BSON/Javascript.c \
&& sed -i'' 's/php_phongo_handler_objectid.compare_objects.*//g' src/BSON/ObjectId.c \
&& sed -i'' 's/php_phongo_handler_symbol.compare_objects.*//g' src/BSON/Symbol.c \
&& sed -i'' 's/php_phongo_handler_timestamp.compare_objects.*//g' src/BSON/Timestamp.c \
&& sed -i'' 's/php_phongo_handler_regex.compare_objects.*//g' src/BSON/Regex.c \
&& sed -i'' 's/php_phongo_handler_server.compare_objects.*//g' src/MongoDB/Server.c \
&& sed -i'' 's/php_phongo_handler_utcdatetime.compare_objects.*//g' src/BSON/UTCDateTime.c \
\
&& phpize \
&& ./configure --enable-mongodb \
&& make all \
&& make install \
5.6:
type: pecl
version: 1.7.5
all:
type: pecl
build_dep: [libssl-dev, libsasl2-dev]
msgpack:
disabled: [8.0]
disabled: []
5.2:
type: pecl
version: 0.5.7
@@ -567,7 +597,7 @@ extensions_available:
type: pecl
mysql:
already_avail: [5.2, 5.3]
disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0] # Deprecated in newer versions
disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] # Deprecated in newer versions
5.6:
type: builtin
run_dep: [libmariadbclient18]
@@ -580,9 +610,9 @@ extensions_available:
type: builtin
mysqlnd:
disabled: [5.2]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
oauth:
disabled: [8.0]
disabled: []
5.2:
type: pecl
version: 1.2.3
@@ -630,6 +660,7 @@ extensions_available:
odbc:
disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found!
opcache:
disabled: [8.1] # TODO: fatal error: zend_dfg.h: No such file or directory
5.2:
type: pecl
command: pecl install zendopcache
@@ -651,6 +682,7 @@ extensions_available:
pdo:
already_avail: "{{ php_all_versions }}"
pdo_dblib:
disabled: [8.1] # php: symbol lookup error: pdo_dblib.so: undefined symbol: dbinit
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/
@@ -681,6 +713,9 @@ extensions_available:
8.0:
type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
8.1:
type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
all:
type: builtin
configure: --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR}
@@ -710,7 +745,7 @@ extensions_available:
pdo_sqlite:
already_avail: "{{ php_all_versions }}"
pdo_sqlsrv:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4, 8.0, 8.1]
7.0:
type: pecl
version: 5.3.0
@@ -721,6 +756,11 @@ extensions_available:
version: 5.6.1
build_dep: [unixodbc-dev]
run_dep: [unixodbc]
7.2:
type: pecl
version: 5.8.1
build_dep: [unixodbc-dev]
run_dep: [unixodbc]
all:
type: pecl
build_dep: [unixodbc-dev]
@@ -731,7 +771,7 @@ extensions_available:
build_dep: [libpq-dev]
run_dep: [libpq5]
psr:
disabled: [5.2, 5.3, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module
disabled: [5.2, 5.3] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module
5.4:
type: pecl
version: 0.5.1
@@ -744,7 +784,7 @@ extensions_available:
all:
type: pecl
phalcon:
disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks
disabled: [5.2, 8.0, 8.1] # TODO: currently disabled for 7.4 as it breaks
5.3:
type: git
git_url: https://github.com/phalcon/cphalcon
@@ -781,7 +821,7 @@ extensions_available:
git_ref: $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1)
command: cd build && ./install
phar:
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
5.2:
type: pecl
build_dep: [libssl-dev]
@@ -795,7 +835,7 @@ extensions_available:
readline:
already_avail: "{{ php_all_versions }}"
recode:
disabled: [7.4, 8.0]
disabled: [7.4, 8.0, 8.1]
already_avail: [5.3, 5.4]
all:
type: builtin
@@ -817,23 +857,44 @@ extensions_available:
5.6:
type: pecl
version: 4.3.0
8.0:
8.1:
type: git
git_url: https://github.com/phpredis/phpredis
git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1)
# TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.0
command: |
sed -i'' 's/, ZSTR_LEN(ra->algorithm)//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} \
&& sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' library.c \
&& sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' redis_array_impl.c \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
all:
type: pecl
type: git
git_url: https://github.com/phpredis/phpredis
git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1)
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 \
reflection:
already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
rdkafka:
disabled: [5.2, 8.0]
disabled: [5.2, 8.0, 8.1]
5.3:
type: pecl
version: 3.0.5
@@ -861,6 +922,10 @@ extensions_available:
simplexml:
already_avail: "{{ php_all_versions }}"
snmp:
7.4:
type: builtin
build_dep: [libssl-dev, libsnmp-dev, snmp]
run_dep: [snmp]
all:
type: builtin
configure: --with-openssl-dir
@@ -884,14 +949,14 @@ extensions_available:
type: builtin
build_dep: [libsodium-dev]
solr:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0]
all:
type: pecl
build_dep: [libxml2-dev, libcurl4-openssl-dev]
spl:
already_avail: "{{ php_all_versions }}"
sqlsrv:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1]
7.0:
type: pecl
version: 5.3.0
@@ -902,19 +967,24 @@ extensions_available:
version: 5.6.1
build_dep: [unixodbc-dev]
run_dep: [unixodbc]
7.2:
type: pecl
version: 5.8.1
build_dep: [unixodbc-dev]
run_dep: [unixodbc]
all:
type: pecl
build_dep: [unixodbc-dev]
run_dep: [unixodbc]
ssh2:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1]
all:
type: pecl
version: 1.2
build_dep: [libssh2-1-dev]
run_dep: [libssh2-1]
swoole:
disabled: [5.2, 8.0]
disabled: [5.2, 8.0, 8.1]
5.3:
type: pecl
version: 1.9.23
@@ -933,6 +1003,9 @@ extensions_available:
7.0:
type: pecl
version: 4.2.13
7.1:
type: pecl
version: 4.4.26
all:
type: pecl
command: yes yes | pecl install swoole
@@ -973,51 +1046,121 @@ extensions_available:
tokenizer:
already_avail: "{{ php_all_versions }}"
uploadprogress:
disabled: [8.0, 8.1]
5.2:
type: pecl
5.3:
type: pecl
5.4:
type: pecl
5.5:
type: pecl
5.6:
type: pecl
all:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
vips:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1]
7.0:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.1:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.2:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.3:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
7.4:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
8.0:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
command: |
true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' || true \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' || true \
&& phpize \
&& ./configure --enable-uploadprogress \
&& make \
&& make install \
build_dep:
- fftw-dev
- gobject-introspection
- gtk-doc-tools
- libexif-dev
- libexpat1-dev
- libfftw3-dev
- libgif-dev
- libglib2.0-dev
- libmagick++-dev
- libmagickcore-6.q16-dev
- libmagickwand-dev
- libpoppler-glib-dev
- librsvg2-dev
- libtool
- libwebp-dev
- libwebpdemux2
- libwebpmux2
run_dep:
- fftw2
- gir1.2-poppler-0.18
- imagemagick-6.q16
- libexif12
- libexpat1
- libfftw3-3
- libgif7
- libglib2.0-0
- 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
- libpoppler-glib8
- librsvg2-2
- libwebp6
- libwebpdemux2
- libwebpmux2
all:
type: pecl
pre: |
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 \
build_dep:
- fftw-dev
- gobject-introspection
- gtk-doc-tools
- libexif-dev
- libexpat1-dev
- libfftw3-dev
- libgif-dev
- libglib2.0-dev
- libimagequant-dev
- libmagick++-dev
- libmagickcore-6.q16-dev
- libmagickwand-dev
- libpoppler-glib-dev
- librsvg2-dev
- libtool
- libwebp-dev
- libwebpdemux2
- libwebpmux3
run_dep:
- fftw2
- gir1.2-poppler-0.18
- imagemagick-6.q16
- libexif12
- libexpat1
- libfftw3-3
- libgif7
- libglib2.0-0
- libimagequant0
- 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
- libpoppler-glib8
- librsvg2-2
- libwebp6
- libwebpdemux2
- libwebpmux3
wddx:
# https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx
disabled: [7.4, 8.0]
disabled: [7.4, 8.0, 8.1]
all:
type: builtin
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xdebug:
disabled: [8.0]
disabled: []
5.2:
type: pecl
version: 2.2.7
@@ -1036,13 +1179,28 @@ extensions_available:
7.0:
type: pecl
version: 2.9.0
7.1:
type: pecl
version: 2.9.8
8.1:
type: git
git_url: https://github.com/xdebug/xdebug
git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1)
configure: --enable-xdebug
all:
type: pecl
xlswriter:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.1] # TODO: re-enable for PHP 8.1
all:
type: pecl
build_dep: [zlib1g-dev]
run_dep: []
xml:
already_avail: "{{ php_all_versions }}"
xmlreader:
already_avail: "{{ php_all_versions }}"
xmlrpc:
disabled: [8.0, 8.1]
7.4:
type: builtin
configure: --with-iconv-dir=/usr
@@ -1058,7 +1216,7 @@ extensions_available:
build_dep: [libxslt-dev]
run_dep: [libxslt1.1]
yaml:
disabled: [5.2, 8.0]
disabled: [5.2]
5.3:
type: pecl
version: 1.3.2
@@ -1071,6 +1229,9 @@ extensions_available:
5.6:
type: pecl
version: 1.3.2
7.0:
type: pecl
version: 2.0.4
all:
type: pecl
build_dep: [libyaml-dev]

View File

@@ -43,6 +43,7 @@ composer_enabled:
# -------------------------------------------------------------------------------------------------
gem_enabled:
- mixlib_config
- ffi
- rb_inotify
- mdl
@@ -95,7 +96,7 @@ software_enabled:
- gitflow
- laravel
- linkcheck
- linuxbrew
# - linuxbrew
- mhsendmail
- mysqldumpsecure
- phalcon
@@ -153,6 +154,8 @@ apt_repositories_available:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
8.0:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
8.1:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
all:
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main
key: A1715D88E1DF1F24
@@ -174,13 +177,13 @@ apt_repositories_available:
key: 9DA31620334BD75D9DCB49F368818C72E52529D4
pgsql:
5.2:
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
deb: deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main
5.3:
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
deb: deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main
5.4:
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
deb: deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main
5.5:
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
deb: deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main
all:
deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
pre: 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 -
@@ -200,34 +203,40 @@ apt_repositories_available:
# 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module
# check: [optional] Include a check command to test if it was installed successfully
# version: Composer version: Either '1' or '2' for composer version
#
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# version: [optional] Specific version of Ruby gem
#
composer_available:
asgardcms:
disabled: [5.2, 5.3, 5.4, 8.0]
check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+'
disabled: [5.2, 5.3, 5.4, 8.0, 8.1]
check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+'
name: asgardcms/asgardcms-installer
link: asgardcms
version: 2
codeception:
disabled: [5.2, 8.0]
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'
disabled: [5.2, 8.0, 8.1]
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$'
name: codeception/codeception
link: codecept
version: 2
lumen:
disabled: [5.2, 5.3, 5.4, 8.0]
check: lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$'
disabled: [5.2, 5.3, 5.4, 8.0, 8.1]
check: lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$'
name: laravel/lumen-installer
link: lumen
version: 2
photon:
disabled: [5.2, 5.3, 5.4, 8.0]
check: photon --version | grep -E 'Installer [.0-9]+'
disabled: [5.2, 5.3, 5.4, 8.0, 8.1]
check: photon --version | grep -E 'Installer [0-9][.0-9]+'
name: photoncms/installer
link: photon
version: 2
prestissimo:
disabled: [5.2, 8.0]
disabled: [5.2, 8.0, 8.1]
name: hirak/prestissimo
version: 1
# -------------------------------------------------------------------------------------------------
@@ -248,17 +257,32 @@ gem_available:
name: mixlib-config
all:
version: 2.2.4
# Required by rb-inotify, as otherwise rb-inotify will pull ffi as a dependency in a
# version which is not supported by the ruby version (>= 2.3)
ffi:
name: ffi
disabled: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
all:
version: 1.12.2
rb_inotify:
name: rb-inotify
all:
version: 0.9.10
mdl:
name: mdl
check: mdl --version | grep -E '[.0-9]+'
check: mdl --version | grep -E '[0-9][.0-9]+'
8.1:
version: 0.5.0
8.0:
version: 0.5.0
7.4:
version: 0.5.0
7.3:
version: 0.5.0
7.2:
version: 0.5.0
7.1:
version: 0.5.0
7.0:
version: 0.5.0
5.6:
@@ -289,43 +313,43 @@ gem_available:
npm_available:
angular_cli:
name: "@angular/cli"
check: ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+'
check: ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+'
eslint:
name: eslint
check: eslint -v | grep -E '[.0-9]+'
check: eslint -v | grep -E '[0-9][.0-9]+'
grunt:
name: grunt
grunt_cli:
name: grunt-cli
check: grunt --version | grep -E '[.0-9]+'
check: grunt --version | grep -E '[0-9][.0-9]+'
gulp:
name: gulp
check: gulp --version | grep -E '[.0-9]+'
check: gulp --version | grep -E '[0-9][.0-9]+'
jsonlint:
name: jsonlint
check: jsonlint --version | grep -E '[.0-9]+'
check: jsonlint --version | grep -E '[0-9][.0-9]+'
pm2:
name: pm2
check: pm2 --no-daemon --version | grep -E '[.0-9]+'
check: pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+'
mdlint:
name: mdlint
check: mdlint --version | grep -E '[.0-9]+'
check: mdlint --version | grep -E '[0-9][.0-9]+'
sass:
name: sass
check: sass --version | grep -E '[.0-9]+'
check: sass --version | grep -E '[0-9][.0-9]+'
stylelint:
name: stylelint
check: stylelint --version | grep -E '[.0-9]+'
check: stylelint --version | grep -E '[0-9][.0-9]+'
vue_cli:
name: "@vue/cli"
check: vue --version | grep -E '[.0-9]+'
check: vue --version | grep -E '[0-9][.0-9]+'
vue_cli_service_global:
name: "@vue/cli-service-global"
webpack:
name: webpack
webpack_cli:
name: webpack-cli
check: webpack --version | grep -E '[.0-9]+'
check: webpack --version | grep -E '[0-9][.0-9]+'
# -------------------------------------------------------------------------------------------------
@@ -344,13 +368,13 @@ npm_available:
pip_available:
ansible:
name: ansible
check: ansible --version | grep -E '^ansible [.0-9]+$'
check: ansible --version | grep -E '^ansible [0-9][.0-9]+$'
yamllint:
name: yamllint
check: yamllint --version 2>&1 | grep -E '[.0-9]+'
check: yamllint --version 2>&1 | grep -E '[0-9][.0-9]+'
yq:
name: yq
check: yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$'
check: yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$'
# -------------------------------------------------------------------------------------------------
@@ -371,9 +395,14 @@ software_available:
# Composer is a dependency for others
composer:
disabled: [5.2]
check: composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+'
check: composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+'
all:
command: curl -sS -L --fail https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
command: |
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 is a dependency for others
pip:
all:
@@ -384,10 +413,10 @@ software_available:
&& 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 is a dependency for others
nvm:
check: su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+'
check: su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+'
all:
pre: |
git clone https://github.com/creationix/nvm /opt/nvm \
@@ -407,7 +436,7 @@ software_available:
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
awesomeci:
check: regex-grep --version | grep -E '[.0-9]+'
check: regex-grep --version | grep -E '[0-9][.0-9]+'
all:
command: |
git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
@@ -419,7 +448,7 @@ software_available:
&& rm -rf /usr/local/src/awesome-ci \
deployer:
disabled: [5.2, 5.3]
check: dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+'
check: dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+'
5.4:
command: curl -sS -L --fail https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep
@@ -439,7 +468,7 @@ software_available:
command: curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep
drush7:
disabled: [5.2, 8.0]
disabled: [5.2, 8.0, 8.1]
check: drush7 --version | grep -E '7[.0-9]+\s*$'
all:
pre: |
@@ -448,14 +477,14 @@ software_available:
&& git checkout 7.4.0 \
command: |
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 \
&& rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \
drush8:
disabled: [5.2, 5.3, 8.0]
disabled: [5.2, 5.3, 8.0, 8.1]
check: drush8 --version | grep -E '8[.0-9]+\s*$'
all:
pre: |
@@ -464,14 +493,14 @@ software_available:
&& 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' ) \
command: |
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 \
&& rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \
drush9:
disabled: [5.2, 5.3, 5.4, 5.5, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 7.0, 7.1, 8.0, 8.1]
check: drush9 --version | grep -E '9[.0-9]+\s*$'
all:
pre: |
@@ -480,20 +509,29 @@ software_available:
&& 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' ) \
command: |
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 \
&& rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \
drupalconsole:
disabled: [5.2, 5.3, 5.4, 8.0] # TODO: re-enable for 8.0 (currently errors)
check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]'
disabled: [5.2, 5.3, 5.4, 7.0, 7.1, 8.0, 8.1] # TODO: re-enable for 8.0 (currently errors)
check: drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]'
5.5:
pre: DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar"
5.6:
pre: DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar"
7.0:
pre: DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar"
7.1:
pre: DURL="https://github.com/hechoendrupal/drupal-console-launcher/releases/download/1.9.4/drupal.phar"
all:
command: curl -sS -L --fail https://drupalconsole.com/installer -L -o /usr/local/bin/drupal
pre: 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')"
command: curl -sS -L --fail "${DURL}" -L -o /usr/local/bin/drupal
post: chmod +x /usr/local/bin/drupal
gitflow:
check: git-flow version | grep -E '[.0-9]+'
check: git-flow version | grep -E '[0-9][.0-9]+'
all:
command: |
git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
@@ -501,8 +539,8 @@ software_available:
&& make install \
&& cd / && rm -rf /tmp/gitflow \
laravel:
check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+'
disabled: [5.2, 5.3, 8.0]
check: laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+'
disabled: [5.2, 5.3, 8.0, 8.1]
5.4:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
@@ -538,6 +576,13 @@ software_available:
&& git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
7.2:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v4.0.0 \
post:
ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel
all:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
@@ -550,13 +595,13 @@ software_available:
post:
ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel
linkcheck:
check: linkcheck --version | grep -E '^linkcheck\sv[.0-9]+'
check: linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+'
all:
command: |
curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \
linuxbrew:
check: su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+'
check: su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+'
all:
command: |
git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
@@ -575,7 +620,7 @@ software_available:
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
mysqldumpsecure:
check: mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+'
check: mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+'
all:
command: |
git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
@@ -599,8 +644,8 @@ software_available:
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
phalcon:
disabled: [5.2, 8.0]
check: phalcon commands | grep -E '[.0-9]+'
disabled: [5.2, 8.0, 8.1]
check: phalcon commands | grep -E '[0-9][.0-9]+'
5.3:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
@@ -685,7 +730,7 @@ software_available:
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
phpcs:
check: phpcs --version | grep -E 'version [.0-9]+'
check: phpcs --version | grep -E 'version [0-9][.0-9]+'
5.2:
command: |
curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
@@ -699,7 +744,7 @@ software_available:
curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \
phpcbf:
check: phpcbf --version | grep -E 'version [.0-9]+'
check: phpcbf --version | grep -E 'version [0-9][.0-9]+'
5.2:
command: |
curl -sS -L --fail https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
@@ -713,7 +758,7 @@ software_available:
curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
php-cs-fixer:
disabled: [5.2, 7.4, 8.0]
disabled: [5.2, 7.4, 8.0, 8.1]
check: php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+'
5.3:
command: |
@@ -733,15 +778,15 @@ software_available:
&& chmod +x /usr/local/bin/php-cs-fixer \
phpmd:
disabled: [5.2]
check: phpmd --version | grep -E '^PHPMD [.0-9]+'
check: phpmd --version | grep -E '^PHPMD [0-9][.0-9]+'
all:
command: |
curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
phpunit:
disabled: [5.2, 8.0]
check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+'
disabled: [5.2, 8.0, 8.1]
check: phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+'
5.3:
command: |
curl -sS -L --fail https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
@@ -768,13 +813,13 @@ software_available:
&& chmod +x /usr/local/bin/phpunit \
symfony:
disabled: [5.2, 5.3]
check: symfony -V | grep -Ei 'version\s*.*v[.0-9]+'
check: symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+'
all:
pre: SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )"
command: curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony
post: chmod +x /usr/local/bin/symfony
wkhtmltopdf:
check: wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)"
check: wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"
5.2:
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
5.3:
@@ -823,6 +868,14 @@ software_available:
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
8.1:
command: |
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 \
all:
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )"
command: |
@@ -837,7 +890,7 @@ software_available:
&& rm -rf /var/lib/apt/lists/* \
wpcli:
disabled: [5.2]
check: wp --allow-root --version | grep -E '[.0-9]+'
check: wp --allow-root --version | grep -E '[0-9][.0-9]+'
5.3:
command: curl -sS -L --fail https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp
post: chmod +x /usr/local/bin/wp

View File

@@ -10,3 +10,4 @@ php-7.2 php_version=7.2 ansible_connection=local
php-7.3 php_version=7.3 ansible_connection=local
php-7.4 php_version=7.4 ansible_connection=local
php-8.0 php_version=8.0 ansible_connection=local
php-8.1 php_version=8.1 ansible_connection=local

View File

@@ -25,6 +25,7 @@ print_usage() {
echo " gen-readme.sh 7.3"
echo " gen-readme.sh 7.4"
echo " gen-readme.sh 8.0"
echo " gen-readme.sh 8.1"
}
@@ -46,6 +47,14 @@ get_modules() {
ALL_MODULES="${ALL_MODULES},blackfire";
fi
if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'psr.so' | grep -q psr.so; then
ALL_MODULES="${ALL_MODULES},psr";
fi
if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'phalcon.so' | grep -q phalcon.so; then
ALL_MODULES="${ALL_MODULES},phalcon";
fi
# Process module string into correct format for README.md
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/^\[.*//g' )" # Remove PHP Modules headlines
PHP_MODULES="${ALL_MODULES}${PHP_MODULES}" # Append all available modules
@@ -94,6 +103,7 @@ if [ "${#}" -eq "0" ]; then
update_readme "7.3"
update_readme "7.4"
update_readme "8.0"
update_readme "8.1"
elif [ "${#}" -gt "1" ]; then
# Specifying more than 1 argument is wrong
echo "Error, invalid number of arguments."
@@ -110,7 +120,8 @@ else
&& [ "${1}" != "7.2" ] \
&& [ "${1}" != "7.3" ] \
&& [ "${1}" != "7.4" ] \
&& [ "${1}" != "8.0" ]; then
&& [ "${1}" != "8.0" ] \
&& [ "${1}" != "8.1" ]; then
# Argument does not match any of the PHP versions
echo "Error, invalid argument."
print_usage

View File

@@ -0,0 +1,18 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$dir = realpath(dirname(__FILE__));
$font = $dir . DIRECTORY_SEPARATOR . 'ptsans-regular.ttf';
if ( ($bbox = imagettfbbox(10, 0, $font, 'текст на русском языке не работает')) === FALSE ) {
echo 'FAIL: imagettfbox()';
exit(1);
}
echo 'OK';

Binary file not shown.

Binary file not shown.

View File

@@ -9,8 +9,8 @@ error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults)
if (version_compare($PHP_VERSION, '5.6.0', '<')) {
// Only available since 5.3.0 (PHP 5.3 and 5.4 segfaults)
if (version_compare($PHP_VERSION, '5.5.0', '<')) {
echo 'SKIP';
exit(0);
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3 and 5.4 segfaults)
if (version_compare($PHP_VERSION, '5.5.0', '<')) {
echo 'SKIP';
exit(0);
}
// FIXME: Currently not supported on PHP 8
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
echo 'SKIP';
exit(0);
}
$dir = realpath(dirname(__FILE__));
$file = $dir . DIRECTORY_SEPARATOR . 'dummy.pdf';
$img = new Imagick();
if ($img->readImage($file) !== True) {
echo 'FAIL: newImage()';
exit(1);
}
echo 'OK';

View File

@@ -9,8 +9,8 @@ error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults)
if (version_compare($PHP_VERSION, '5.6.0', '<')) {
// Only available since 5.3.0 (PHP 5.3 and 5.4 segfaults)
if (version_compare($PHP_VERSION, '5.5.0', '<')) {
echo 'SKIP';
exit(0);
}