mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-11 11:31:16 +00:00
Compare commits
304 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
172baf9743 | ||
|
|
fc5e5e21e5 | ||
|
|
529a33f1a0 | ||
|
|
cc77461311 | ||
|
|
f04a5ec693 | ||
|
|
90495fab70 | ||
|
|
f8f485b0bb | ||
|
|
3ad0330bca | ||
|
|
2587886b24 | ||
|
|
3ce6ed507b | ||
|
|
f05301572d | ||
|
|
40d76f355f | ||
|
|
9c1e49b814 | ||
|
|
c1aa814206 | ||
|
|
a382745a2f | ||
|
|
d9d6f2d157 | ||
|
|
9c82fb08c3 | ||
|
|
91733db9e9 | ||
|
|
41fec62672 | ||
|
|
3e9e00e0c2 | ||
|
|
d4a16ba3b3 | ||
|
|
fb7a3e8bff | ||
|
|
dc7336fa3d | ||
|
|
0750ec9339 | ||
|
|
c360bec703 | ||
|
|
1ec8a494e4 | ||
|
|
883a897420 | ||
|
|
7f018000be | ||
|
|
7f3a6f3e64 | ||
|
|
83124e8632 | ||
|
|
806b408878 | ||
|
|
3d15aea68b | ||
|
|
db7c4e6334 | ||
|
|
2c6e013fad | ||
|
|
b35f3a822c | ||
|
|
f20932ce74 | ||
|
|
78d39e57f0 | ||
|
|
6b666d029b | ||
|
|
85b743c822 | ||
|
|
2643b28775 | ||
|
|
bbe1b43474 | ||
|
|
83f57430e5 | ||
|
|
696faf598d | ||
|
|
a0a0738205 | ||
|
|
020d778fca | ||
|
|
cd7424d1f6 | ||
|
|
5ef91da97f | ||
|
|
f59dd5bf6c | ||
|
|
bc01b396a1 | ||
|
|
dd78ed0b71 | ||
|
|
ec7e1cb622 | ||
|
|
91741aaf7f | ||
|
|
87234a6f46 | ||
|
|
a6236b19c7 | ||
|
|
67017e494e | ||
|
|
31864f8335 | ||
|
|
7585081644 | ||
|
|
3e8b4856d1 | ||
|
|
46d1c48104 | ||
|
|
47d2d1f9f5 | ||
|
|
019c3b82d8 | ||
|
|
1817f84301 | ||
|
|
3fd1652455 | ||
|
|
e75b7cb54c | ||
|
|
d68b8dcff0 | ||
|
|
5bd9466995 | ||
|
|
2b53dcab7a | ||
|
|
d286467a6f | ||
|
|
d87857e598 | ||
|
|
a9c8d4fbbe | ||
|
|
be4492795b | ||
|
|
5a10077fe2 | ||
|
|
3075f2afca | ||
|
|
36355c3d60 | ||
|
|
80f8557962 | ||
|
|
3883103a41 | ||
|
|
687a660baa | ||
|
|
6f8f5cc1ea | ||
|
|
f602092471 | ||
|
|
bcbc8e2e45 | ||
|
|
4b21c70b8f | ||
|
|
b943b30b01 | ||
|
|
2df2b8c7eb | ||
|
|
2ab9995e99 | ||
|
|
1e9cb5bcb9 | ||
|
|
bdb61b9c00 | ||
|
|
47e221e210 | ||
|
|
173fd463d3 | ||
|
|
e4dd462ef2 | ||
|
|
4b40a0d932 | ||
|
|
1126319f3d | ||
|
|
56a5cfeb5e | ||
|
|
391502b9eb | ||
|
|
b1c8c8b107 | ||
|
|
81bdfb1026 | ||
|
|
f69a96e16f | ||
|
|
e3ddad4e50 | ||
|
|
dfc3481773 | ||
|
|
6baf6ace61 | ||
|
|
92aed9e7a8 | ||
|
|
e3e0d760e9 | ||
|
|
8b0fdc6cca | ||
|
|
554e979d0e | ||
|
|
ceabd15ee0 | ||
|
|
0e813e6070 | ||
|
|
04ad135df5 | ||
|
|
481d095b39 | ||
|
|
8e907edbdb | ||
|
|
36d9af44e9 | ||
|
|
09b60b78fb | ||
|
|
c57c1eab02 | ||
|
|
ff7b52a025 | ||
|
|
244605f9b5 | ||
|
|
926df09109 | ||
|
|
e10de3dc35 | ||
|
|
812eba69bc | ||
|
|
d1a541c298 | ||
|
|
362ed7b3c5 | ||
|
|
f1211dc7eb | ||
|
|
cf49904400 | ||
|
|
711e52e46c | ||
|
|
3faa0a8245 | ||
|
|
8482667c00 | ||
|
|
409cd5afc9 | ||
|
|
599fd786d7 | ||
|
|
90ecbd62a3 | ||
|
|
1201ee4135 | ||
|
|
a128aa33c0 | ||
|
|
847ea4e6a1 | ||
|
|
1be3fa70f2 | ||
|
|
eefda31e3e | ||
|
|
b1d4c97db4 | ||
|
|
6cd2ef4a1b | ||
|
|
622af7851a | ||
|
|
b2c1b8e453 | ||
|
|
4a1efb6b74 | ||
|
|
e843265575 | ||
|
|
ff0b86c37c | ||
|
|
166eff3347 | ||
|
|
d309c38a41 | ||
|
|
9fedd002e8 | ||
|
|
61352d2451 | ||
|
|
628720af0e | ||
|
|
af427a7e0a | ||
|
|
5b72766680 | ||
|
|
ec82710b48 | ||
|
|
8f53730254 | ||
|
|
cb9826eff5 | ||
|
|
452269c1b0 | ||
|
|
3926ee7c7d | ||
|
|
f376fd6766 | ||
|
|
6e0db69047 | ||
|
|
a645486c84 | ||
|
|
f0bc16ef5f | ||
|
|
bd3585596f | ||
|
|
54a8258bbc | ||
|
|
33bb1f5213 | ||
|
|
16e65379d9 | ||
|
|
333297f8d7 | ||
|
|
ab68fd47a2 | ||
|
|
820c08490a | ||
|
|
ee6917b3ef | ||
|
|
67d056811c | ||
|
|
1728629048 | ||
|
|
dfaef4bd2c | ||
|
|
0aa767e8c9 | ||
|
|
651ef659b6 | ||
|
|
e55469f7c1 | ||
|
|
85991d2e3f | ||
|
|
70764c268c | ||
|
|
023ad2af60 | ||
|
|
4f1a054f8c | ||
|
|
3f08a762f5 | ||
|
|
689703a9b9 | ||
|
|
2f953cd062 | ||
|
|
4fa6afe4e3 | ||
|
|
66a5ce778a | ||
|
|
adc5f28c4d | ||
|
|
1a5600ff86 | ||
|
|
a4bcf2b091 | ||
|
|
152a92386e | ||
|
|
66fa1c195e | ||
|
|
87bc0aa085 | ||
|
|
faff334e14 | ||
|
|
bbe3785091 | ||
|
|
3378d7a10b | ||
|
|
11ef4c6f3f | ||
|
|
f90a3532fc | ||
|
|
59ecc5dc11 | ||
|
|
a2d43259a4 | ||
|
|
2947a465f8 | ||
|
|
9f280dd5b1 | ||
|
|
68f11781f1 | ||
|
|
8d2eee37f1 | ||
|
|
3a29a77925 | ||
|
|
79b9ed1308 | ||
|
|
dc20fbea6e | ||
|
|
77716db302 | ||
|
|
62cc38d4af | ||
|
|
68615b22be | ||
|
|
1740392d3c | ||
|
|
427cc3fff6 | ||
|
|
4d925540b7 | ||
|
|
be439edfb3 | ||
|
|
867c1121c9 | ||
|
|
db397e5ef5 | ||
|
|
4569855e6e | ||
|
|
dfe0f8c4b2 | ||
|
|
ab4f0e01fe | ||
|
|
6371378d03 | ||
|
|
594762b697 | ||
|
|
24ec18d051 | ||
|
|
f8903bcb04 | ||
|
|
e33231be79 | ||
|
|
6cbf1da423 | ||
|
|
9c7c504f88 | ||
|
|
ed13130025 | ||
|
|
e816c9a376 | ||
|
|
f5af07cede | ||
|
|
cb29e8da6a | ||
|
|
61224dfb12 | ||
|
|
b257ffb972 | ||
|
|
10e114fdd2 | ||
|
|
6fb6a2f61c | ||
|
|
a9fc2a95a1 | ||
|
|
dc2daccaaa | ||
|
|
d1d0bb1300 | ||
|
|
4fa6943f8c | ||
|
|
8342c1e20f | ||
|
|
c991494dee | ||
|
|
64f9fb510b | ||
|
|
34d87faa62 | ||
|
|
49fb3c44dc | ||
|
|
7147549e97 | ||
|
|
78227bf2ee | ||
|
|
5c1ae24dd7 | ||
|
|
b57a7c1a24 | ||
|
|
c0bd7e32b8 | ||
|
|
4c856c6d67 | ||
|
|
68417da37f | ||
|
|
fd255f1f9a | ||
|
|
e285134ad3 | ||
|
|
53cc3c5cc9 | ||
|
|
00d2e41de8 | ||
|
|
4afe6ab397 | ||
|
|
c427f37fba | ||
|
|
ea68f8e37a | ||
|
|
d5d07d0620 | ||
|
|
cfc06a1458 | ||
|
|
92eceb9ae9 | ||
|
|
796195dfdc | ||
|
|
3c17b4d3c1 | ||
|
|
b79e4b5b1b | ||
|
|
d82a529955 | ||
|
|
c41d30c92f | ||
|
|
3ffa64ad3a | ||
|
|
3a901f1699 | ||
|
|
e4c9e70957 | ||
|
|
619af1207d | ||
|
|
ff6afb7296 | ||
|
|
8a4736f1e4 | ||
|
|
c246645ed8 | ||
|
|
c8a55c36e9 | ||
|
|
7902a6a1ab | ||
|
|
04a24b69b6 | ||
|
|
cf21dc3ea7 | ||
|
|
864e503563 | ||
|
|
f42a90758f | ||
|
|
5a805fb015 | ||
|
|
bd336c9e09 | ||
|
|
cb176f5eba | ||
|
|
cb31f9ac1f | ||
|
|
fe0f94e73d | ||
|
|
726fe86700 | ||
|
|
b03a857a42 | ||
|
|
cd52db5029 | ||
|
|
577a85ae9f | ||
|
|
eca4f371e3 | ||
|
|
0975d97ca3 | ||
|
|
5aa7a77aba | ||
|
|
2de416c7cd | ||
|
|
6ad00ccb3f | ||
|
|
694a7c0fea | ||
|
|
523c936f65 | ||
|
|
f9e78cf418 | ||
|
|
8661871431 | ||
|
|
ad4ea63cb8 | ||
|
|
89cd367c1e | ||
|
|
99754afd72 | ||
|
|
b2a7e7b041 | ||
|
|
9c9d325724 | ||
|
|
1b6799da58 | ||
|
|
b66ddfbd3e | ||
|
|
1663d3af7d | ||
|
|
46512b05a1 | ||
|
|
a95be98d1c | ||
|
|
ba0709f3f0 | ||
|
|
329e7bf2ec | ||
|
|
d84cc5708c | ||
|
|
21177a801c | ||
|
|
d9ae1e9ff5 | ||
|
|
c6750acfce | ||
|
|
5751f9ae96 | ||
|
|
72b675fa2a |
27
.github/workflows/linting.yml
vendored
Normal file
27
.github/workflows/linting.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
|
||||
###
|
||||
### Lints all generic and json files in the whole git repository
|
||||
###
|
||||
|
||||
name: Linting
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: "[ ${{ matrix.job }} ]"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
job: [gen-dockerfiles]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v1
|
||||
- name: Diff generated Docker files
|
||||
run: |
|
||||
make "${JOB}"
|
||||
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
env:
|
||||
JOB: ${{ matrix.job }}
|
||||
333
.github/workflows/php-ci.yml
vendored
Normal file
333
.github/workflows/php-ci.yml
vendored
Normal file
@@ -0,0 +1,333 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# 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-')))
|
||||
)
|
||||
328
.github/workflows/php-nightly.yml
vendored
Normal file
328
.github/workflows/php-nightly.yml
vendored
Normal file
@@ -0,0 +1,328 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# 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-')))
|
||||
)
|
||||
81
.travis.yml
81
.travis.yml
@@ -4,7 +4,7 @@
|
||||
### Travis settings
|
||||
###
|
||||
sudo: required
|
||||
language: python
|
||||
language: minimal
|
||||
services:
|
||||
- docker
|
||||
|
||||
@@ -23,6 +23,7 @@ env:
|
||||
# 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
|
||||
@@ -31,15 +32,14 @@ env:
|
||||
- PHP=7.1
|
||||
- PHP=7.2
|
||||
- PHP=7.3
|
||||
- PHP=7.4
|
||||
- PHP=8.0
|
||||
|
||||
|
||||
###
|
||||
### Install requirements
|
||||
###
|
||||
install:
|
||||
# Get newer docker version
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi done
|
||||
- docker version
|
||||
|
||||
# Disable services enabled by default
|
||||
@@ -61,36 +61,42 @@ install:
|
||||
- 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)
|
||||
- pip install ansible
|
||||
- make generate
|
||||
- make gen-dockerfiles
|
||||
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
|
||||
# Build (multiple tries due to network outages)
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if make build-base-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
|
||||
- make test-base-${PHP//.}
|
||||
- retry make build-base VERSION=${PHP}
|
||||
#- retry make test-base VERSION=${PHP}
|
||||
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if make build-mods-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
|
||||
- make test-mods-${PHP//.}
|
||||
- retry make build-mods VERSION=${PHP}
|
||||
#- retry make test-mods VERSION=${PHP}
|
||||
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if make build-prod-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
|
||||
- make test-prod-${PHP//.}
|
||||
- retry make build-prod VERSION=${PHP}
|
||||
#- retry make test-prod VERSION=${PHP}
|
||||
|
||||
- max=100; i=0; while [ $i -lt $max ]; do if make build-work-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi
|
||||
- make test-work-${PHP//.}
|
||||
- retry make build-work VERSION=${PHP}
|
||||
- retry make test-work VERSION=${PHP}
|
||||
|
||||
# Test if PHP modules have changed
|
||||
- ./build/gen-readme.sh "${PHP}"
|
||||
- make gen-readme VERSION=${PHP}
|
||||
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
|
||||
# Integration tests
|
||||
- true
|
||||
|
||||
|
||||
###
|
||||
### Push to Dockerhub
|
||||
@@ -99,28 +105,43 @@ script:
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin &&
|
||||
if [ "${TRAVIS_BRANCH}" == "master" ]; then
|
||||
docker push "${IMAGE}:${PHP}-base";
|
||||
docker push "${IMAGE}:${PHP}-mods";
|
||||
docker push "${IMAGE}:${PHP}-prod";
|
||||
docker push "${IMAGE}:${PHP}-work";
|
||||
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}" &&
|
||||
docker push "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}";
|
||||
docker push "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}";
|
||||
docker push "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}";
|
||||
docker push "${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}" &&
|
||||
docker push "${IMAGE}:${PHP}-base-${TRAVIS_TAG}";
|
||||
docker push "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}";
|
||||
docker push "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}";
|
||||
docker push "${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
|
||||
|
||||
14
.yamllint
Normal file
14
.yamllint
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
# Use 'default' rules
|
||||
extends: default
|
||||
|
||||
# Overwrite above default rules
|
||||
rules:
|
||||
colons:
|
||||
max-spaces-before: 0
|
||||
max-spaces-after: 60
|
||||
comments:
|
||||
require-starting-space: false
|
||||
min-spaces-from-content: 1
|
||||
line-length: disable
|
||||
truthy: disable
|
||||
111
Dockerfiles/base/Dockerfile-5.2
Normal file
111
Dockerfiles/base/Dockerfile-5.2
Normal file
@@ -0,0 +1,111 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||
FROM devilbox/php-fpm-5.2
|
||||
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
|
||||
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.2-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-base"
|
||||
|
||||
|
||||
###
|
||||
### Envs
|
||||
###
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="5.2"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& rm -f /etc/apt/sources.list \
|
||||
&& { \
|
||||
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||
} | tee /etc/apt/sources.list
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||
&& 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-5.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
\
|
||||
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& rm -f /usr/local/etc/php/php.ini
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.3-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.3-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="5.3"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,23 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
RUN set -eux \
|
||||
&& rm -f /etc/apt/sources.list \
|
||||
&& { \
|
||||
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||
} | tee /etc/apt/sources.list
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
### Configure
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,21 +71,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.3.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -82,4 +107,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.4 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.4-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.4-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="5.4"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,23 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
RUN set -eux \
|
||||
&& rm -f /etc/apt/sources.list \
|
||||
&& { \
|
||||
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||
} | tee /etc/apt/sources.list
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
### Configure
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +71,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.4.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +107,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.5 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.5-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.5-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="5.5"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,23 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
RUN set -eux \
|
||||
&& rm -f /etc/apt/sources.list \
|
||||
&& { \
|
||||
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||
} | tee /etc/apt/sources.list
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
### Configure
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +71,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.5.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +107,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.6 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.6-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.6-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="5.6"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,16 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
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 -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +64,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.6.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +100,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.0 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.0-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.0-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="7.0"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,16 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
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 -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +64,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.0.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +100,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.1 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.1-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.1-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="7.1"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,16 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
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 -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +64,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.1.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +100,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.2 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.2-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.2-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="7.2"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,16 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
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 -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +64,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +100,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||
FROM devilbox/php-fpm-7.3
|
||||
FROM php:7.3-fpm
|
||||
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
|
||||
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.3-base" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.3-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-base"
|
||||
|
||||
|
||||
###
|
||||
@@ -20,13 +28,14 @@ LABEL \
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000"
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="7.3"
|
||||
|
||||
|
||||
###
|
||||
### User/Group
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||
|
||||
@@ -34,17 +43,16 @@ RUN set -x \
|
||||
###
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
||||
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 -x \
|
||||
RUN set -eux \
|
||||
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||
&& mkdir -p /var/lib/php/session \
|
||||
@@ -56,20 +64,31 @@ RUN set -x \
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.3.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
|
||||
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -81,4 +100,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
104
Dockerfiles/base/Dockerfile-7.4
Normal file
104
Dockerfiles/base/Dockerfile-7.4
Normal file
@@ -0,0 +1,104 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||
FROM php:7.4-fpm
|
||||
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"="7.4-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-base"
|
||||
|
||||
|
||||
###
|
||||
### Envs
|
||||
###
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="7.4"
|
||||
|
||||
|
||||
###
|
||||
### 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-7.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.4.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 '^7.4' \
|
||||
&& /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"]
|
||||
104
Dockerfiles/base/Dockerfile-8.0
Normal file
104
Dockerfiles/base/Dockerfile-8.0
Normal file
@@ -0,0 +1,104 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||
FROM devilbox/php-fpm-8.0
|
||||
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.0-base"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-base"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-base"
|
||||
|
||||
|
||||
###
|
||||
### Envs
|
||||
###
|
||||
ENV MY_USER="devilbox" \
|
||||
MY_GROUP="devilbox" \
|
||||
MY_UID="1000" \
|
||||
MY_GID="1000" \
|
||||
PHP_VERSION="8.0"
|
||||
|
||||
|
||||
###
|
||||
### 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.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-8.0.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.0' \
|
||||
&& /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"]
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -p pipefail
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
@@ -52,4 +52,4 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
||||
### Startup
|
||||
###
|
||||
log "info" "Starting $( php-fpm -v 2>&1 | head -1 )" "${DEBUG_LEVEL}"
|
||||
exec /usr/local/sbin/php-fpm
|
||||
exec "${@}"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[global]
|
||||
daemonize = no
|
||||
include = /usr/local/etc/php-fpm.d/*.conf
|
||||
160
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf
Normal file
160
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.2.conf
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" ?>
|
||||
<configuration>
|
||||
|
||||
All relative paths in this config are relative to php's install prefix
|
||||
|
||||
<section name="global_options">
|
||||
Pid file
|
||||
<value name="pid_file">/var/run/php-fpm.pid</value>
|
||||
|
||||
Error log file
|
||||
<value name="error_log">/proc/self/fd/2</value>
|
||||
|
||||
Log level
|
||||
<value name="log_level">notice</value>
|
||||
|
||||
When this amount of php processes exited with SIGSEGV or SIGBUS ...
|
||||
<value name="emergency_restart_threshold">10</value>
|
||||
|
||||
... in a less than this interval of time, a graceful restart will be initiated.
|
||||
Useful to work around accidental curruptions in accelerator's shared memory.
|
||||
<value name="emergency_restart_interval">1m</value>
|
||||
|
||||
Time limit on waiting child's reaction on signals from master
|
||||
<value name="process_control_timeout">5s</value>
|
||||
|
||||
Set to 'no' to debug fpm
|
||||
<value name="daemonize">no</value>
|
||||
</section>
|
||||
|
||||
<workers>
|
||||
|
||||
<section name="pool">
|
||||
|
||||
Name of pool. Used in logs and stats.
|
||||
<value name="name">www</value>
|
||||
|
||||
Address to accept fastcgi requests on.
|
||||
Valid syntax is 'ip.ad.re.ss:port' or just 'port' or '/path/to/unix/socket'
|
||||
<value name="listen_address">0.0.0.0:9000</value>
|
||||
|
||||
<value name="listen_options">
|
||||
Set listen(2) backlog
|
||||
<value name="backlog">1024</value>
|
||||
Set permissions for unix socket, if one used.
|
||||
In Linux read/write permissions must be set in order to allow connections from web server.
|
||||
Many BSD-derrived systems allow connections regardless of permissions.
|
||||
<value name="owner"></value>
|
||||
<value name="group"></value>
|
||||
<value name="mode">0666</value>
|
||||
</value>
|
||||
|
||||
Additional php.ini defines, specific to this pool of workers.
|
||||
<value name="php_defines">
|
||||
<value name="error_reporting">6135</value>
|
||||
<value name="xmlrpc_errors">0</value>
|
||||
<value name="report_memleaks">1</value>
|
||||
<value name="display_errors">0</value>
|
||||
<value name="display_startup_errors">0</value>
|
||||
<value name="track_errors">1</value>
|
||||
<value name="log_errors">1</value>
|
||||
<value name="html_errors">0</value>
|
||||
</value>
|
||||
|
||||
Unix user of processes
|
||||
<value name="user">devilbox</value>
|
||||
|
||||
Unix group of processes
|
||||
<value name="group">devilbox</value>
|
||||
|
||||
Process manager settings
|
||||
<value name="pm">
|
||||
|
||||
Sets style of controling worker process count.
|
||||
Valid values are 'static' and 'apache-like'
|
||||
<value name="style">apache-like</value>
|
||||
|
||||
Sets the limit on the number of simultaneous requests that will be served.
|
||||
Equivalent to Apache MaxClients directive.
|
||||
Equivalent to PHP_FCGI_CHILDREN environment in original php.fcgi
|
||||
Used with any pm_style.
|
||||
<!--<value name="max_children">50</value>-->
|
||||
<value name="max_children">5</value>
|
||||
|
||||
Settings group for 'apache-like' pm style
|
||||
<value name="apache_like">
|
||||
Sets the number of server processes created on startup.
|
||||
Used only when 'apache-like' pm_style is selected
|
||||
<!--<value name="StartServers">4</value>-->
|
||||
<value name="StartServers">3</value>
|
||||
|
||||
Sets the desired minimum number of idle server processes.
|
||||
Used only when 'apache-like' pm_style is selected
|
||||
<!--<value name="MinSpareServers">2</value>-->
|
||||
<value name="MinSpareServers">2</value>
|
||||
|
||||
Sets the desired maximum number of idle server processes.
|
||||
Used only when 'apache-like' pm_style is selected
|
||||
<!--<value name="MaxSpareServers">6</value>-->
|
||||
<value name="MaxSpareServers">4</value>
|
||||
</value>
|
||||
|
||||
</value>
|
||||
|
||||
The timeout (in seconds) for serving a single request after which the worker process will be terminated
|
||||
Should be used when 'max_execution_time' ini option does not stop script execution for some reason
|
||||
'0s' means 'off'
|
||||
<value name="request_terminate_timeout">120s</value>
|
||||
|
||||
The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
|
||||
'0s' means 'off'
|
||||
<value name="request_slowlog_timeout">0s</value>
|
||||
|
||||
The log file for slow requests
|
||||
<value name="slowlog">/proc/self/fd/2</value>
|
||||
|
||||
Set open file desc rlimit
|
||||
<value name="rlimit_files">1024</value>
|
||||
|
||||
Set max core size rlimit
|
||||
<value name="rlimit_core">0</value>
|
||||
|
||||
Chroot to this directory at the start, absolute path
|
||||
<value name="chroot"></value>
|
||||
|
||||
Chdir to this directory at the start, absolute path
|
||||
<value name="chdir"></value>
|
||||
|
||||
Redirect workers' stdout and stderr into main error log.
|
||||
If not set, they will be redirected to /dev/null, according to FastCGI specs
|
||||
<value name="catch_workers_output">yes</value>
|
||||
|
||||
How much requests each process should execute before respawn.
|
||||
Useful to work around memory leaks in 3rd party libraries.
|
||||
For endless request processing please specify 0
|
||||
Equivalent to PHP_FCGI_MAX_REQUESTS
|
||||
<value name="max_requests">500</value>
|
||||
|
||||
Comma separated list of ipv4 addresses of FastCGI clients that allowed to connect.
|
||||
Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+)
|
||||
Makes sense only with AF_INET listening socket.
|
||||
<!-- <value name="allowed_clients">127.0.0.1</value> -->
|
||||
|
||||
Pass environment variables like LD_LIBRARY_PATH
|
||||
All $VARIABLEs are taken from current environment
|
||||
<value name="environment">
|
||||
<value name="HOSTNAME">$HOSTNAME</value>
|
||||
<value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
|
||||
<value name="TMP">/tmp</value>
|
||||
<value name="TMPDIR">/tmp</value>
|
||||
<value name="TEMP">/tmp</value>
|
||||
<value name="OSTYPE">$OSTYPE</value>
|
||||
<value name="MACHTYPE">$MACHTYPE</value>
|
||||
<value name="MALLOC_CHECK_">2</value>
|
||||
</value>
|
||||
|
||||
</section>
|
||||
|
||||
</workers>
|
||||
|
||||
</configuration>
|
||||
132
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf
Normal file
132
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.3.conf
Normal file
@@ -0,0 +1,132 @@
|
||||
; ################################################################################
|
||||
; ####
|
||||
; #### 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]
|
||||
|
||||
; 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.4.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.5.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-5.6.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.0.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.1.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.2.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.3.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.4.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.4.conf
Normal 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
|
||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-8.0.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-8.0.conf
Normal 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
|
||||
@@ -1,10 +0,0 @@
|
||||
[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
|
||||
@@ -1,10 +0,0 @@
|
||||
[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
|
||||
@@ -1,3 +0,0 @@
|
||||
[www]
|
||||
; Ensure to listen here
|
||||
listen = 9000
|
||||
@@ -1,6 +0,0 @@
|
||||
[global]
|
||||
error_log = /proc/self/fd/2
|
||||
|
||||
[www]
|
||||
; if we send this to /proc/self/fd/1, it never appears
|
||||
access.log = /proc/self/fd/2
|
||||
@@ -1,2 +0,0 @@
|
||||
[global]
|
||||
log_level = notice
|
||||
@@ -1,7 +0,0 @@
|
||||
[www]
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 20
|
||||
pm.start_servers = 10
|
||||
pm.min_spare_servers = 5
|
||||
pm.max_spare_servers = 10
|
||||
@@ -1,5 +0,0 @@
|
||||
[www]
|
||||
|
||||
; User and Group
|
||||
user = devilbox
|
||||
group = devilbox
|
||||
49
Dockerfiles/base/data/php-ini.d/php-5.2.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-5.2.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 5.2-base
|
||||
; ############################################################
|
||||
|
||||
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||
; If none is present, the one from the previous flavour is inherited.
|
||||
|
||||
|
||||
[PHP]
|
||||
|
||||
; Memory
|
||||
; Note: "memory_limit" should be larger than "post_max_size"
|
||||
memory_limit = 512M
|
||||
|
||||
|
||||
; Timeouts
|
||||
max_execution_time = 120
|
||||
max_input_time = 120
|
||||
|
||||
|
||||
; Uploads
|
||||
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||
post_max_size = 72M
|
||||
upload_max_filesize = 64M
|
||||
max_file_uploads = 20
|
||||
|
||||
|
||||
; Vars
|
||||
variables_order = EGPCS
|
||||
max_input_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
|
||||
|
||||
|
||||
; Xdebug settings
|
||||
xdebug.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
49
Dockerfiles/base/data/php-ini.d/php-5.3.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-5.3.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 5.3-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_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
|
||||
|
||||
|
||||
; Xdebug settings
|
||||
xdebug.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
50
Dockerfiles/base/data/php-ini.d/php-5.4.ini
Normal file
50
Dockerfiles/base/data/php-ini.d/php-5.4.ini
Normal file
@@ -0,0 +1,50 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 5.4-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
|
||||
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
|
||||
50
Dockerfiles/base/data/php-ini.d/php-5.5.ini
Normal file
50
Dockerfiles/base/data/php-ini.d/php-5.5.ini
Normal file
@@ -0,0 +1,50 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 5.5-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
|
||||
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
|
||||
50
Dockerfiles/base/data/php-ini.d/php-5.6.ini
Normal file
50
Dockerfiles/base/data/php-ini.d/php-5.6.ini
Normal file
@@ -0,0 +1,50 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 5.6-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
|
||||
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
|
||||
50
Dockerfiles/base/data/php-ini.d/php-7.0.ini
Normal file
50
Dockerfiles/base/data/php-ini.d/php-7.0.ini
Normal file
@@ -0,0 +1,50 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 7.0-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
|
||||
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
|
||||
50
Dockerfiles/base/data/php-ini.d/php-7.1.ini
Normal file
50
Dockerfiles/base/data/php-ini.d/php-7.1.ini
Normal file
@@ -0,0 +1,50 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 7.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
|
||||
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
|
||||
49
Dockerfiles/base/data/php-ini.d/php-7.2.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-7.2.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 7.2-base
|
||||
; ############################################################
|
||||
|
||||
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||
; If none is present, the one from the previous flavour is inherited.
|
||||
|
||||
|
||||
[PHP]
|
||||
|
||||
; Memory
|
||||
; Note: "memory_limit" should be larger than "post_max_size"
|
||||
memory_limit = 512M
|
||||
|
||||
|
||||
; Timeouts
|
||||
max_execution_time = 120
|
||||
max_input_time = 120
|
||||
|
||||
|
||||
; Uploads
|
||||
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||
post_max_size = 72M
|
||||
upload_max_filesize = 64M
|
||||
max_file_uploads = 20
|
||||
|
||||
|
||||
; Vars
|
||||
variables_order = EGPCS
|
||||
max_input_vars = 8000
|
||||
max_input_nesting_level = 64
|
||||
|
||||
|
||||
; Error reporting
|
||||
; Note: error_log is dynamic and handled during start to set appropriate setting
|
||||
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||
xmlrpc_errors = Off
|
||||
report_memleaks = On
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
html_errors = Off
|
||||
|
||||
|
||||
; Xdebug settings
|
||||
xdebug.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
49
Dockerfiles/base/data/php-ini.d/php-7.3.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-7.3.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 7.3-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.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
49
Dockerfiles/base/data/php-ini.d/php-7.4.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-7.4.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 7.4-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.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
49
Dockerfiles/base/data/php-ini.d/php-8.0.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-8.0.ini
Normal file
@@ -0,0 +1,49 @@
|
||||
; ############################################################
|
||||
; # Devilbox PHP defaults for 8.0-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.default_enable = Off
|
||||
xdebug.profiler_enable = Off
|
||||
xdebug.remote_enable = Off
|
||||
xdebug.remote_autostart = Off
|
||||
777
Dockerfiles/mods/Dockerfile-5.2
Normal file
777
Dockerfiles/mods/Dockerfile-5.2
Normal file
@@ -0,0 +1,777 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||
FROM devilbox/php-fpm:5.2-base as builder
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
libbz2-dev \
|
||||
libc-client-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libenchant-dev \
|
||||
libevent-dev \
|
||||
libfbclient2 \
|
||||
libfreetype6-dev \
|
||||
libib-util \
|
||||
libicu-dev \
|
||||
libjpeg-dev \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libmagic-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libpcre3-dev \
|
||||
libpng-dev \
|
||||
libpq-dev \
|
||||
libpspell-dev \
|
||||
librabbitmq-dev \
|
||||
librecode-dev \
|
||||
libsasl2-dev \
|
||||
libsnmp-dev \
|
||||
libssl-dev \
|
||||
libtidy-dev \
|
||||
libvpx-dev \
|
||||
libxml2-dev \
|
||||
libxpm-dev \
|
||||
libxslt-dev \
|
||||
snmp \
|
||||
zlib1g-dev \
|
||||
ca-certificates \
|
||||
git
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
|
||||
|
||||
|
||||
###
|
||||
### Install and enable PHP modules
|
||||
###
|
||||
# Enable ffi if it exists
|
||||
RUN set -eux \
|
||||
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
|
||||
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
|
||||
fi
|
||||
|
||||
# -------------------- Installing PHP Extension: ioncube --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Custom extension
|
||||
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
|
||||
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
|
||||
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
|
||||
&& tar xvfz ioncube.tar.gz \
|
||||
&& cd ioncube \
|
||||
&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \
|
||||
&& cd ../ \
|
||||
&& rm -rf ioncube \
|
||||
&& rm -rf ioncube.tar.gz \
|
||||
\
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: amqp --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install amqp-1.4.0 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable amqp \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: bcmath --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: bz2 --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: calendar --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: dba --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: enchant --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Custom: Pecl command
|
||||
&& echo "/usr" | pecl install enchant \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable enchant \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: exif --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: fileinfo --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install fileinfo \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable fileinfo \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: ftp --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure ftp --with-openssl-dir \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: gd --------------------
|
||||
RUN set -eux \
|
||||
# Version specific pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
|
||||
mkdir /usr/include/freetype2/freetype && \
|
||||
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
|
||||
\
|
||||
# Installation: Version specific
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \
|
||||
# Installation
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: gettext --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: igbinary --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install igbinary-2.0.7 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable igbinary \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: imap --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: interbase --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: intl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install intl \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable intl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: ldap --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: mcrypt --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: msgpack --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install msgpack-0.5.7 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable msgpack \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: memcache --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install memcache-2.2.7 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable memcache \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: memcached --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install memcached-2.1.0 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable memcached \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: mongo --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Custom: Pecl command
|
||||
&& yes yes | pecl install mongo-1.5.8 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable mongo \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: oauth --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install oauth-1.2.3 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable oauth \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: opcache --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Custom: Pecl command
|
||||
&& pecl install zendopcache \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable opcache \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pcntl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_dblib --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_firebird --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pgsql --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: phar --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install phar \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable phar \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pspell --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: recode --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: redis --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install redis-2.2.7 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable redis \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: shmop --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: snmp --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure snmp --with-openssl-dir \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: sockets --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: sysvmsg --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: sysvsem --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: sysvshm --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: tidy --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: Built-in extension
|
||||
# Installation
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: uploadprogress --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install uploadprogress \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable uploadprogress \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: wddx --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure wddx --with-libxml-dir=/usr \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xdebug --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install xdebug-2.2.7 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable xdebug \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xmlrpc --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xsl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: zip --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
|
||||
# Installation
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
||||
&& true
|
||||
|
||||
|
||||
|
||||
|
||||
# Fix php.ini settings for enabled extensions
|
||||
RUN set -eux \
|
||||
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
|
||||
|
||||
# Fix oracle dir for images that don't have oci installed
|
||||
RUN set -eux \
|
||||
&& mkdir -p /usr/lib/oracle/
|
||||
|
||||
# Shrink everything down
|
||||
RUN set -eux \
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||
FROM devilbox/php-fpm:5.2-base as final
|
||||
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.2-mods"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-mods"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods"
|
||||
|
||||
|
||||
###
|
||||
### 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/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 \
|
||||
libaspell15 \
|
||||
libc-client2007e \
|
||||
libenchant1c2a \
|
||||
libfbclient2 \
|
||||
libfreetype6 \
|
||||
libicu52 \
|
||||
libjpeg62-turbo \
|
||||
libmcrypt4 \
|
||||
libmemcachedutil2 \
|
||||
libmysqlclient18 \
|
||||
libpng12-0 \
|
||||
libpq5 \
|
||||
librabbitmq1 \
|
||||
librecode0 \
|
||||
libsybdb5 \
|
||||
libtidy-0.99-0 \
|
||||
libvpx1 \
|
||||
libxpm4 \
|
||||
libxslt1.1 \
|
||||
snmp \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& update-ca-certificates
|
||||
|
||||
|
||||
###
|
||||
### Post Install
|
||||
###
|
||||
###
|
||||
### 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 '^5.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
\
|
||||
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& rm -f /usr/local/etc/php/php.ini \
|
||||
\
|
||||
&& php -m | grep -oiE '^amqp$' \
|
||||
&& php-fpm -m | grep -oiE '^amqp$' \
|
||||
&& 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 '^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 '^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 '^interbase$' \
|
||||
&& php-fpm -m | grep -oiE '^interbase$' \
|
||||
&& 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 '^mongo$' \
|
||||
&& php-fpm -m | grep -oiE '^mongo$' \
|
||||
&& php -m | grep -oiE '^mysql$' \
|
||||
&& php-fpm -m | grep -oiE '^mysql$' \
|
||||
&& php -m | grep -oiE '^mysqli$' \
|
||||
&& php-fpm -m | grep -oiE '^mysqli$' \
|
||||
&& php -m | grep -oiE '^oauth$' \
|
||||
&& php-fpm -m | grep -oiE '^oauth$' \
|
||||
&& php -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php -m | grep -oiE '^openssl$' \
|
||||
&& 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_dblib$' \
|
||||
&& php-fpm -m | grep -oiE '^pdo_dblib$' \
|
||||
&& 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_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 '^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 '^recode$' \
|
||||
&& php-fpm -m | grep -oiE '^recode$' \
|
||||
&& 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 '^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 '^uploadprogress$' \
|
||||
&& php-fpm -m | grep -oiE '^uploadprogress$' \
|
||||
&& php -m | grep -oiE '^wddx$' \
|
||||
&& php-fpm -m | grep -oiE '^wddx$' \
|
||||
&& 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 '^zip$' \
|
||||
&& php-fpm -m | grep -oiE '^zip$' \
|
||||
&& true
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
947
Dockerfiles/mods/Dockerfile-7.4
Normal file
947
Dockerfiles/mods/Dockerfile-7.4
Normal file
@@ -0,0 +1,947 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||
FROM devilbox/php-fpm:7.4-base as builder
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
libaio-dev \
|
||||
libbz2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libenchant-dev \
|
||||
libevent-dev \
|
||||
libfbclient2 \
|
||||
libffi-dev \
|
||||
libfreetype6-dev \
|
||||
libgmp-dev \
|
||||
libib-util \
|
||||
libicu-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libmagickwand-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libnghttp2-dev \
|
||||
libpcre3-dev \
|
||||
libpng-dev \
|
||||
libpq-dev \
|
||||
libpspell-dev \
|
||||
librabbitmq-dev \
|
||||
librdkafka-dev \
|
||||
libsasl2-dev \
|
||||
libsnmp-dev \
|
||||
libssh2-1-dev \
|
||||
libssl-dev \
|
||||
libtidy-dev \
|
||||
libvpx-dev \
|
||||
libwebp-dev \
|
||||
libwebp6 \
|
||||
libxml2-dev \
|
||||
libxpm-dev \
|
||||
libxslt-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: amqp --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Custom: Pecl command
|
||||
&& echo "/usr" | pecl install amqp \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable amqp \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: apcu --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install apcu \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable apcu \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: bcmath --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
|
||||
&& 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
|
||||
# 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: ffi --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: GIT extension
|
||||
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \
|
||||
&& cd /tmp/ffi \
|
||||
# Custom: Install command
|
||||
&& phpize \
|
||||
&& ./configure --with-ffi \
|
||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||
&& make install \
|
||||
\
|
||||
# Enabling
|
||||
&& docker-php-ext-enable ffi \
|
||||
&& 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 --enable-gd-jis-conv \
|
||||
# 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: imagick --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install imagick \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable imagick \
|
||||
&& 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: Version specific
|
||||
# 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
|
||||
&& phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable memcached \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: mongodb --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install mongodb \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable mongodb \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: mysqli --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: oauth --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install oauth \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable oauth \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: oci8 --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||
\
|
||||
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
\
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
|
||||
# Generic post-command
|
||||
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||
\
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: opcache --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pcntl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_dblib --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_firebird --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_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: phalcon --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: GIT extension
|
||||
&& git clone https://github.com/phalcon/cphalcon /tmp/phalcon \
|
||||
&& cd /tmp/phalcon \
|
||||
# Custom: Branch
|
||||
&& git checkout $(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) \
|
||||
# Custom: Install command
|
||||
&& cd build && ./install \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable phalcon \
|
||||
&& 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: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install redis \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable redis \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: rdkafka --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install rdkafka \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable rdkafka \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: shmop --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# 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: Version specific
|
||||
# Type: Built-in extension
|
||||
# Installation
|
||||
&& 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: 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: ssh2 --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install ssh2-1.2 \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable ssh2 \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: swoole --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Custom: Pecl command
|
||||
&& yes yes | pecl install swoole \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable swoole \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: sysvmsg --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# 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: uploadprogress --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: GIT extension
|
||||
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
|
||||
&& cd /tmp/uploadprogress \
|
||||
# Default: Install command
|
||||
&& phpize \
|
||||
&& ./configure --enable-uploadprogress \
|
||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||
&& make install \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable uploadprogress \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xdebug --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: PECL extension
|
||||
# Default: Pecl command
|
||||
&& pecl install xdebug \
|
||||
# Enabling
|
||||
&& docker-php-ext-enable xdebug \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xmlrpc --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure xmlrpc --with-iconv-dir=/usr \
|
||||
# Installation
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xsl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: zip --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Version specific
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure zip --with-zip \
|
||||
# Installation
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
||||
&& true
|
||||
|
||||
|
||||
|
||||
|
||||
# Fix php.ini settings for enabled extensions
|
||||
RUN set -eux \
|
||||
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
|
||||
|
||||
# Fix oracle dir for images that don't have oci installed
|
||||
RUN set -eux \
|
||||
&& mkdir -p /usr/lib/oracle/
|
||||
|
||||
# Shrink everything down
|
||||
RUN set -eux \
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||
FROM devilbox/php-fpm:7.4-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"="7.4-mods"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-mods"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-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/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 \
|
||||
libenchant1c2a \
|
||||
libfbclient2 \
|
||||
libffi6 \
|
||||
libfreetype6 \
|
||||
libicu63 \
|
||||
libjpeg62-turbo \
|
||||
libmagickwand-6.q16-6 \
|
||||
libmcrypt4 \
|
||||
libmemcachedutil2 \
|
||||
libnghttp2-14 \
|
||||
libpng16-16 \
|
||||
libpq5 \
|
||||
librabbitmq4 \
|
||||
librdkafka1 \
|
||||
libssh2-1 \
|
||||
libsybdb5 \
|
||||
libtidy5deb1 \
|
||||
libvpx5 \
|
||||
libwebp-dev \
|
||||
libwebp6 \
|
||||
libxpm4 \
|
||||
libxslt1.1 \
|
||||
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 '^7.4' \
|
||||
&& /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 '^amqp$' \
|
||||
&& php-fpm -m | grep -oiE '^amqp$' \
|
||||
&& php -m | grep -oiE '^apcu$' \
|
||||
&& php-fpm -m | grep -oiE '^apcu$' \
|
||||
&& php -m | grep -oiE '^bcmath$' \
|
||||
&& php-fpm -m | grep -oiE '^bcmath$' \
|
||||
&& php -m | grep -oiE '^bz2$' \
|
||||
&& 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 '^imagick$' \
|
||||
&& php-fpm -m | grep -oiE '^imagick$' \
|
||||
&& php -m | grep -oiE '^intl$' \
|
||||
&& php-fpm -m | grep -oiE '^intl$' \
|
||||
&& php -m | grep -oiE '^json$' \
|
||||
&& php-fpm -m | grep -oiE '^json$' \
|
||||
&& php -m | grep -oiE '^ldap$' \
|
||||
&& php-fpm -m | grep -oiE '^ldap$' \
|
||||
&& php -m | grep -oiE '^libxml$' \
|
||||
&& php-fpm -m | grep -oiE '^libxml$' \
|
||||
&& php -m | grep -oiE '^mbstring$' \
|
||||
&& php-fpm -m | grep -oiE '^mbstring$' \
|
||||
&& php -m | grep -oiE '^mcrypt$' \
|
||||
&& php-fpm -m | grep -oiE '^mcrypt$' \
|
||||
&& php -m | grep -oiE '^msgpack$' \
|
||||
&& php-fpm -m | grep -oiE '^msgpack$' \
|
||||
&& php -m | grep -oiE '^memcache$' \
|
||||
&& php-fpm -m | grep -oiE '^memcache$' \
|
||||
&& php -m | grep -oiE '^memcached$' \
|
||||
&& php-fpm -m | grep -oiE '^memcached$' \
|
||||
&& php -m | grep -oiE '^mongodb$' \
|
||||
&& php-fpm -m | grep -oiE '^mongodb$' \
|
||||
&& php -m | grep -oiE '^mysqli$' \
|
||||
&& php-fpm -m | grep -oiE '^mysqli$' \
|
||||
&& php -m | grep -oiE '^mysqlnd$' \
|
||||
&& php-fpm -m | grep -oiE '^mysqlnd$' \
|
||||
&& php -m | grep -oiE '^oauth$' \
|
||||
&& php-fpm -m | grep -oiE '^oauth$' \
|
||||
&& php -m | grep -oiE '^oci8$' \
|
||||
&& php-fpm -m | grep -oiE '^oci8$' \
|
||||
&& php -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php -m | grep -oiE '^openssl$' \
|
||||
&& php-fpm -m | grep -oiE '^openssl$' \
|
||||
&& php -m | grep -oiE '^pcntl$' \
|
||||
&& php-fpm -m | grep -oiE '^pcntl$' \
|
||||
&& php -m | grep -oiE '^pcre$' \
|
||||
&& php-fpm -m | grep -oiE '^pcre$' \
|
||||
&& php -m | grep -oiE '^pdo$' \
|
||||
&& php-fpm -m | grep -oiE '^pdo$' \
|
||||
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||
&& php-fpm -m | grep -oiE '^pdo_dblib$' \
|
||||
&& 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 '^phalcon$' \
|
||||
&& php-fpm -m | grep -oiE '^phalcon$' \
|
||||
&& 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 '^rdkafka$' \
|
||||
&& php-fpm -m | grep -oiE '^rdkafka$' \
|
||||
&& 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 '^ssh2$' \
|
||||
&& php-fpm -m | grep -oiE '^ssh2$' \
|
||||
&& php -m | grep -oiE '^swoole$' \
|
||||
&& php-fpm -m | grep -oiE '^swoole$' \
|
||||
&& php -m | grep -oiE '^sysvmsg$' \
|
||||
&& php-fpm -m | grep -oiE '^sysvmsg$' \
|
||||
&& php -m | grep -oiE '^sysvsem$' \
|
||||
&& 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 '^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 '^zip$' \
|
||||
&& php-fpm -m | grep -oiE '^zip$' \
|
||||
&& true
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
762
Dockerfiles/mods/Dockerfile-8.0
Normal file
762
Dockerfiles/mods/Dockerfile-8.0
Normal file
@@ -0,0 +1,762 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||
FROM devilbox/php-fpm:8.0-base as builder
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
libaio-dev \
|
||||
libbz2-dev \
|
||||
libenchant-dev \
|
||||
libevent-dev \
|
||||
libfbclient2 \
|
||||
libfreetype6-dev \
|
||||
libgmp-dev \
|
||||
libib-util \
|
||||
libicu-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libmemcached-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 \
|
||||
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: 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 --enable-gd-jis-conv \
|
||||
# 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: 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: 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.0
|
||||
&& 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: 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 \
|
||||
\
|
||||
# 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: oci8 --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||
\
|
||||
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||
\
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
|
||||
# Generic post-command
|
||||
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||
\
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: opcache --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pcntl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_dblib --------------------
|
||||
RUN set -eux \
|
||||
# Generic pre-command
|
||||
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_firebird --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: pdo_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: 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
|
||||
&& sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
|
||||
&& phpize \
|
||||
&& ./configure --enable-redis \
|
||||
&& 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: 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: 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 --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
# Custom: configure command
|
||||
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: xsl --------------------
|
||||
RUN set -eux \
|
||||
# Installation: Generic
|
||||
# Type: Built-in extension
|
||||
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||
&& true
|
||||
|
||||
|
||||
# -------------------- Installing PHP Extension: zip --------------------
|
||||
RUN set -eux \
|
||||
# Installation: 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.0-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.0-mods"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-mods"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-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/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 \
|
||||
libenchant1c2a \
|
||||
libfbclient2 \
|
||||
libffi6 \
|
||||
libfreetype6 \
|
||||
libicu63 \
|
||||
libjpeg62-turbo \
|
||||
libmemcachedutil2 \
|
||||
libpng16-16 \
|
||||
libpq5 \
|
||||
libsybdb5 \
|
||||
libtidy5deb1 \
|
||||
libvpx5 \
|
||||
libwebp6 \
|
||||
libxpm4 \
|
||||
libxslt1.1 \
|
||||
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.0' \
|
||||
&& /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 '^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 '^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 '^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 '^oci8$' \
|
||||
&& php-fpm -m | grep -oiE '^oci8$' \
|
||||
&& php -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
|
||||
&& php -m | grep -oiE '^openssl$' \
|
||||
&& php-fpm -m | grep -oiE '^openssl$' \
|
||||
&& php -m | grep -oiE '^pcntl$' \
|
||||
&& php-fpm -m | grep -oiE '^pcntl$' \
|
||||
&& php -m | grep -oiE '^pcre$' \
|
||||
&& php-fpm -m | grep -oiE '^pcre$' \
|
||||
&& php -m | grep -oiE '^pdo$' \
|
||||
&& php-fpm -m | grep -oiE '^pdo$' \
|
||||
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||
&& php-fpm -m | grep -oiE '^pdo_dblib$' \
|
||||
&& 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 '^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 '^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 '^uploadprogress$' \
|
||||
&& php-fpm -m | grep -oiE '^uploadprogress$' \
|
||||
&& 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 '^zip$' \
|
||||
&& php-fpm -m | grep -oiE '^zip$' \
|
||||
&& true
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/local/sbin/php-fpm"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
97
Dockerfiles/prod/Dockerfile-5.2
Normal file
97
Dockerfiles/prod/Dockerfile-5.2
Normal file
@@ -0,0 +1,97 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
|
||||
FROM devilbox/php-fpm:5.2-mods
|
||||
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
|
||||
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.2-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (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 '^5.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
\
|
||||
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& rm -f /usr/local/etc/php/php.ini
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||
COPY ./data/postfix.sh /usr/local/sbin/postfix.sh
|
||||
COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
|
||||
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.3-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.3-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.4 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.4-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.4-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.5 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.5-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.5-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.6 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.6-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.6-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.0 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.0-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.0-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.1 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.1-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.1-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.2 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.2-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.2-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,43 +6,66 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.3-prod" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.3-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& 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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor
|
||||
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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
|
||||
|
||||
|
||||
###
|
||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
@@ -74,4 +93,5 @@ EXPOSE 9000
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
97
Dockerfiles/prod/Dockerfile-7.4
Normal file
97
Dockerfiles/prod/Dockerfile-7.4
Normal file
@@ -0,0 +1,97 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
|
||||
FROM devilbox/php-fpm:7.4-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"="7.4-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (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 '^7.4' \
|
||||
&& /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"]
|
||||
97
Dockerfiles/prod/Dockerfile-8.0
Normal file
97
Dockerfiles/prod/Dockerfile-8.0
Normal file
@@ -0,0 +1,97 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
|
||||
FROM devilbox/php-fpm:8.0-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.0-prod"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-prod"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
|
||||
|
||||
|
||||
###
|
||||
### Install
|
||||
###
|
||||
RUN set -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 /etc/supervisor/conf.d \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
\
|
||||
&& (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.0' \
|
||||
&& /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"]
|
||||
121
Dockerfiles/prod/data/docker-entrypoint.d/301-postfix.sh
Executable file
121
Dockerfiles/prod/data/docker-entrypoint.d/301-postfix.sh
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
############################################################
|
||||
# Functions
|
||||
############################################################
|
||||
|
||||
###
|
||||
### Setup Postfix for catch-all
|
||||
###
|
||||
set_postfix() {
|
||||
local env_varname="${1}"
|
||||
local username="${2}"
|
||||
local groupname="${3}"
|
||||
local php_ini_dir="${4}"
|
||||
local php_mail_log="${5}"
|
||||
local docker_logs="${6}"
|
||||
local debug="${7}"
|
||||
|
||||
local php_ini_file="${php_ini_dir}/devilbox-runtime-sendmail.ini"
|
||||
local enable_mail=
|
||||
|
||||
# Verify env value
|
||||
if ! env_set "${env_varname}"; then
|
||||
log "info" "\$${env_varname} not set." "${debug}"
|
||||
log "info" "Postfix will not be started." "${debug}"
|
||||
echo "" > "${php_ini_file}"
|
||||
return
|
||||
fi
|
||||
|
||||
# Retrieve env value
|
||||
enable_mail="$( env_get "${env_varname}" )"
|
||||
|
||||
# Enable postfix
|
||||
if [ "${enable_mail}" = "1" ] || [ "${enable_mail}" = "2" ]; then
|
||||
|
||||
if [ "${enable_mail}" = "1" ]; then
|
||||
log "info" "\$${env_varname} set to 1. Enabling postfix" "${debug}"
|
||||
else
|
||||
log "info" "\$${env_varname} set to 2. Enabling postfix catch-all" "${debug}"
|
||||
fi
|
||||
|
||||
# Configure PHP
|
||||
{
|
||||
echo "[mail function]";
|
||||
echo "sendmail_path = $( command -v sendmail ) -t -i";
|
||||
echo ";mail.force_extra_parameters =";
|
||||
echo "mail.add_x_header = On";
|
||||
echo "mail.log = ${php_mail_log}";
|
||||
} > "${php_ini_file}"
|
||||
|
||||
# PHP mail function logs to file
|
||||
if [ "${docker_logs}" != "1" ]; then
|
||||
# Fix PHP mail log file dir/file and permissions
|
||||
if [ ! -d "$( dirname "${php_mail_log}" )" ]; then
|
||||
run "mkdir -p $( dirname "${php_mail_log}" )" "${debug}"
|
||||
fi
|
||||
if [ ! -f "${php_mail_log}" ]; then
|
||||
run "touch ${php_mail_log}" "${debug}"
|
||||
fi
|
||||
run "chown ${username}:${groupname} $( dirname "${php_mail_log}" )" "${debug}"
|
||||
run "chown ${username}:${groupname} ${php_mail_log}" "${debug}"
|
||||
run "chmod 0644 ${php_mail_log}" "${debug}"
|
||||
fi
|
||||
|
||||
# Add Mail dir/file if it does not exist
|
||||
if [ ! -d "/var/mail" ]; then
|
||||
run "mkdir /var/mail" "${debug}"
|
||||
fi
|
||||
if [ ! -f "/var/mail/${username}" ]; then
|
||||
run "touch /var/mail/${username}" "${debug}"
|
||||
fi
|
||||
|
||||
# Fix mail dir/file permissions after mount
|
||||
run "chmod 0644 /var/mail/${username}" "${debug}"
|
||||
run "chown ${username}:${groupname} /var/mail" "${debug}"
|
||||
run "chown ${username}:${groupname} /var/mail/${username}" "${debug}"
|
||||
|
||||
# warning: specify "strict_mailbox_ownership = no" to ignore mailbox ownership mismatch
|
||||
run "postconf -e 'strict_mailbox_ownership=no'" "${debug}"
|
||||
|
||||
# Postfix configuration
|
||||
run "postconf -e 'inet_protocols=ipv4'" "${debug}"
|
||||
|
||||
# Postfix catch-all
|
||||
if [ "${enable_mail}" = "2" ]; then
|
||||
run "postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'" "${debug}"
|
||||
run "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}"
|
||||
run "newaliases" "${debug}"
|
||||
fi
|
||||
|
||||
elif [ "${enable_mail}" = "0" ]; then
|
||||
log "info" "\$${env_varname} set to 0. Disabling postfix" "${debug}"
|
||||
|
||||
else
|
||||
log "err" "Invalid value for \$${env_varname}. Can only be 0, 1 or 2. Prodived: ${enable_mail}" "${debug}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# Sanity Checks
|
||||
############################################################
|
||||
|
||||
if ! command -v sendmail >/dev/null 2>&1; then
|
||||
log "err" "sendmail not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v postconf >/dev/null 2>&1; then
|
||||
log "err" "postconf not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v newaliases >/dev/null 2>&1; then
|
||||
log "err" "newaliases not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
@@ -10,21 +10,26 @@ set -o pipefail
|
||||
############################################################
|
||||
|
||||
_log_to_dockerlogs() {
|
||||
local conf_logfile="${1}"
|
||||
local php_fpm_conf="${1}"
|
||||
local php_ini_conf="${2}"
|
||||
{
|
||||
echo "[global]"
|
||||
echo "error_log = /proc/self/fd/2"
|
||||
echo "[www]"
|
||||
echo "access.log = /proc/self/fd/2"
|
||||
} > "${conf_logfile}"
|
||||
} > "${php_fpm_conf}"
|
||||
{
|
||||
echo "error_log = /proc/self/fd/2"
|
||||
} > "${php_ini_conf}"
|
||||
}
|
||||
|
||||
_log_to_files() {
|
||||
local conf_logfile="${1}"
|
||||
local log_dir="${2}"
|
||||
local user="${3}"
|
||||
local group="${4}"
|
||||
local debug="${5}"
|
||||
local php_fpm_conf="${1}"
|
||||
local php_ini_conf="${2}"
|
||||
local log_dir="${3}"
|
||||
local user="${4}"
|
||||
local group="${5}"
|
||||
local debug="${6}"
|
||||
|
||||
# Create Log directory and files
|
||||
if [ ! -d "${log_dir}" ]; then
|
||||
@@ -43,7 +48,10 @@ _log_to_files() {
|
||||
echo "error_log = ${log_dir}/php-fpm.error"
|
||||
echo "[www]"
|
||||
echo "access.log = ${log_dir}/php-fpm.access"
|
||||
} > "${conf_logfile}"
|
||||
} > "${php_fpm_conf}"
|
||||
{
|
||||
echo "error_log = ${log_dir}/php-fpm.error"
|
||||
} > "${php_ini_conf}"
|
||||
}
|
||||
|
||||
|
||||
@@ -77,17 +85,18 @@ is_docker_logs_enabled() {
|
||||
set_docker_logs() {
|
||||
local env_varname="${1}"
|
||||
local log_dir="${2}"
|
||||
local conf_logfile="${3}"
|
||||
local user="${4}"
|
||||
local group="${5}"
|
||||
local debug="${6}"
|
||||
local php_fpm_conf="${3}"
|
||||
local php_ini_conf="${4}"
|
||||
local user="${5}"
|
||||
local group="${6}"
|
||||
local debug="${7}"
|
||||
|
||||
local docker_logs=
|
||||
|
||||
if ! env_set "${env_varname}"; then
|
||||
log "info" "\$${env_varname} not set." "${debug}"
|
||||
log "info" "Logging to docker logs (stdout and stderr)." "${debug}"
|
||||
_log_to_dockerlogs "${conf_logfile}"
|
||||
_log_to_dockerlogs "${php_fpm_conf}" "${php_ini_conf}"
|
||||
else
|
||||
docker_logs="$( env_get "${env_varname}" )"
|
||||
|
||||
@@ -95,12 +104,12 @@ set_docker_logs() {
|
||||
if [ "${docker_logs}" = "0" ]; then
|
||||
log "info" "\$${env_varname} set to 0. Logging to files under: ${log_dir}" "${debug}"
|
||||
log "info" "Make sure to mount this directory in order to view logs" "${debug}"
|
||||
_log_to_files "${conf_logfile}" "${log_dir}" "${user}" "${group}" "${debug}"
|
||||
_log_to_files "${php_fpm_conf}" "${php_ini_conf}" "${log_dir}" "${user}" "${group}" "${debug}"
|
||||
|
||||
# Keep docker logs
|
||||
elif [ "${docker_logs}" = "1" ]; then
|
||||
log "info" "\$${env_varname} set to 1. Logging to docker logs (stdout and stderr)." "${debug}"
|
||||
_log_to_dockerlogs "${conf_logfile}"
|
||||
_log_to_dockerlogs "${php_fpm_conf}" "${php_ini_conf}"
|
||||
else
|
||||
log "err" "Invalid value for \$${env_varname}. Can only be 0 or 1. Provided: ${docker_logs}" "${debug}"
|
||||
exit 1
|
||||
@@ -27,8 +27,8 @@ copy_ini_files() {
|
||||
'
|
||||
for ini_f in ${ini_files}; do
|
||||
ini_name="$( basename "${ini_f}" )"
|
||||
log "info" "PHP.ini: ${ini_name} -> ${ini_dst}/zzz-devilbox-${ini_name}" "${debug}"
|
||||
run "cp ${ini_f} ${ini_dst}/zzz-devilbox-${ini_name}" "${debug}"
|
||||
log "info" "PHP.ini: ${ini_name} -> ${ini_dst}/yyy-devilbox-user-runtime-${ini_name}" "${debug}"
|
||||
run "cp ${ini_f} ${ini_dst}/yyy-devilbox-user-runtime-${ini_name}" "${debug}"
|
||||
done
|
||||
run "find ${ini_dst} -type f -iname '*.ini' -exec chmod 0644 \"{}\" \;" "${debug}"
|
||||
}
|
||||
@@ -27,12 +27,28 @@ copy_fpm_files() {
|
||||
'
|
||||
for fpm_f in ${fpm_files}; do
|
||||
fpm_name="$( basename "${fpm_f}" )"
|
||||
log "info" "PHP-FPM.conf: ${fpm_name} -> ${fpm_dst}/zzz-devilbox-${fpm_name}" "${debug}"
|
||||
run "cp ${fpm_f} ${fpm_dst}/zzz-devilbox-${fpm_name}" "${debug}"
|
||||
log "info" "PHP-FPM.conf: ${fpm_name} -> ${fpm_dst}/yyy-devilbox-user-runtime-${fpm_name}" "${debug}"
|
||||
run "cp ${fpm_f} ${fpm_dst}/yyy-devilbox-user-runtime-${fpm_name}" "${debug}"
|
||||
done
|
||||
run "find ${fpm_dst} -type f -iname '*.conf' -exec chmod 0644 \"{}\" \;" "${debug}"
|
||||
}
|
||||
|
||||
###
|
||||
### Copy php-fpm.conf for PHP 5.2
|
||||
### Note: PHP 5.2 does not allow includes and comes in XML format,
|
||||
### we must therefore copy the file to its main file /usr/local/etc/php-fpm.conf
|
||||
###
|
||||
copy_fpm_5_2_conf_file() {
|
||||
local fpm_src="${1}"
|
||||
local fpm_dst="/usr/local/etc/php-fpm.conf"
|
||||
local debug="${2}"
|
||||
|
||||
if [ -f "${fpm_src}" ]; then
|
||||
log "info" "PHP-FPM.conf (PHP 5.2): php-fpm.xml -> ${fpm_dst}" "${debug}"
|
||||
run "cp ${fpm_src} ${fpm_dst}" "${debug}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# Sanity Checks
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# PHP FPM 5.3 does not allow to pass through environment variables
|
||||
# PHP FPM 5.2 and PHP-FPM 5.3 do not allow to pass through environment variables
|
||||
# This is a hacky shell script to create:
|
||||
# env[NAME]='VALUE' entries for PHP FPM config out of all current env vars
|
||||
|
||||
@@ -27,10 +27,11 @@ enable_modules() {
|
||||
|
||||
if [ -z "${mods}" ]; then
|
||||
log "info" "\$${mod_varname} set, but empty. Not enabling any PHP modules." "${debug}"
|
||||
else
|
||||
log "info" "Enabling the following PHP modules: ${mods}" "${debug}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
log "info" "Enabling the following PHP modules: ${mods}" "${debug}"
|
||||
|
||||
while read -r mod; do
|
||||
mod="$( echo "${mod}" | xargs )" # trim
|
||||
|
||||
@@ -24,10 +24,11 @@ disable_modules() {
|
||||
|
||||
if [ -z "${mods}" ]; then
|
||||
log "info" "\$${mod_varname} set, but empty. Not disabling any PHP modules." "${debug}"
|
||||
else
|
||||
log "info" "Disabling the following PHP modules: ${mods}" "${debug}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
log "info" "Disabling the following PHP modules: ${mods}" "${debug}"
|
||||
|
||||
while read -r mod; do
|
||||
mod="$( echo "${mod}" | xargs )" # trim
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
############################################################
|
||||
# Functions
|
||||
############################################################
|
||||
|
||||
###
|
||||
### Setup Postfix for catch-all
|
||||
###
|
||||
set_postfix() {
|
||||
local env_varname="${1}"
|
||||
local username="${2}"
|
||||
local groupname="${3}"
|
||||
local php_ini_dir="${4}"
|
||||
local php_mail_log="${5}"
|
||||
local docker_logs="${6}"
|
||||
local debug="${7}"
|
||||
|
||||
local php_ini_file="${php_ini_dir}/devilbox-runtime-sendmail.ini"
|
||||
local catch_all=
|
||||
|
||||
if ! env_set "${env_varname}"; then
|
||||
log "info" "\$${env_varname} not set." "${debug}"
|
||||
log "info" "Postfix will not be started." "${debug}"
|
||||
echo "" > "${php_ini_file}"
|
||||
else
|
||||
catch_all="$( env_get "${env_varname}" )"
|
||||
if [ "${catch_all}" = "1" ]; then
|
||||
log "info" "\$${env_varname} set to 1. Enabling postfix catch-all" "${debug}"
|
||||
|
||||
# Configure PHP
|
||||
{
|
||||
echo "[mail function]";
|
||||
echo "sendmail_path = $( which sendmail ) -t -i";
|
||||
echo ";mail.force_extra_parameters =";
|
||||
echo "mail.add_x_header = On";
|
||||
echo "mail.log = ${php_mail_log}";
|
||||
} > "${php_ini_file}"
|
||||
|
||||
# PHP mail function logs to file
|
||||
if [ "${docker_logs}" != "1" ]; then
|
||||
# Fix PHP mail log file dir/file and permissions
|
||||
if [ ! -d "$( dirname "${php_mail_log}" )" ]; then
|
||||
run "mkdir -p $( dirname "${php_mail_log}" )" "${debug}"
|
||||
fi
|
||||
if [ ! -f "${php_mail_log}" ]; then
|
||||
run "touch ${php_mail_log}" "${debug}"
|
||||
fi
|
||||
run "chown ${username}:${groupname} $( dirname "${php_mail_log}" )" "${debug}"
|
||||
run "chown ${username}:${groupname} ${php_mail_log}" "${debug}"
|
||||
run "chmod 0644 ${php_mail_log}" "${debug}"
|
||||
fi
|
||||
|
||||
# Add Mail dir/file if it does not exist
|
||||
if [ ! -d "/var/mail" ]; then
|
||||
run "mkdir /var/mail" "${debug}"
|
||||
fi
|
||||
if [ ! -f "/var/mail/${username}" ]; then
|
||||
run "touch /var/mail/${username}" "${debug}"
|
||||
fi
|
||||
|
||||
# Fix mail dir/file permissions after mount
|
||||
run "chmod 0644 /var/mail/${username}" "${debug}"
|
||||
run "chown ${username}:${groupname} /var/mail" "${debug}"
|
||||
run "chown ${username}:${groupname} /var/mail/${username}" "${debug}"
|
||||
|
||||
# Postfix configuration
|
||||
run "postconf -e 'inet_protocols=ipv4'" "${debug}"
|
||||
run "postconf -e 'virtual_alias_maps=pcre:/etc/postfix/virtual'" "${debug}"
|
||||
run "echo '/.*@.*/ ${username}' >> /etc/postfix/virtual" "${debug}"
|
||||
|
||||
run "newaliases" "${debug}"
|
||||
|
||||
elif [ "${catch_all}" = "0" ]; then
|
||||
log "info" "\$${env_varname} set to 0. Disabling postfix catch-all" "${debug}"
|
||||
|
||||
else
|
||||
log "err" "Invalid value for \$${env_varname}. Can only be 0 or 1. Prodived: ${catch_all}" "${debug}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# Sanity Checks
|
||||
############################################################
|
||||
|
||||
if ! command -v sendmail >/dev/null 2>&1; then
|
||||
log "err" "sendmail not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v postconf >/dev/null 2>&1; then
|
||||
log "err" "postconf not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v newaliases >/dev/null 2>&1; then
|
||||
log "err" "newaliases not found, but required." "1"
|
||||
exit 1
|
||||
fi
|
||||
49
Dockerfiles/prod/data/docker-entrypoint.d/310-custom-startup-scripts.sh
Executable file
49
Dockerfiles/prod/data/docker-entrypoint.d/310-custom-startup-scripts.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
############################################################
|
||||
# Functions
|
||||
############################################################
|
||||
|
||||
###
|
||||
### Execute custom uesr-supplied scripts
|
||||
###
|
||||
execute_custom_scripts() {
|
||||
local script_dir="${1}"
|
||||
local debug="${2}"
|
||||
|
||||
if [ ! -d "${script_dir}" ]; then
|
||||
run "mkdir -p ${script_dir}" "${debug}"
|
||||
fi
|
||||
script_files="$( find -L "${script_dir}" -type f -iname '*.sh' )"
|
||||
|
||||
# loop over them line by line
|
||||
IFS='
|
||||
'
|
||||
for script_f in ${script_files}; do
|
||||
script_name="$( basename "${script_f}" )"
|
||||
log "info" "Executing custom startup script: ${script_name}" "${debug}"
|
||||
if ! bash "${script_f}"; then
|
||||
log "err" "Failed to execute script" "${debug}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
############################################################
|
||||
# Sanity Checks
|
||||
############################################################
|
||||
|
||||
if ! command -v find >/dev/null 2>&1; then
|
||||
echo "find not found, but required."
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v basename >/dev/null 2>&1; then
|
||||
echo "basename not found, but required."
|
||||
exit 1
|
||||
fi
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -p pipefail
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
@@ -16,37 +16,38 @@ set -p pipefail
|
||||
# MY_GID
|
||||
|
||||
# Path to scripts to source
|
||||
CONFIG_DIR="/docker-entrypoint.d"
|
||||
DVL_CONFIG_DIR="/docker-entrypoint.d"
|
||||
|
||||
# php.ini.d directory
|
||||
PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||
|
||||
# php-fpm conf.d directory
|
||||
PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
|
||||
|
||||
# This is the log file for any mail related functions
|
||||
PHP_MAIL_LOG="/var/log/mail.log"
|
||||
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
|
||||
|
||||
# This file holds error and access log definitions
|
||||
FPM_CONF_LOGFILE="/usr/local/etc/php-fpm.d/logfiles.conf"
|
||||
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
||||
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
||||
|
||||
# PHP-FPM log dir
|
||||
FPM_LOG_DIR="/var/log/php"
|
||||
DVL_FPM_LOG_DIR="/var/log/php"
|
||||
|
||||
# This is the log file for any mail related functions
|
||||
DVL_PHP_MAIL_LOG="${DVL_FPM_LOG_DIR}/mail.log"
|
||||
|
||||
# Custom ini dir (to be copied to actual ini dir)
|
||||
PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||
|
||||
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
||||
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||
|
||||
# Supervisord config directory
|
||||
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||
|
||||
|
||||
###
|
||||
### Source libs
|
||||
###
|
||||
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||
for f in ${init}; do
|
||||
# shellcheck disable=SC1090
|
||||
. "${f}"
|
||||
@@ -75,13 +76,13 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
||||
###
|
||||
### Set timezone
|
||||
###
|
||||
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### PHP-FPM 5.3 Env variables
|
||||
### PHP-FPM 5.2 and PHP-FPM 5.3 Env variables fix
|
||||
###
|
||||
if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then
|
||||
if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.(2|3)'; then
|
||||
set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf"
|
||||
fi
|
||||
|
||||
@@ -91,8 +92,9 @@ fi
|
||||
###
|
||||
set_docker_logs \
|
||||
"DOCKER_LOGS" \
|
||||
"${FPM_LOG_DIR}" \
|
||||
"${FPM_CONF_LOGFILE}" \
|
||||
"${DVL_FPM_LOG_DIR}" \
|
||||
"${DVL_PHP_FPM_CONF_LOGFILE}" \
|
||||
"${DVL_PHP_INI_CONF_LOGFILE}" \
|
||||
"${MY_USER}" \
|
||||
"${MY_GROUP}" \
|
||||
"${DEBUG_LEVEL}"
|
||||
@@ -103,10 +105,10 @@ set_docker_logs \
|
||||
###
|
||||
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
||||
# PHP mail function should log to stderr
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||
else
|
||||
# PHP mail function should log to file
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
@@ -128,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
|
||||
supervisor_add_service \
|
||||
"socat-${lport}-${rhost}-${rport}" \
|
||||
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
||||
"${SUPERVISOR_CONFD}" \
|
||||
"${DVL_SUPERVISOR_CONFD}" \
|
||||
"${DEBUG_LEVEL}"
|
||||
done
|
||||
|
||||
@@ -136,28 +138,32 @@ done
|
||||
###
|
||||
### Supervisor: rsyslogd & postfix
|
||||
###
|
||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
|
||||
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ] || [ "$( env_get "ENABLE_MAIL" )" = "2" ]; then
|
||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
|
||||
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
### Supervisor: php-fpm
|
||||
###
|
||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Copy custom *.ini files
|
||||
###
|
||||
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Copy custom PHP-FPM *.conf files
|
||||
###
|
||||
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||
if [ "${PHP_VERSION}" = "5.2" ]; then
|
||||
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
||||
else
|
||||
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
@@ -172,8 +178,16 @@ enable_modules "ENABLE_MODULES" "${DEBUG_LEVEL}"
|
||||
disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Run custom user supplied scripts
|
||||
###
|
||||
execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}"
|
||||
execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
###
|
||||
### Startup
|
||||
###
|
||||
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||
exec "${@}"
|
||||
|
||||
@@ -22,14 +22,7 @@ set -o pipefail
|
||||
###
|
||||
### Variables
|
||||
###
|
||||
if [ -f "/etc/alpine-release" ]; then
|
||||
MAILLOG="/var/log/maillog"
|
||||
elif [ -f "/etc/debian_version" ]; then
|
||||
MAILLOG="/var/log/mail.log"
|
||||
else
|
||||
MAILLOG="/var/log/maillog"
|
||||
fi
|
||||
|
||||
MAILLOG="/var/log/mail.log"
|
||||
MAILPID="/var/spool/postfix/pid/master.pid"
|
||||
|
||||
|
||||
|
||||
523
Dockerfiles/work/Dockerfile-5.2
Normal file
523
Dockerfiles/work/Dockerfile-5.2
Normal file
@@ -0,0 +1,523 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
|
||||
FROM devilbox/php-fpm:5.2-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"="5.2-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-work"
|
||||
|
||||
|
||||
###
|
||||
### 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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
\
|
||||
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& 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 \
|
||||
coreutils \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mysql-client \
|
||||
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 \
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/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 https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& rm -rf /root/.cache/pip \
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Configure Bash
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/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 '^5.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||
\
|
||||
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||
&& rm -f /usr/local/etc/php/php.ini
|
||||
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& 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.+\)" \
|
||||
\
|
||||
# -------------------- 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]+$' \
|
||||
\
|
||||
# -------------------- 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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-5.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.2.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||
COPY ./data/bash-devilbox /etc/bash-devilbox
|
||||
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
|
||||
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
|
||||
|
||||
###
|
||||
### Ports
|
||||
###
|
||||
EXPOSE 9000
|
||||
|
||||
|
||||
###
|
||||
### Where to start inside the container
|
||||
###
|
||||
WORKDIR /shared/httpd
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.3-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.3-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,45 +31,59 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& curl -sS 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
@@ -70,11 +92,12 @@ RUN set -x \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +105,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,54 +168,52 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||
&& rm -rf /usr/local/src/drush7/.git \
|
||||
&& rm -rf /usr/local/src/drush7/docs \
|
||||
&& rm -rf /usr/local/src/drush7/examples \
|
||||
&& rm -rf /usr/local/src/drush7/misc \
|
||||
\
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# linuxbrew
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -173,7 +235,8 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout v2.0.7 \
|
||||
@@ -184,47 +247,212 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -232,7 +460,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -250,40 +478,82 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.0-9]+' \
|
||||
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
|
||||
&& regex-grep --version | grep -E '[.0-9]+' \
|
||||
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
|
||||
&& git-flow version | grep -E '[.0-9]+' \
|
||||
&& grunt --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]+' \
|
||||
&& sass --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-5.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.3.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
|
||||
@@ -293,10 +563,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -317,4 +583,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.4 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.4-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.4-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,45 +31,59 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& curl -sS 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
@@ -70,11 +92,12 @@ RUN set -x \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +105,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,64 +168,81 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# gitflow
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout v1.3.7 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -183,61 +264,228 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout v2.0.9 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -245,7 +493,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -263,42 +511,86 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
|
||||
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
|
||||
&& git-flow version | grep -E '[.0-9]+' \
|
||||
&& grunt --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]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-5.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.4.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
|
||||
@@ -308,10 +600,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -332,4 +620,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.5 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.5-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.5-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,45 +31,59 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& curl -sS 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
@@ -70,11 +92,12 @@ RUN set -x \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +105,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +168,85 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout v2.0.0 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,65 +268,241 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& git checkout v3.4.11 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
|
||||
&& chmod +x /usr/local/bin/phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -252,7 +510,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -270,44 +528,90 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-5.5.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.5.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
|
||||
@@ -317,10 +621,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -341,4 +641,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 5.6 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="5.6-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="5.6-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,45 +31,58 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key 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 -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
@@ -70,11 +91,12 @@ RUN set -x \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +104,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +167,99 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout v2.0.0 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,65 +281,241 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& git checkout v3.4.11 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
|
||||
&& chmod +x /usr/local/bin/phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -252,7 +523,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -270,44 +541,91 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-5.6.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-5.6.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
|
||||
@@ -317,10 +635,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -341,4 +655,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.0 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.0-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.0-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,45 +31,58 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key 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 -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
@@ -70,11 +91,12 @@ RUN set -x \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +104,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +167,99 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout v2.0.0 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,65 +281,241 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& git checkout v3.4.11 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
|
||||
&& chmod +x /usr/local/bin/phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -252,7 +523,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -270,44 +541,91 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-7.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.0.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
|
||||
@@ -317,10 +635,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -341,4 +655,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.1 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.1-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.1-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,58 +31,72 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& apt-key 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 -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +104,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +167,99 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,65 +281,241 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& git checkout v3.4.11 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
|
||||
&& chmod +x /usr/local/bin/phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL 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 -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -252,7 +523,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -270,44 +541,91 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-7.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.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
|
||||
@@ -317,10 +635,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -341,4 +655,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.2 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.2-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.2-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,58 +31,72 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& 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 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 -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& curl -sS 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +104,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +167,99 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,65 +281,242 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phalcon
|
||||
\
|
||||
# -------------------- phalcon --------------------
|
||||
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||
&& cd /usr/local/src/phalcon-devtools \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
&& composer install \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
|
||||
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
|
||||
&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
|
||||
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
|
||||
&& chmod +x phalcon \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL 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 -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -252,7 +524,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -270,44 +542,91 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-7.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.2.conf /usr/local/etc/php-fpm.conf
|
||||
|
||||
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||
COPY ./data/bash-devilbox /etc/bash-devilbox
|
||||
@@ -317,10 +636,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -341,4 +656,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||
###
|
||||
### Labels
|
||||
###
|
||||
LABEL \
|
||||
name="cytopia's PHP-FPM 7.3 Image" \
|
||||
image="devilbox/php-fpm" \
|
||||
tag="7.3-work" \
|
||||
vendor="devilbox" \
|
||||
license="MIT"
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
#LABEL "org.opencontainers.image.created"=""
|
||||
#LABEL "org.opencontainers.image.version"=""
|
||||
#LABEL "org.opencontainers.image.revision"=""
|
||||
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||
LABEL "org.opencontainers.image.ref.name"="7.3-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-work"
|
||||
|
||||
|
||||
###
|
||||
@@ -23,58 +31,72 @@ ENV BASH_PROFILE=".bashrc"
|
||||
###
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& 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 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 -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
||||
&& echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list \
|
||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& curl -sS 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
&& 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 \
|
||||
coreutils \
|
||||
curl \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mysql-client \
|
||||
mariadb-client \
|
||||
nano \
|
||||
net-tools \
|
||||
netcat \
|
||||
nodejs \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
python-pip \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
ruby-dev \
|
||||
shellcheck \
|
||||
@@ -82,20 +104,61 @@ RUN set -x \
|
||||
subversion \
|
||||
sudo \
|
||||
tig \
|
||||
tree \
|
||||
unzip \
|
||||
vim \
|
||||
w3m \
|
||||
wget \
|
||||
whois \
|
||||
xz-utils \
|
||||
yarn \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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)
|
||||
|
||||
|
||||
RUN set -x \
|
||||
# composer
|
||||
###
|
||||
### Install custom software
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- composer --------------------
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
# awesomeci
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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) \
|
||||
@@ -104,67 +167,99 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/awesome-ci \
|
||||
\
|
||||
&& gem install mixlib-config -v 2.2.4 \
|
||||
&& gem install mdl \
|
||||
&& gem install scss_lint \
|
||||
&& npm install -g eslint \
|
||||
&& npm install -g jsonlint \
|
||||
&& npm install -g mdlint \
|
||||
&& npm install -g gulp \
|
||||
\
|
||||
# -------------------- deployer --------------------
|
||||
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
# drush
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
|
||||
&& cd /usr/local/src/drush \
|
||||
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \
|
||||
&& rm -rf /usr/local/src/drush/.git \
|
||||
&& rm -rf /usr/local/src/drush/docs \
|
||||
&& rm -rf /usr/local/src/drush/examples \
|
||||
&& rm -rf /usr/local/src/drush/misc \
|
||||
&& rm -rf /usr/local/src/drush/tests \
|
||||
\
|
||||
# -------------------- drush8 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
# drupalconsole
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
# gitflow
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
# grunt
|
||||
&& npm install -g grunt grunt-cli \
|
||||
# laravel
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \
|
||||
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
# linuxbrew
|
||||
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
'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}' \
|
||||
'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 update' \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
# mhsendmail
|
||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
\
|
||||
# mysqldumpsecure
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||
&& cd /usr/local/src/mysqldump-secure \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
@@ -186,54 +281,228 @@ RUN set -x \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||
\
|
||||
# phpcs
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcs --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
# phpcbf
|
||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
# photon
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
|
||||
\
|
||||
# -------------------- php-cs-fixer --------------------
|
||||
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||
\
|
||||
# sass
|
||||
&& gem install sass \
|
||||
# symfony
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
# webpack
|
||||
&& npm install -g webpack webpack-cli \
|
||||
# wpcli
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL 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 -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& chmod +x /usr/local/bin/wp \
|
||||
# yamllint
|
||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
||||
&& pip install yamllint \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
||||
# cleanup
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
&& rm -rf /home/${MY_USER}/.*json \
|
||||
&& rm -rf /home/${MY_USER}/.cache \
|
||||
&& rm -rf /home/${MY_USER}/.composer \
|
||||
&& rm -rf /home/${MY_USER}/.config \
|
||||
&& rm -rf /home/${MY_USER}/.drush \
|
||||
&& rm -rf /home/${MY_USER}/.gem \
|
||||
&& rm -rf /home/${MY_USER}/.npm \
|
||||
&& 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/.gem \
|
||||
&& rm -rf /root/.npm \
|
||||
&& rm -rf /root/.subversion \
|
||||
&& rm -rf /root/.v8* \
|
||||
\
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& 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)
|
||||
|
||||
|
||||
###
|
||||
@@ -241,7 +510,7 @@ RUN set -x \
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||
echo "export PATH"; \
|
||||
echo ". /etc/bash-devilbox"; \
|
||||
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||
@@ -259,43 +528,90 @@ RUN \
|
||||
###
|
||||
### Verify
|
||||
###
|
||||
RUN set -x \
|
||||
RUN set -eux \
|
||||
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
|
||||
&& /usr/local/sbin/php-fpm --test \
|
||||
\
|
||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
||||
&& 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 -x \
|
||||
RUN set -eux \
|
||||
# -------------------- Software --------------------
|
||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
||||
&& eslint -v | grep -E '[.0-9]+' \
|
||||
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||
&& mdlint --version | grep -E '[.0-9]+' \
|
||||
&& gulp --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
&& drush --version | grep -E '[.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]+' \
|
||||
&& 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]+' \
|
||||
&& grunt --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]+' \
|
||||
&& phpcs --version | grep -E 'version [.0-9]+' \
|
||||
&& phpcbf --version | grep -E 'version [.0-9]+' \
|
||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||
&& sass --version | grep -E '[.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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||
&& true
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[.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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini
|
||||
COPY ./data/php-ini.d/php-7.3.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.3.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
|
||||
@@ -305,10 +621,6 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||
###
|
||||
### Volumes
|
||||
###
|
||||
VOLUME /etc/bashrc-devilbox.d
|
||||
VOLUME /etc/php-custom.d
|
||||
VOLUME /etc/php-fpm-custom.d
|
||||
VOLUME /etc/php-modules.d
|
||||
VOLUME /shared/backups
|
||||
VOLUME /var/log/php
|
||||
VOLUME /var/mail
|
||||
@@ -329,4 +641,5 @@ WORKDIR /shared/httpd
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
639
Dockerfiles/work/Dockerfile-7.4
Normal file
639
Dockerfiles/work/Dockerfile-7.4
Normal file
@@ -0,0 +1,639 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
|
||||
FROM devilbox/php-fpm:7.4-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"="7.4-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-work"
|
||||
|
||||
|
||||
###
|
||||
### 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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& 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 \
|
||||
coreutils \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mariadb-client \
|
||||
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 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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 https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||
&& chmod +x /usr/local/bin/dep \
|
||||
\
|
||||
# -------------------- drush7 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||
&& cd /usr/local/src/drush7 \
|
||||
&& git checkout 7.4.0 \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& 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 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||
&& cd /usr/local/src/drush8 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||
&& rm -rf /usr/local/src/drush8/.git \
|
||||
&& rm -rf /usr/local/src/drush8/docs \
|
||||
&& rm -rf /usr/local/src/drush8/examples \
|
||||
&& rm -rf /usr/local/src/drush8/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drush9 --------------------
|
||||
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||
&& cd /usr/local/src/drush9 \
|
||||
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||
&& rm -rf /usr/local/src/drush9/.git \
|
||||
&& rm -rf /usr/local/src/drush9/docs \
|
||||
&& rm -rf /usr/local/src/drush9/examples \
|
||||
&& rm -rf /usr/local/src/drush9/misc \
|
||||
\
|
||||
\
|
||||
# -------------------- drupalconsole --------------------
|
||||
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||
&& chmod +x /usr/local/bin/drupal \
|
||||
\
|
||||
# -------------------- gitflow --------------------
|
||||
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||
&& cd /tmp/gitflow \
|
||||
&& make install \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||
\
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||
\
|
||||
&& ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel \
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/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 https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- phpunit --------------------
|
||||
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpunit \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL 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 -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& 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 \
|
||||
# -------------------- asgardcms --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- codeception --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- lumen --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- photon --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||
\
|
||||
# -------------------- prestissimo --------------------
|
||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& rm -rf /root/.cache/pip \
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Configure Bash
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/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 '^7.4' \
|
||||
&& /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]+' \
|
||||
&& 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]+' \
|
||||
&& 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]+' \
|
||||
&& 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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+' \
|
||||
\
|
||||
# -------------------- 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]+$' \
|
||||
\
|
||||
# -------------------- 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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-7.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-7.4.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"]
|
||||
548
Dockerfiles/work/Dockerfile-8.0
Normal file
548
Dockerfiles/work/Dockerfile-8.0
Normal file
@@ -0,0 +1,548 @@
|
||||
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
|
||||
FROM devilbox/php-fpm:8.0-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.0-work"
|
||||
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-work"
|
||||
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-work"
|
||||
|
||||
|
||||
###
|
||||
### 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 \
|
||||
curl \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
\
|
||||
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& 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 \
|
||||
coreutils \
|
||||
dnsutils \
|
||||
dos2unix \
|
||||
file \
|
||||
gawk \
|
||||
gcc \
|
||||
git \
|
||||
git-flow \
|
||||
git-svn \
|
||||
ghostscript \
|
||||
graphviz \
|
||||
hostname \
|
||||
htop \
|
||||
imagemagick \
|
||||
iputils-ping \
|
||||
jq \
|
||||
less \
|
||||
libc-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libyaml-dev \
|
||||
make \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools \
|
||||
moreutils \
|
||||
mariadb-client \
|
||||
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 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
\
|
||||
# -------------------- pip --------------------
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libpython-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||
\
|
||||
\
|
||||
# -------------------- 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 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 https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- linuxbrew --------------------
|
||||
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& wget --no-hsts https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/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 https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcs \
|
||||
\
|
||||
\
|
||||
# -------------------- phpcbf --------------------
|
||||
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||
&& chmod +x /usr/local/bin/phpcbf \
|
||||
\
|
||||
\
|
||||
# -------------------- phpmd --------------------
|
||||
&& wget --no-hsts https://phpmd.org/static/latest/phpmd.phar \
|
||||
&& mv phpmd.phar /usr/local/bin/phpmd \
|
||||
&& chmod +x /usr/local/bin/phpmd \
|
||||
\
|
||||
\
|
||||
# -------------------- symfony --------------------
|
||||
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||
&& chmod +x /usr/local/bin/symfony \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& 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 -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- 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 \
|
||||
\
|
||||
# -------------------- scss_lint --------------------
|
||||
&& gem install scss_lint -v 0.57.1 \
|
||||
\
|
||||
# -------------------- sass --------------------
|
||||
&& gem install sass \
|
||||
\
|
||||
\
|
||||
&& 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 \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||
\
|
||||
# -------------------- yq --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yq \
|
||||
\
|
||||
\
|
||||
&& rm -rf /root/.cache/pip \
|
||||
&& rm -rf /tmp/* \
|
||||
&& (rm -rf /tmp/.* || true) \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||
|
||||
|
||||
###
|
||||
### Configure Bash
|
||||
###
|
||||
RUN \
|
||||
{ \
|
||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/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.0' \
|
||||
&& /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]+' \
|
||||
&& 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 --version | grep -E 'version\s*[.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||
&& wp --allow-root --version | grep -E '[.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]+$' \
|
||||
\
|
||||
# -------------------- 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]+' \
|
||||
&& vue --version | grep -E '[.0-9]+' \
|
||||
&& webpack --version | grep -E '[.0-9]+' \
|
||||
\
|
||||
# -------------------- GEM --------------------
|
||||
&& mdl --version | grep -E '[.0-9]+' \
|
||||
&& sass --version | grep -E '[.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)
|
||||
|
||||
|
||||
###
|
||||
### Copy files
|
||||
###
|
||||
COPY ./data/php-ini.d/php-8.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||
COPY ./data/php-fpm.conf/php-fpm-8.0.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"]
|
||||
@@ -15,46 +15,45 @@ alias ll='ls -alp --color=always --group-directories-first'
|
||||
alias ..='cd ..'
|
||||
|
||||
# Nice PS1
|
||||
PS1="\[\e[0;31m\]$(whoami)\[\e[0m\]@\[\e[0;36m\]php-$(php -v|head -1|grep -Eo '[0-9.]+'|head -1)\[\e[0m\] in \[\e[0;34m\]\w \[\e[0m\]\$ "
|
||||
_clr_usr='\[\e[0;31m\]'
|
||||
_clr_ver='\[\e[0;36m\]'
|
||||
_clr_dir='\[\e[0;34m\]'
|
||||
_clr_off='\[\e[0m\]'
|
||||
PS1_PHP="$( php -v 2>/dev/null | grep -Eo '^PHP\s([-_.a-zA-Z0-9])+' )"
|
||||
PS1_PHP="${PS1_PHP//PHP[[:space:]]}"
|
||||
PS1_USR="$( whoami )"
|
||||
PS1="${_clr_usr}${PS1_USR}${_clr_off}@${_clr_ver}php-${PS1_PHP}${_clr_off} in ${_clr_dir}\w${_clr_off} \$ "
|
||||
|
||||
|
||||
# Show Intro
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo " _ _ _ _ "
|
||||
echo " | | (_) | | "
|
||||
echo " __| | _____ ___| | |__ _____ __"
|
||||
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ \\/ /"
|
||||
echo " | (_| | __/\\ V /| | | |_) | (_) > < "
|
||||
echo " \\__,_|\\___| \\_/ |_|_|_.__/ \\___/_/\\_\\"
|
||||
echo " "
|
||||
echo " http://devilbox.org"
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
echo " _ _ _ _ "
|
||||
echo " | | (_) | | "
|
||||
echo " __| | _____ ___| | |__ _____ __"
|
||||
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ \\/ /"
|
||||
echo " | (_| | __/\\ V /| | | |_) | (_) > < "
|
||||
echo " \\__,_|\\___| \\_/ |_|_|_.__/ \\___/_/\\_\\"
|
||||
echo " "
|
||||
echo " http://devilbox.org"
|
||||
echo " https://devilbox.readthedocs.io"
|
||||
echo
|
||||
echo
|
||||
echo " | Available Tools | Project website |"
|
||||
echo " |------------------|------------------------------|"
|
||||
echo " | awesome-ci | gh: cytopia/awesome-ci |"
|
||||
echo " | composer | https://getcomposer.org |"
|
||||
echo " | drupal-console | https://drupalconsole.com |"
|
||||
echo " | drush | http://www.drush.org |"
|
||||
echo " | eslint | https://eslint.org |"
|
||||
echo " | git | https://git-scm.com |"
|
||||
echo " | laravel | gh: laravel/installer |"
|
||||
echo " | linuxbrew | http://linuxbrew.sh |"
|
||||
echo " | mysqldump-secure | https://mysqldump-secure.org |"
|
||||
echo " | node | https://nodejs.org |"
|
||||
echo " | npm | https://www.npmjs.com |"
|
||||
echo " | phalcon-devtools | gh: phalcon/phalcon-devtools |"
|
||||
echo " | symfony installer| gh: symfony/symfony-installer|"
|
||||
echo " | webpack | gh: webpack/webpack |"
|
||||
echo " | wpcli | https://wp-cli.org |"
|
||||
echo
|
||||
echo " Available Tools"
|
||||
echo " https://devilbox.readthedocs.io/en/latest/readings/available-tools.html"
|
||||
echo
|
||||
echo " How to work inside this PHP container"
|
||||
echo " https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html"
|
||||
echo
|
||||
echo
|
||||
echo " | Available Dirs | Description |"
|
||||
echo " |------------------|------------------------------|"
|
||||
echo " | /shared/httpd | Project base directory |"
|
||||
echo " | /shared/backups | Backup directory |"
|
||||
echo " | /var/mail | Email directory |"
|
||||
echo " | /var/log | Log file directory |"
|
||||
echo
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo " | Available Dirs | Description |"
|
||||
echo " |------------------|------------------------------|"
|
||||
echo " | /shared/httpd | Project base directory |"
|
||||
echo " | /shared/backups | Backup directory |"
|
||||
echo " | /var/mail | Email directory |"
|
||||
echo " | /var/log | Log file directory |"
|
||||
echo
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
echo
|
||||
|
||||
@@ -55,7 +55,7 @@ set_mds_settings() {
|
||||
else
|
||||
mds_pass_val="$( env_get "${mds_pass_var}" )"
|
||||
log "info" "\$${mds_pass_var} set for mysqldump-secure. Changing to '******'" "${debug}"
|
||||
run "sed -i'' 's/^password.*/password = ${mds_pass_val}/g' ${mds_cnf}" "${debug}"
|
||||
run "perl -pi -e 's/^password.*/password = ${mds_pass_val}/g' ${mds_cnf}" "${debug}"
|
||||
fi
|
||||
|
||||
# MySQL host
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -p pipefail
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
@@ -16,37 +16,38 @@ set -p pipefail
|
||||
# MY_GID
|
||||
|
||||
# Path to scripts to source
|
||||
CONFIG_DIR="/docker-entrypoint.d"
|
||||
DVL_CONFIG_DIR="/docker-entrypoint.d"
|
||||
|
||||
# php.ini.d directory
|
||||
PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||
|
||||
# php-fpm conf.d directory
|
||||
PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
|
||||
|
||||
# This is the log file for any mail related functions
|
||||
PHP_MAIL_LOG="/var/log/mail.log"
|
||||
DVL_PHP_FPM_DIR="/usr/local/etc/php-fpm.d"
|
||||
|
||||
# This file holds error and access log definitions
|
||||
FPM_CONF_LOGFILE="/usr/local/etc/php-fpm.d/logfiles.conf"
|
||||
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
||||
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
||||
|
||||
# PHP-FPM log dir
|
||||
FPM_LOG_DIR="/var/log/php"
|
||||
DVL_FPM_LOG_DIR="/var/log/php"
|
||||
|
||||
# This is the log file for any mail related functions
|
||||
DVL_PHP_MAIL_LOG="${DVL_FPM_LOG_DIR}/mail.log"
|
||||
|
||||
# Custom ini dir (to be copied to actual ini dir)
|
||||
PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||
|
||||
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
||||
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||
|
||||
# Supervisord config directory
|
||||
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||
|
||||
|
||||
###
|
||||
### Source libs
|
||||
###
|
||||
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||
for f in ${init}; do
|
||||
# shellcheck disable=SC1090
|
||||
. "${f}"
|
||||
@@ -75,13 +76,13 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
||||
###
|
||||
### Set timezone
|
||||
###
|
||||
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### PHP-FPM 5.3 Env variables
|
||||
### PHP-FPM 5.2 and PHP-FPM 5.3 Env variables fix
|
||||
###
|
||||
if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then
|
||||
if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.(2|3)'; then
|
||||
set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf"
|
||||
fi
|
||||
|
||||
@@ -91,8 +92,9 @@ fi
|
||||
###
|
||||
set_docker_logs \
|
||||
"DOCKER_LOGS" \
|
||||
"${FPM_LOG_DIR}" \
|
||||
"${FPM_CONF_LOGFILE}" \
|
||||
"${DVL_FPM_LOG_DIR}" \
|
||||
"${DVL_PHP_FPM_CONF_LOGFILE}" \
|
||||
"${DVL_PHP_INI_CONF_LOGFILE}" \
|
||||
"${MY_USER}" \
|
||||
"${MY_GROUP}" \
|
||||
"${DEBUG_LEVEL}"
|
||||
@@ -103,10 +105,10 @@ set_docker_logs \
|
||||
###
|
||||
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
||||
# PHP mail function should log to stderr
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||
else
|
||||
# PHP mail function should log to file
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
@@ -128,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
|
||||
supervisor_add_service \
|
||||
"socat-${lport}-${rhost}-${rport}" \
|
||||
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
||||
"${SUPERVISOR_CONFD}" \
|
||||
"${DVL_SUPERVISOR_CONFD}" \
|
||||
"${DEBUG_LEVEL}"
|
||||
done
|
||||
|
||||
@@ -136,28 +138,32 @@ done
|
||||
###
|
||||
### Supervisor: rsyslogd & postfix
|
||||
###
|
||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
|
||||
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ] || [ "$( env_get "ENABLE_MAIL" )" = "2" ]; then
|
||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}" "1"
|
||||
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
### Supervisor: php-fpm
|
||||
###
|
||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Copy custom *.ini files
|
||||
###
|
||||
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Copy custom PHP-FPM *.conf files
|
||||
###
|
||||
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||
if [ "${PHP_VERSION}" = "5.2" ]; then
|
||||
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
||||
else
|
||||
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
@@ -200,8 +206,15 @@ run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}"
|
||||
update_ca_certificates "/ca" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Run custom user supplied scripts
|
||||
###
|
||||
execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}"
|
||||
execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
|
||||
|
||||
|
||||
###
|
||||
### Startup
|
||||
###
|
||||
log "info" "Starting supervisord" "${DEBUG_LEVEL}"
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||
exec "${@}"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user