Compare commits

...

82 Commits
0.84 ... 0.100

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

27
.github/workflows/linting.yml vendored Normal file
View 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
View 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
View 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-')))
)

View File

@@ -4,7 +4,7 @@
### Travis settings ### Travis settings
### ###
sudo: required sudo: required
language: python language: minimal
services: services:
- docker - docker
@@ -40,9 +40,6 @@ env:
### Install requirements ### Install requirements
### ###
install: 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 - docker version
# Disable services enabled by default # Disable services enabled by default
@@ -64,31 +61,40 @@ install:
- sudo service redis stop || true - sudo service redis stop || true
- netstat -tulpn - 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 ### Check generation changes, build and test
### ###
before_script: before_script:
# Regenerate Dockerfiles and make sure nothing has changed (every stage) # Regenerate Dockerfiles and make sure nothing has changed (every stage)
- pip install ansible - make gen-dockerfiles
- make generate
- git diff --quiet || { echo "Build Changes"; git diff; git status; false; } - git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
# Build (multiple tries due to network outages) # 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 - retry make build-base VERSION=${PHP}
- make test-base-${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 - retry make build-mods VERSION=${PHP}
- make test-mods-${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 - retry make build-prod VERSION=${PHP}
- make test-prod-${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 - retry make build-work VERSION=${PHP}
- make test-work-${PHP//.} - retry make test-work VERSION=${PHP}
# Test if PHP modules have changed # 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; } - git diff --quiet || { echo "Build Changes"; git diff; git status; false; }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -61,7 +61,7 @@ set_uid() {
# Change uid and fix homedir permissions # Change uid and fix homedir permissions
log "info" "Changing user '${username}' uid to: ${uid}" "${debug}" log "info" "Changing user '${username}' uid to: ${uid}" "${debug}"
run "usermod -u ${uid} ${username}" "${debug}" run "usermod -u ${uid} ${username}" "${debug}"
run "chown -R ${username} ${homedir}" "${debug}" run "chown -R ${username} ${homedir} || true" "${debug}"
run "chown -R ${username} /var/lib/php/session" "${debug}" run "chown -R ${username} /var/lib/php/session" "${debug}"
run "chown -R ${username} /var/lib/php/wsdlcache" "${debug}" run "chown -R ${username} /var/lib/php/wsdlcache" "${debug}"
fi fi
@@ -103,7 +103,7 @@ set_gid() {
# Change ugd and fix homedir permissions # Change ugd and fix homedir permissions
log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}" log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}"
run "groupmod -g ${gid} ${groupname}" "${debug}" run "groupmod -g ${gid} ${groupname}" "${debug}"
run "chown -R :${groupname} ${homedir}" "${debug}" run "chown -R :${groupname} ${homedir} || true" "${debug}"
run "chown -R :${groupname} /var/lib/php/session" "${debug}" run "chown -R :${groupname} /var/lib/php/session" "${debug}"
run "chown -R :${groupname} /var/lib/php/wsdlcache" "${debug}" run "chown -R :${groupname} /var/lib/php/wsdlcache" "${debug}"
fi fi

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,174 +1,171 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:8.0-base FROM devilbox/php-fpm:8.0-base as builder
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 8.0 Image" \
image="devilbox/php-fpm" \
tag="8.0-mods" \
vendor="devilbox" \
license="MIT"
###
### Envs
###
ENV BUILD_DEPS \
alien \
firebird-dev \
freetds-dev \
libaio-dev \
libbz2-dev \
libenchant-dev \
libevent-dev \
libfbclient2 \
libffi-dev \
libfreetype6-dev \
libgmp-dev \
libib-util \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
librecode-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
ENV RUN_DEPS \
libaio1 \
libaspell15 \
libenchant1c2a \
libfbclient2 \
libffi6 \
libfreetype6 \
libicu57 \
libjpeg62-turbo \
libmemcachedutil2 \
libpng16-16 \
libpq5 \
librecode0 \
libsybdb5 \
libtidy5 \
libvpx4 \
libwebp6 \
libxpm4 \
libxslt1.1 \
libzip4 \
snmp \
ca-certificates
### ###
### Install ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
${BUILD_DEPS} \ alien \
\ firebird-dev \
\ freetds-dev \
# ---- Installing PHP Extension: bcmath ---- libaio-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ libbz2-dev \
&& (rm -rf /usr/local/lib/php/test/bcmath || true) \ libenchant-dev \
&& (rm -rf /usr/local/lib/php/doc/bcmath || true) \ libevent-dev \
\ libfbclient2 \
# ---- Installing PHP Extension: bz2 ---- libfreetype6-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ libgmp-dev \
&& (rm -rf /usr/local/lib/php/test/bz2 || true) \ libib-util \
&& (rm -rf /usr/local/lib/php/doc/bz2 || true) \ libicu-dev \
\ libjpeg-dev \
# ---- Installing PHP Extension: calendar ---- libldap2-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ libmemcached-dev \
&& (rm -rf /usr/local/lib/php/test/calendar || true) \ libpng-dev \
&& (rm -rf /usr/local/lib/php/doc/calendar || true) \ libpq-dev \
\ libpspell-dev \
# ---- Installing PHP Extension: dba ---- libsasl2-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ libsnmp-dev \
&& (rm -rf /usr/local/lib/php/test/dba || true) \ libsodium-dev \
&& (rm -rf /usr/local/lib/php/doc/dba || true) \ libssl-dev \
\ libtidy-dev \
# ---- Installing PHP Extension: enchant ---- libvpx-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ libwebp-dev \
&& (rm -rf /usr/local/lib/php/test/enchant || true) \ libxml2-dev \
&& (rm -rf /usr/local/lib/php/doc/enchant || true) \ libxpm-dev \
\ libxslt-dev \
# ---- Installing PHP Extension: exif ---- libzip-dev \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ snmp \
&& (rm -rf /usr/local/lib/php/test/exif || true) \ zlib1g-dev \
&& (rm -rf /usr/local/lib/php/doc/exif || true) \ ca-certificates \
\ git
# ---- Installing PHP Extension: ffi ----
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \
&& cd /tmp/ffi \ # Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
&& phpize \ RUN set -eux \
&& ./configure --with-ffi \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\ ###
&& docker-php-ext-enable ffi \ ### Install and enable PHP modules
&& (rm -rf /usr/local/lib/php/test/ffi || true) \ ###
&& (rm -rf /usr/local/lib/php/doc/ffi || true) \ # Enable ffi if it exists
\ RUN set -eux \
# ---- Installing PHP Extension: gd ---- && 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/ \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ # Installation: Version specific
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/test/gd || true) \ # Custom: configure command
&& (rm -rf /usr/local/lib/php/doc/gd || true) \ && docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv \
\ # Installation
# ---- Installing PHP Extension: gettext ---- && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ && true
&& (rm -rf /usr/local/lib/php/test/gettext || true) \
&& (rm -rf /usr/local/lib/php/doc/gettext || true) \
\ # -------------------- Installing PHP Extension: gettext --------------------
# ---- Installing PHP Extension: gmp ---- 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/ \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/test/gmp || true) \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/doc/gmp || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
\ && true
# ---- Installing PHP Extension: interbase ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
&& (rm -rf /usr/local/lib/php/test/interbase || true) \ # -------------------- Installing PHP Extension: intl --------------------
&& (rm -rf /usr/local/lib/php/doc/interbase || true) \ RUN set -eux \
\ # Installation: Generic
# ---- Installing PHP Extension: intl ---- # Type: Built-in extension
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
&& (rm -rf /usr/local/lib/php/test/intl || true) \ && true
&& (rm -rf /usr/local/lib/php/doc/intl || true) \
\
# ---- Installing PHP Extension: ldap ---- # -------------------- Installing PHP Extension: ldap --------------------
RUN set -eux \
# Generic pre-command
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ # Installation: Generic
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/test/ldap || true) \ # Custom: configure command
&& (rm -rf /usr/local/lib/php/doc/ldap || true) \ && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
\ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
# ---- Installing PHP Extension: memcached ---- && 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 \ && git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \
&& cd /tmp/memcached \ && cd /tmp/memcached \
# Custom: Branch
&& git checkout master \ && git checkout master \
# Custom: Install command
&& true \ && true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0 # FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \ && sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \
@@ -177,14 +174,20 @@ RUN set -x \
&& make -j$(getconf _NPROCESSORS_ONLN) \ && make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \ && make install \
\ \
# Enabling
&& docker-php-ext-enable memcached \ && docker-php-ext-enable memcached \
&& (rm -rf /usr/local/lib/php/test/memcached || true) \ && true
&& (rm -rf /usr/local/lib/php/doc/memcached || true) \
\
# ---- Installing PHP Extension: mongodb ---- # -------------------- Installing PHP Extension: mongodb --------------------
RUN set -eux \
# Installation: Version specific
# Type: GIT extension
&& git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \ && git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \
&& cd /tmp/mongodb \ && cd /tmp/mongodb \
&& git submodule update --init \ # 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 # 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_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' \
@@ -193,21 +196,42 @@ RUN set -x \
&& 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' \
&& 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_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 \ && phpize \
&& ./configure --enable-mongodb \ && ./configure --enable-mongodb \
&& make all \ && make all \
&& make install \ && make install \
\ \
# Enabling
&& docker-php-ext-enable mongodb \ && docker-php-ext-enable mongodb \
&& (rm -rf /usr/local/lib/php/test/mongodb || true) \ && true
&& (rm -rf /usr/local/lib/php/doc/mongodb || true) \
\
# ---- Installing PHP Extension: mysqli ---- # -------------------- Installing PHP Extension: mysqli --------------------
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ RUN set -eux \
&& (rm -rf /usr/local/lib/php/test/mysqli || true) \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/doc/mysqli || true) \ # Type: Built-in extension
\ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
# ---- Installing PHP Extension: oci8 ---- && true
# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
@@ -221,41 +245,68 @@ RUN set -x \
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${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}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${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) \
\ \
&& /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ # Installation: Generic
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/test/oci8 || true) \ # Custom: configure command
&& (rm -rf /usr/local/lib/php/doc/oci8 || true) \ && 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 \
# ---- Installing PHP Extension: opcache ---- # Generic post-command
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ && 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 )" \
&& (rm -rf /usr/local/lib/php/test/opcache || true) \ && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& (rm -rf /usr/local/lib/php/doc/opcache || true) \ && 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) \
# ---- Installing PHP Extension: pcntl ---- \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ && true
&& (rm -rf /usr/local/lib/php/test/pcntl || true) \
&& (rm -rf /usr/local/lib/php/doc/pcntl || true) \
\ # -------------------- Installing PHP Extension: opcache --------------------
# ---- Installing PHP Extension: pdo_dblib ---- 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/ \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
\ && true
# ---- Installing PHP Extension: pdo_firebird ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ # -------------------- Installing PHP Extension: pdo_firebird --------------------
&& (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ RUN set -eux \
\ # Installation: Generic
# ---- Installing PHP Extension: pdo_mysql ---- # Type: Built-in extension
&& /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ && true
&& (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \
&& (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \
\ # -------------------- Installing PHP Extension: pdo_mysql --------------------
# ---- Installing PHP Extension: pdo_oci ---- 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_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
@@ -271,140 +322,284 @@ RUN set -x \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${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) \ && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
\ \
&& /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ # Installation: Version specific
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ # Custom: configure command
&& (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
\ # Installation
# ---- Installing PHP Extension: pdo_pgsql ---- && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ && true
&& (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \
&& (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \
\ # -------------------- Installing PHP Extension: pdo_pgsql --------------------
# ---- Installing PHP Extension: pgsql ---- RUN set -eux \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/test/pgsql || true) \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/doc/pgsql || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
\ && true
# ---- Installing PHP Extension: pspell ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
&& (rm -rf /usr/local/lib/php/test/pspell || true) \ # -------------------- Installing PHP Extension: pgsql --------------------
&& (rm -rf /usr/local/lib/php/doc/pspell || true) \ RUN set -eux \
\ # Installation: Generic
# ---- Installing PHP Extension: recode ---- # Type: Built-in extension
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
&& (rm -rf /usr/local/lib/php/test/recode || true) \ && true
&& (rm -rf /usr/local/lib/php/doc/recode || true) \
\
# ---- Installing PHP Extension: redis ---- # -------------------- 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 \ && git clone https://github.com/phpredis/phpredis /tmp/redis \
&& cd /tmp/redis \ && cd /tmp/redis \
&& phpize \ # Custom: Branch
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ # Custom: Install command
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ && sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0 && phpize \
&& 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' \
&& ./configure --enable-redis \ && ./configure --enable-redis \
&& make -j$(getconf _NPROCESSORS_ONLN) \ && make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \ && make install \
\ \
# Enabling
&& docker-php-ext-enable redis \ && docker-php-ext-enable redis \
&& (rm -rf /usr/local/lib/php/test/redis || true) \ && true
&& (rm -rf /usr/local/lib/php/doc/redis || true) \
\
# ---- Installing PHP Extension: shmop ---- # -------------------- Installing PHP Extension: shmop --------------------
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ RUN set -eux \
&& (rm -rf /usr/local/lib/php/test/shmop || true) \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/doc/shmop || true) \ # Type: Built-in extension
\ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
# ---- Installing PHP Extension: snmp ---- && true
&& /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& (rm -rf /usr/local/lib/php/test/snmp || true) \ # -------------------- Installing PHP Extension: snmp --------------------
&& (rm -rf /usr/local/lib/php/doc/snmp || true) \ RUN set -eux \
\ # Installation: Generic
# ---- Installing PHP Extension: soap ---- # Type: Built-in extension
&& /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ # Custom: configure command
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ && docker-php-ext-configure snmp --with-openssl-dir \
&& (rm -rf /usr/local/lib/php/test/soap || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
&& (rm -rf /usr/local/lib/php/doc/soap || true) \ && true
\
# ---- Installing PHP Extension: sockets ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ # -------------------- Installing PHP Extension: soap --------------------
&& (rm -rf /usr/local/lib/php/test/sockets || true) \ RUN set -eux \
&& (rm -rf /usr/local/lib/php/doc/sockets || true) \ # Installation: Generic
\ # Type: Built-in extension
# ---- Installing PHP Extension: sodium ---- # Custom: configure command
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ && docker-php-ext-configure soap --with-libxml-dir=/usr \
&& (rm -rf /usr/local/lib/php/test/sodium || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& (rm -rf /usr/local/lib/php/doc/sodium || true) \ && true
\
# ---- Installing PHP Extension: sysvmsg ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ # -------------------- Installing PHP Extension: sockets --------------------
&& (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ RUN set -eux \
&& (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ # Installation: Generic
\ # Type: Built-in extension
# ---- Installing PHP Extension: sysvsem ---- && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ && true
&& (rm -rf /usr/local/lib/php/test/sysvsem || true) \
&& (rm -rf /usr/local/lib/php/doc/sysvsem || true) \
\ # -------------------- Installing PHP Extension: sodium --------------------
# ---- Installing PHP Extension: sysvshm ---- RUN set -eux \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/test/sysvshm || true) \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \
\ && true
# ---- Installing PHP Extension: tidy ----
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& (rm -rf /usr/local/lib/php/test/tidy || true) \ # -------------------- Installing PHP Extension: sysvmsg --------------------
&& (rm -rf /usr/local/lib/php/doc/tidy || true) \ RUN set -eux \
\ # Installation: Generic
# ---- Installing PHP Extension: xmlrpc ---- # Type: Built-in extension
&& /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ && true
&& (rm -rf /usr/local/lib/php/test/xmlrpc || true) \
&& (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \
\ # -------------------- Installing PHP Extension: sysvsem --------------------
# ---- Installing PHP Extension: xsl ---- RUN set -eux \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ # Installation: Generic
&& (rm -rf /usr/local/lib/php/test/xsl || true) \ # Type: Built-in extension
&& (rm -rf /usr/local/lib/php/doc/xsl || true) \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
\ && true
# ---- Installing PHP Extension: zip ----
&& /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ # -------------------- Installing PHP Extension: sysvshm --------------------
&& (rm -rf /usr/local/lib/php/test/zip || true) \ RUN set -eux \
&& (rm -rf /usr/local/lib/php/doc/zip || true) \ # Installation: Generic
\ # Type: Built-in extension
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ && true
fi \
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \
&& rm -rf /tmp/* \ # -------------------- Installing PHP Extension: tidy --------------------
\ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ # Installation: Generic
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ # Type: Built-in extension
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
&& rm -rf /var/lib/apt/lists/* \ && true
\
&& update-ca-certificates \
\ # -------------------- 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/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
&& (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
# 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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -456,8 +651,6 @@ RUN set -x \
&& php-fpm -m | grep -oiE '^hash$' \ && php-fpm -m | grep -oiE '^hash$' \
&& php -m | grep -oiE '^iconv$' \ && php -m | grep -oiE '^iconv$' \
&& php-fpm -m | grep -oiE '^iconv$' \ && php-fpm -m | grep -oiE '^iconv$' \
&& php -m | grep -oiE '^interbase$' \
&& php-fpm -m | grep -oiE '^interbase$' \
&& php -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^intl$' \
&& php-fpm -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \
&& php -m | grep -oiE '^json$' \ && php -m | grep -oiE '^json$' \
@@ -509,8 +702,6 @@ RUN set -x \
&& php -m | grep -oiE '^pspell$' \ && php -m | grep -oiE '^pspell$' \
&& php-fpm -m | grep -oiE '^pspell$' \ && php-fpm -m | grep -oiE '^pspell$' \
&& php -m | grep -oiE '^readline$' \ && php -m | grep -oiE '^readline$' \
&& php -m | grep -oiE '^recode$' \
&& php-fpm -m | grep -oiE '^recode$' \
&& php -m | grep -oiE '^redis$' \ && php -m | grep -oiE '^redis$' \
&& php-fpm -m | grep -oiE '^redis$' \ && php-fpm -m | grep -oiE '^redis$' \
&& php -m | grep -oiE '^reflection$' \ && php -m | grep -oiE '^reflection$' \
@@ -541,6 +732,8 @@ RUN set -x \
&& php-fpm -m | grep -oiE '^tidy$' \ && php-fpm -m | grep -oiE '^tidy$' \
&& php -m | grep -oiE '^tokenizer$' \ && php -m | grep -oiE '^tokenizer$' \
&& php-fpm -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 -m | grep -oiE '^xml$' \
&& php-fpm -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \
&& php -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlreader$' \
@@ -565,4 +758,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.2 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.2-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.3 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.3-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.4 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.4-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.5 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.5-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.6 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.6-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.0 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.0-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.1 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.1-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.2 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.2-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.3 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.3-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.4 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.4-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,18 +6,26 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 8.0 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="8.0-prod" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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 ### Install
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -40,11 +48,10 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -77,7 +84,6 @@ VOLUME /var/log/php
VOLUME /var/mail VOLUME /var/mail
### ###
### Ports ### Ports
### ###
@@ -87,4 +93,5 @@ EXPOSE 9000
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.2 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.2-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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"
### ###
@@ -23,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
@@ -42,6 +51,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -62,6 +72,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -103,6 +114,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -115,8 +127,8 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# pip # -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -125,7 +137,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -142,7 +155,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# awesomeci \
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -151,17 +165,20 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# linkcheck \
# -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -172,12 +189,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# mhsendmail \
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ # -------------------- mhsendmail --------------------
&& curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -199,15 +218,18 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L 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 \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L 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 \ && chmod +x /usr/local/bin/phpcbf \
\ \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -219,7 +241,8 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -239,6 +262,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -257,57 +281,10 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -317,20 +294,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -340,12 +376,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -363,7 +422,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -379,15 +438,10 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
@@ -395,10 +449,15 @@ RUN set -x \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
\ \
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -408,10 +467,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -434,7 +496,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -458,4 +519,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.3 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.3-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
@@ -42,6 +51,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -62,6 +72,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -103,6 +114,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -115,10 +127,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -127,7 +140,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,7 +158,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# awesomeci \
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -153,11 +168,8 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- drush7 --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush7
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -170,17 +182,20 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# linkcheck \
# -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -191,12 +206,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# mhsendmail \
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ # -------------------- mhsendmail --------------------
&& curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -218,7 +235,8 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.7 \ && git checkout v2.0.7 \
@@ -229,23 +247,34 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L 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 \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L 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 \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -257,10 +286,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \ && curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \
&& chmod +x /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -280,6 +311,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -298,57 +330,17 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- codeception --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
# eslint && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \ # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -358,20 +350,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -381,12 +432,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -404,7 +478,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -420,17 +494,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
@@ -440,13 +508,20 @@ RUN set -x \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -456,10 +531,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -482,7 +560,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -506,4 +583,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.4 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.4-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
@@ -42,6 +51,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -62,6 +72,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -103,6 +114,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -115,10 +127,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -127,7 +140,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,7 +158,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# awesomeci \
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -153,14 +168,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -173,7 +186,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -186,27 +200,31 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \ && git checkout v1.3.7 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -217,12 +235,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# mhsendmail \
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ # -------------------- mhsendmail --------------------
&& curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -244,37 +264,50 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.9 \ && git checkout v2.0.9 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# symfony \
# -------------------- symfony --------------------
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -286,10 +319,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -309,6 +344,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -327,57 +363,17 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- codeception --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
# eslint && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \ # -------------------- prestissimo --------------------
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -387,20 +383,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -410,12 +465,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -433,7 +511,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -449,17 +527,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -472,14 +544,21 @@ RUN set -x \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -489,10 +568,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -515,7 +597,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -539,4 +620,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.5 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.5-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
@@ -42,6 +51,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -62,6 +72,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -103,6 +114,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -115,10 +127,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -127,7 +140,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -144,11 +158,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -157,14 +168,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -177,7 +186,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -190,30 +200,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -224,16 +239,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -255,41 +268,51 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout v3.4.11 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -301,10 +324,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -324,6 +349,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -342,57 +368,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -402,20 +400,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -425,12 +482,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -448,7 +528,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -464,18 +544,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -484,21 +557,29 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -508,10 +589,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -534,7 +618,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -558,4 +641,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 5.6 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="5.6-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,41 +281,51 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout v3.4.11 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -313,10 +337,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +362,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -354,57 +381,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -414,20 +413,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -437,12 +495,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +541,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -476,18 +557,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -497,21 +571,29 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -521,10 +603,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -547,7 +632,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -571,4 +655,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.0 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.0-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ && curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,41 +281,51 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout v3.4.11 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
@@ -313,10 +337,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +362,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -354,57 +381,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -414,20 +413,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -437,12 +495,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +541,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -476,18 +557,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -497,21 +571,29 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -521,10 +603,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -547,7 +632,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -571,4 +655,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.1 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.1-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -76,7 +87,7 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ && curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,45 +281,55 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout v3.4.11 \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
@@ -313,10 +337,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +362,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -354,57 +381,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -414,20 +413,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
# -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl \
# scss_lint \
&& gem install scss_lint \ # -------------------- scss_lint --------------------
# sass && gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -437,12 +495,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +541,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -476,18 +557,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -497,21 +571,29 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -521,10 +603,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -547,7 +632,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -571,4 +655,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.2 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.2-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -76,7 +87,7 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,45 +281,56 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phalcon \
# -------------------- phalcon --------------------
&& git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
&& composer install \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
@@ -313,10 +338,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -336,6 +363,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -354,57 +382,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -414,20 +414,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
# -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl \
# scss_lint \
&& gem install scss_lint \ # -------------------- scss_lint --------------------
# sass && gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -437,12 +496,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -460,7 +542,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -476,18 +558,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -497,21 +572,29 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phalcon commands | grep -E '[.0-9]+' \ && phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -521,10 +604,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -547,7 +633,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -571,4 +656,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.3 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.3-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -76,7 +87,7 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,34 +281,42 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# php-cs-fixer \
# -------------------- php-cs-fixer --------------------
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && curl -sS -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 \ && chmod +x /usr/local/bin/php-cs-fixer \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
@@ -302,10 +324,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -325,6 +349,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -343,57 +368,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -403,20 +400,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
# -------------------- mdl --------------------
&& gem install mdl \ && gem install mdl \
# scss_lint \
&& gem install scss_lint \ # -------------------- scss_lint --------------------
# sass && gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -426,12 +482,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -449,7 +528,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -465,18 +544,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -486,20 +558,28 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
&& phpmd --version | grep -E '^PHPMD [.0-9]+' \
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -509,10 +589,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -535,7 +618,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -559,4 +641,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 7.4 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="7.4-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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"
### ###
@@ -23,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -76,7 +87,7 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,11 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# asgardcms \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ # -------------------- awesomeci --------------------
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
\
# awesomeci
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -156,14 +167,12 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# codeception \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ # -------------------- deployer --------------------
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# deployer
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drush7 \
# -------------------- drush7 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
&& cd /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \
&& git checkout 7.4.0 \ && git checkout 7.4.0 \
@@ -176,7 +185,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/examples \
&& rm -rf /usr/local/src/drush7/misc \ && rm -rf /usr/local/src/drush7/misc \
\ \
# drush8 \
# -------------------- drush8 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
&& cd /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' ) \ && 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' ) \
@@ -189,7 +199,8 @@ RUN set -x \
&& rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/examples \
&& rm -rf /usr/local/src/drush8/misc \ && rm -rf /usr/local/src/drush8/misc \
\ \
# drush9 \
# -------------------- drush9 --------------------
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
&& cd /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' ) \ && 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' ) \
@@ -202,30 +213,35 @@ RUN set -x \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
\ \
# drupalconsole \
# -------------------- drupalconsole --------------------
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
&& chmod +x /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \
# gitflow \
# -------------------- gitflow --------------------
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# laravel \
# -------------------- laravel --------------------
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
\ \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
\ \
# linkcheck && 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 \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -236,16 +252,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# lumen \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \ # -------------------- mhsendmail --------------------
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \ && curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -267,30 +281,37 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# phpunit \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
\ \
# photon \
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ # -------------------- symfony --------------------
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# symfony
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
@@ -298,10 +319,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -321,6 +344,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -339,57 +363,29 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli # -------------------- asgardcms --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
# eslint && ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /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/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ # -------------------- lumen --------------------
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ && COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
&& rm -rf /home/devilbox/.npm \ && ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
&& rm -rf /home/devilbox/.config \ \
&& rm -rf /tmp/* \ # -------------------- photon --------------------
&& (rm -rf /tmp/.* || true) \ && 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 \
\ \
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\ \
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -399,20 +395,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -422,12 +477,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -445,7 +523,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -461,18 +539,11 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drush7 --version | grep -E '7[.0-9]+\s*$' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \
&& drush8 --version | grep -E '8[.0-9]+\s*$' \ && drush8 --version | grep -E '8[.0-9]+\s*$' \
@@ -482,19 +553,27 @@ RUN set -x \
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \ && laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --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]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && 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]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -504,10 +583,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -530,7 +612,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -554,4 +635,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM 8.0 Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="8.0-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" 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"
### ###
@@ -23,13 +31,14 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
\
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS "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 \ && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
@@ -41,6 +50,7 @@ RUN set -x \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && curl -sS 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 \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -61,6 +71,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -76,7 +87,7 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
mysql-client \ mariadb-client \
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -102,6 +113,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -114,10 +126,11 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ RUN set -eux \
# composer # -------------------- composer --------------------
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# pip \
# -------------------- pip --------------------
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libpython-dev \ libpython-dev \
@@ -126,7 +139,8 @@ RUN set -x \
\ \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
\ \
# nvm \
# -------------------- nvm --------------------
&& git clone https://github.com/creationix/nvm /opt/nvm \ && git clone https://github.com/creationix/nvm /opt/nvm \
&& cd /opt/nvm \ && cd /opt/nvm \
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ && git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
@@ -143,7 +157,8 @@ RUN set -x \
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
\ \
# awesomeci \
# -------------------- awesomeci --------------------
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
&& cd /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -152,23 +167,24 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/awesome-ci \ && rm -rf /usr/local/src/awesome-ci \
\ \
# deployer \
# -------------------- deployer --------------------
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \
# drupalconsole \
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ # -------------------- gitflow --------------------
&& chmod +x /usr/local/bin/drupal \
# gitflow
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
&& cd /tmp/gitflow \ && cd /tmp/gitflow \
&& make install \ && make install \
&& cd / && rm -rf /tmp/gitflow \ && cd / && rm -rf /tmp/gitflow \
\ \
# linkcheck \
# -------------------- linkcheck --------------------
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
&& chmod +x /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \
\ \
# linuxbrew \
# -------------------- linuxbrew --------------------
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
@@ -179,12 +195,14 @@ RUN set -x \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\ \
# mhsendmail \
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ # -------------------- mhsendmail --------------------
&& curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
\ \
# mysqldumpsecure \
# -------------------- mysqldumpsecure --------------------
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \ && cd /usr/local/src/mysqldump-secure \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
@@ -206,22 +224,32 @@ RUN set -x \
&& cd / \ && cd / \
&& rm -rf /usr/local/src/mysqldump-secure \ && rm -rf /usr/local/src/mysqldump-secure \
\ \
# phpcs \
# -------------------- phpcs --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
&& chmod +x /usr/local/bin/phpcs \ && chmod +x /usr/local/bin/phpcs \
\ \
# phpcbf \
# -------------------- phpcbf --------------------
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \ && chmod +x /usr/local/bin/phpcbf \
\ \
# symfony \
# -------------------- phpmd --------------------
&& curl -sS -L https://phpmd.org/static/latest/phpmd.phar > 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 \ && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
&& chmod +x /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \
# wkhtmltopdf \
# -------------------- wkhtmltopdf --------------------
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \ && dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \
@@ -229,10 +257,12 @@ RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && 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 /var/lib/apt/lists/* \
\ \
# wpcli \
# -------------------- wpcli --------------------
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && 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 \ && chmod +x /usr/local/bin/wp \
# cleanup \
# -------------------- cleanup --------------------
&& rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.*json \
&& rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.cache \
&& rm -rf /home/${MY_USER}/.composer \ && rm -rf /home/${MY_USER}/.composer \
@@ -252,6 +282,7 @@ RUN set -x \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
\
\ \
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
@@ -270,57 +301,10 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ RUN set -eux \
# angular_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \
# eslint
&& su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \
# grunt
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \
# grunt_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \
# gulp
&& su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \
# jsonlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \
# pm2
&& su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \
# mdlint
&& su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \
# vue_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \
# vue_cli_service_global
&& su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \
# webpack
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \
# webpack_cli
&& su -c '. /opt/nvm/nvm.sh; npm install -g webpack-cli' devilbox \
\ \
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
# ansible
&& pip install --no-cache-dir --force-reinstall ansible \
# yamllint
&& pip install --no-cache-dir --force-reinstall yamllint \
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -330,20 +314,79 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ RUN set -eux \
# mixlib_config # -------------------- 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 \ && gem install mixlib-config -v 2.2.4 \
# rb_inotify \
# -------------------- rb_inotify --------------------
&& gem install rb-inotify -v 0.9.10 \ && gem install rb-inotify -v 0.9.10 \
# mdl \
&& gem install mdl \ # -------------------- mdl --------------------
# scss_lint && gem install mdl -v 0.5.0 \
&& gem install scss_lint \ \
# sass # -------------------- scss_lint --------------------
&& gem install scss_lint -v 0.57.1 \
\
# -------------------- sass --------------------
&& gem install sass \ && gem install sass \
\ \
\
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -353,12 +396,35 @@ RUN set -x \
&& (find /usr/local/sbin -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 ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -376,7 +442,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && 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' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -392,31 +458,31 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
# -------------------- Software --------------------
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
&& mdl --version | grep -E '[.0-9]+' \ && regex-grep --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \ && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
&& git-flow version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[.0-9]+' \
&& linkcheck --version | grep -E '^linkcheck\sv[.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]+' \ && 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]+' \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --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]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
&& wp --allow-root --version | grep -E '[.0-9]+' \ && wp --allow-root --version | grep -E '[.0-9]+' \
\ \
# -------------------- Composer --------------------
\
# -------------------- PIP --------------------
&& ansible --version | grep -E '^ansible [.0-9]+$' \ && ansible --version | grep -E '^ansible [.0-9]+$' \
&& yamllint --version 2>&1 | grep -E '[.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]+' \ && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \
@@ -426,10 +492,13 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \ && mdlint --version | grep -E '[.0-9]+' \
&& vue --version | grep -E '[.0-9]+' \ && vue --version | grep -E '[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \
\ \
# -------------------- GEM --------------------
&& mdl --version | grep -E '[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \
\ \
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -452,7 +521,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -476,4 +544,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

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

740
Makefile
View File

@@ -1,497 +1,291 @@
location = Dockerfiles/ ifneq (,)
.error This Makefile requires GNU Make.
endif
# -------------------------------------------------------------------------------------------------
# Docker configuration
# -------------------------------------------------------------------------------------------------
DIR = Dockerfiles
IMAGE = devilbox/php-fpm
NO_CACHE =
PHP_EXT_DIR =
# Run checks after each module has been installed (slow, but yields errors faster)
FAIL_FAST = False
# -------------------------------------------------------------------------------------------------
# DEFAULT TARGET
# -------------------------------------------------------------------------------------------------
###
### Default
###
help: help:
@printf "################################################################################\n" @echo
@printf "# devilbox/php:XX-XX Makefile\n" @echo " _ _ _ _ __ _ ___ "
@printf "################################################################################\n\n" @echo " _| |___ _ _<_| | |_ _____ / ___| |_ ___ ___| | ___._ _ _ "
@printf "%s\n\n" "Generate and build devilbox PHP-FPM docker images" @echo " / . / ._| | | | | . / . \ \// | . | . | . |___| || . | ' ' |"
@printf "%s\n" "make generate: Generate Dockerfiles (requires Ansible)" @echo " \___\___|__/|_|_|___\___/\_/_/| _|_|_| _/ |_|| _|_|_|_|"
@printf "%s\n" "make readme: Update Readme with php modules (requires images to be built)" @echo " |_| |_| |_| "
@printf "\n" @echo
@printf "%s\n" "make gen-build: Generate and build all images" @echo
@printf "%s\n" "make gen-rebuild: Generate and rebuild all images" @echo "Targets"
@printf "\n" @echo "--------------------------------------------------------------------------------"
@printf "%s\n" "make build-all: Build all images" @echo
@printf "%s\n" "make rebuild-all: Rebuild all images" @echo "gen-readme [VERSION=] Update README with PHP modules from built images."
@printf "\n" @echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates."
@printf "%s\n" "make build-base: Build all base images" @echo
@printf "%s\n" "make build-mods: Build all mods images" @echo "build-base VERSION= [ARGS=] Build base image by specified version"
@printf "%s\n" "make build-prod: Build all prod images" @echo "build-mods VERSION= [ARGS=] Build mods image by specified version"
@printf "%s\n" "make build-work: Build all work images" @echo "build-prod VERSION= [ARGS=] Build prod image by specified version"
@printf "\n" @echo "build-work VERSION= [ARGS=] Build work image by specified version"
@printf "%s\n" "make rebuild-base: Rebuild all base images" @echo
@printf "%s\n" "make rebuild-mods: Rebuild all mods images" @echo "rebuild-base VERSION= [ARGS=] Rebuild base image by specified version"
@printf "%s\n" "make rebuild-prod: Rebuild all prod images" @echo "rebuild-mods VERSION= [ARGS=] Rebuild mods image by specified version"
@printf "%s\n" "make rebuild-work: Rebuild all work images" @echo "rebuild-prod VERSION= [ARGS=] Rebuild prod image by specified version"
@printf "\n" @echo "rebuild-work VERSION= [ARGS=] Rebuild work image by specified version"
@printf "%s\n" "make build-base-52: Build PHP 5.2 base image" @echo
@printf "%s\n" "make build-base-53: Build PHP 5.3 base image" @echo "test-base VERSION= Test base image by specified version"
@printf "%s\n" "make build-base-54: Build PHP 5.4 base image" @echo "test-mods VERSION= Test mods image by specified version"
@printf "%s\n" "make build-base-55: Build PHP 5.5 base image" @echo "test-prod VERSION= Test prod image by specified version"
@printf "%s\n" "make build-base-56: Build PHP 5.6 base image" @echo "test-work VERSION= Test work image by specified version"
@printf "%s\n" "make build-base-70: Build PHP 7.0 base image" @echo
@printf "%s\n" "make build-base-71: Build PHP 7.1 base image" @echo
@printf "%s\n" "make build-base-72: Build PHP 7.2 base image" @echo "Variables"
@printf "%s\n" "make build-base-73: Build PHP 7.3 base image" @echo "--------------------------------------------------------------------------------"
@printf "%s\n" "make build-base-74: Build PHP 7.4 base image" @echo
@printf "%s\n" "make build-base-80: Build PHP 8.0 base image" @echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0',"
@printf "\n" @echo " '7.1', '7.2', '7.3', '7.4', '8.0'."
@printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image" @echo " For gen-readme target it is optional and if not"
@printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image" @echo " specified, it will generate for all versions."
@printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image" @echo
@printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image" @echo "FAIL_FAST Either 'True' or 'False' (defaults to 'False')."
@printf "%s\n" "make build-mods-56: Build PHP 5.6 mods image" @echo " If set to 'True', each module install has an"
@printf "%s\n" "make build-mods-70: Build PHP 7.0 mods image" @echo " immediate check, which is very slow for CI, but"
@printf "%s\n" "make build-mods-71: Build PHP 7.1 mods image" @echo " yields errors immediately."
@printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image" @echo " If set to 'False', checks are done at the end."
@printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image" @echo
@printf "%s\n" "make build-mods-74: Build PHP 7.4 mods image" @echo "ARGS Can be added to all build-* and rebuild-* targets"
@printf "%s\n" "make build-mods-80: Build PHP 8.0 mods image" @echo " to supply additional docker build options."
@printf "\n"
@printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image"
@printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image"
@printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image"
@printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image"
@printf "%s\n" "make build-prod-56: Build PHP 5.6 prod image"
@printf "%s\n" "make build-prod-70: Build PHP 7.0 prod image"
@printf "%s\n" "make build-prod-71: Build PHP 7.1 prod image"
@printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image"
@printf "%s\n" "make build-prod-73: Build PHP 7.3 prod image"
@printf "%s\n" "make build-prod-74: Build PHP 7.4 prod image"
@printf "%s\n" "make build-prod-80: Build PHP 8.0 prod image"
@printf "\n"
@printf "%s\n" "make build-work-52: Build PHP 5.2 work image"
@printf "%s\n" "make build-work-53: Build PHP 5.3 work image"
@printf "%s\n" "make build-work-54: Build PHP 5.4 work image"
@printf "%s\n" "make build-work-55: Build PHP 5.5 work image"
@printf "%s\n" "make build-work-56: Build PHP 5.6 work image"
@printf "%s\n" "make build-work-70: Build PHP 7.0 work image"
@printf "%s\n" "make build-work-71: Build PHP 7.1 work image"
@printf "%s\n" "make build-work-72: Build PHP 7.2 work image"
@printf "%s\n" "make build-work-73: Build PHP 7.3 work image"
@printf "%s\n" "make build-work-74: Build PHP 7.4 work image"
@printf "%s\n" "make build-work-80: Build PHP 8.0 work image"
@printf "\n"
@printf "%s\n" "make rebuild-base-52: Build PHP 5.2 base image"
@printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image"
@printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image"
@printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image"
@printf "%s\n" "make rebuild-base-56: Build PHP 5.6 base image"
@printf "%s\n" "make rebuild-base-70: Build PHP 7.0 base image"
@printf "%s\n" "make rebuild-base-71: Build PHP 7.1 base image"
@printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image"
@printf "%s\n" "make rebuild-base-73: Build PHP 7.3 base image"
@printf "%s\n" "make rebuild-base-74: Build PHP 7.4 base image"
@printf "%s\n" "make rebuild-base-80: Build PHP 8.0 base image"
@printf "\n"
@printf "%s\n" "make rebuild-mods-52: Build PHP 5.2 mods image"
@printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image"
@printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image"
@printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image"
@printf "%s\n" "make rebuild-mods-56: Build PHP 5.6 mods image"
@printf "%s\n" "make rebuild-mods-70: Build PHP 7.0 mods image"
@printf "%s\n" "make rebuild-mods-71: Build PHP 7.1 mods image"
@printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image"
@printf "%s\n" "make rebuild-mods-73: Build PHP 7.3 mods image"
@printf "%s\n" "make rebuild-mods-74: Build PHP 7.4 mods image"
@printf "%s\n" "make rebuild-mods-80: Build PHP 8.0 mods image"
@printf "\n"
@printf "%s\n" "make rebuild-prod-52: Build PHP 5.2 prod image"
@printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image"
@printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image"
@printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image"
@printf "%s\n" "make rebuild-prod-56: Build PHP 5.6 prod image"
@printf "%s\n" "make rebuild-prod-70: Build PHP 7.0 prod image"
@printf "%s\n" "make rebuild-prod-71: Build PHP 7.1 prod image"
@printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image"
@printf "%s\n" "make rebuild-prod-73: Build PHP 7.3 prod image"
@printf "%s\n" "make rebuild-prod-74: Build PHP 7.4 prod image"
@printf "%s\n" "make rebuild-prod-80: Build PHP 8.0 prod image"
@printf "\n"
@printf "%s\n" "make rebuild-work-52: Build PHP 5.2 work image"
@printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image"
@printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image"
@printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image"
@printf "%s\n" "make rebuild-work-56: Build PHP 5.6 work image"
@printf "%s\n" "make rebuild-work-70: Build PHP 7.0 work image"
@printf "%s\n" "make rebuild-work-71: Build PHP 7.1 work image"
@printf "%s\n" "make rebuild-work-72: Build PHP 7.2 work image"
@printf "%s\n" "make rebuild-work-73: Build PHP 7.3 work image"
@printf "%s\n" "make rebuild-work-74: Build PHP 7.4 work image"
@printf "%s\n" "make rebuild-work-80: Build PHP 8.0 work image"
# -------------------------------------------------------------------------------------------------
# GENERATE TARGETS
# -------------------------------------------------------------------------------------------------
gen-readme:
### ifeq ($(strip $(VERSION)),)
### Generate
###
generate:
cd build/ansible; ansible-playbook generate.yml --diff
###
### Update readme
###
readme:
cd build; ./gen-readme.sh cd build; ./gen-readme.sh
else
### @$(MAKE) --no-print-directory _check-version
### Generate and build @$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=base
### @$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods
gen-build: generate build-all cd build; ./gen-readme.sh ${VERSION}
gen-rebuild: generate rebuild-all endif
gen-dockerfiles:
### docker run --rm \
### Build all $$(tty -s && echo "-it" || echo) \
### -e USER=ansible \
build-all: build-base build-mods build-prod build-work -e MY_UID=$$(id -u) \
rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work -e MY_GID=$$(id -g) \
-v ${PWD}:/data \
-w /data/build/ansible \
cytopia/ansible:2.6-tools ansible-playbook generate.yml \
-e ANSIBLE_STRATEGY_PLUGINS=/usr/lib/python3.6/site-packages/ansible_mitogen/plugins/strategy \
-e ANSIBLE_STRATEGY=mitogen_linear \
-e ansible_python_interpreter=/usr/bin/python3 \
-e \"{build_fail_fast: $(FAIL_FAST)}\" \
--diff $(ARGS)
# -------------------------------------------------------------------------------------------------
# BUILD TARGETS
# -------------------------------------------------------------------------------------------------
### build-base: _check-version
### Build categories build-base:
### docker build $(NO_CACHE) \
build-base: build-base-52 build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 build-base-74 build-base-80 --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
build-mods: build-mods-52 build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 build-mods-74 build-mods-80 --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
build-prod: build-prod-52 build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 build-prod-74 build-prod-80 --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD))" \
build-work: build-work-52 build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 build-work-74 build-work-80 $(ARGS) \
-t $(IMAGE):${VERSION}-base \
rebuild-base: rebuild-base-52 rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 rebuild-base-74 rebuild-base-80 -f $(DIR)/base/Dockerfile-${VERSION} $(DIR)/base
rebuild-mods: rebuild-mods-52 rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 rebuild-mods-74 rebuild-mods-80
rebuild-prod: rebuild-prod-52 rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 rebuild-prod-74 rebuild-prod-80
rebuild-work: rebuild-work-52 rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 rebuild-work-74 rebuild-work-80
build-mods: _check-version
### build-mods: _EXIST_IMAGE=base
### Build separately build-mods: _check-image-exists
### build-mods:
build-base-52: pull-from-52 ifeq ($(strip $(TARGET)),)
docker build -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base docker build $(NO_CACHE) \
build-base-53: pull-from-53 --target builder \
docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base -t $(IMAGE):$(VERSION)-mods \
build-base-54: pull-from-54 -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods;
docker build -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base @# $(NO_CACHE) is removed, as it would otherwise rebuild the 'builder' image again.
build-base-55: pull-from-55 docker build \
docker build -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base --target final \
build-base-56: pull-from-56 --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
docker build -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
build-base-70: pull-from-70 --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
docker build -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base --build-arg EXT_DIR="$$( docker run --rm --entrypoint=php $(IMAGE):$(VERSION)-mods -i \
build-base-71: pull-from-71 | grep ^extension_dir \
docker build -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base | awk -F '=>' '{print $$2}' \
build-base-72: pull-from-72 | xargs \
docker build -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base )" \
build-base-73: pull-from-73 $(ARGS) \
docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base -t $(IMAGE):$(VERSION)-mods \
build-base-74: pull-from-74 -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods;
docker build -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base else
build-base-80: pull-from-80 docker build $(NO_CACHE) \
docker build -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base --target $(TARGET) \
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
build-mods-52: --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
build-mods-53: $(ARGS) \
docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods -t $(IMAGE):$(VERSION)-mods \
build-mods-54: -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods
docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods endif
build-mods-55:
docker build -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods
build-mods-56:
docker build -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods
build-mods-70:
docker build -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods
build-mods-71:
docker build -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods
build-mods-72:
docker build -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods
build-mods-73:
docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods
build-mods-74:
docker build -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods
build-mods-80:
docker build -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods
build-prod-52:
docker build -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod
build-prod-53:
docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod
build-prod-54:
docker build -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod
build-prod-55:
docker build -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod
build-prod-56:
docker build -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod
build-prod-70:
docker build -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod
build-prod-71:
docker build -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod
build-prod-72:
docker build -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod
build-prod-73:
docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod
build-prod-74:
docker build -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod
build-prod-80:
docker build -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod
build-work-52:
docker build -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work
build-work-53:
docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work
build-work-54:
docker build -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work
build-work-55:
docker build -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work
build-work-56:
docker build -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work
build-work-70:
docker build -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work
build-work-71:
docker build -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work
build-work-72:
docker build -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work
build-work-73:
docker build -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work
build-work-74:
docker build -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work
build-work-80:
docker build -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work
build-prod: _check-version
### build-prod: _EXIST_IMAGE=mods
### Rebuild separately build-prod: _check-image-exists
### build-prod:
rebuild-base-52: pull-from-52 docker build $(NO_CACHE) \
docker build --no-cache -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
rebuild-base-53: pull-from-53 --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
rebuild-base-54: pull-from-54 $(ARGS) \
docker build --no-cache -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base -t $(IMAGE):${VERSION}-prod \
rebuild-base-55: pull-from-55 -f $(DIR)/prod/Dockerfile-${VERSION} $(DIR)/prod
docker build --no-cache -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base
rebuild-base-56: pull-from-56
docker build --no-cache -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base
rebuild-base-70: pull-from-70
docker build --no-cache -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base
rebuild-base-71: pull-from-71
docker build --no-cache -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base
rebuild-base-72: pull-from-72
docker build --no-cache -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base
rebuild-base-73: pull-from-73
docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base
rebuild-base-74: pull-from-74
docker build --no-cache -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base
rebuild-base-80: pull-from-80
docker build --no-cache -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base
rebuild-mods-52:
docker build --no-cache -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods
rebuild-mods-53:
docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods
rebuild-mods-54:
docker build --no-cache -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods
rebuild-mods-55:
docker build --no-cache -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods
rebuild-mods-56:
docker build --no-cache -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods
rebuild-mods-70:
docker build --no-cache -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods
rebuild-mods-71:
docker build --no-cache -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods
rebuild-mods-72:
docker build --no-cache -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods
rebuild-mods-73:
docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods
rebuild-mods-74:
docker build --no-cache -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods
rebuild-mods-80:
docker build --no-cache -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods
rebuild-prod-52:
docker build --no-cache -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod
rebuild-prod-53:
docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod
rebuild-prod-54:
docker build --no-cache -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod
rebuild-prod-55:
docker build --no-cache -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod
rebuild-prod-56:
docker build --no-cache -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod
rebuild-prod-70:
docker build --no-cache -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod
rebuild-prod-71:
docker build --no-cache -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod
rebuild-prod-72:
docker build --no-cache -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod
rebuild-prod-73:
docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod
rebuild-prod-74:
docker build --no-cache -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod
rebuild-prod-80:
docker build --no-cache -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod
rebuild-work-52:
docker build --no-cache -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work
rebuild-work-53:
docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work
rebuild-work-54:
docker build --no-cache -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work
rebuild-work-55:
docker build --no-cache -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work
rebuild-work-56:
docker build --no-cache -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work
rebuild-work-70:
docker build --no-cache -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work
rebuild-work-71:
docker build --no-cache -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work
rebuild-work-72:
docker build --no-cache -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work
rebuild-work-73:
docker build --no-cache -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work
rebuild-work-74:
docker build --no-cache -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work
rebuild-work-80:
docker build --no-cache -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work
build-work: _check-version
### build-work: _EXIST_IMAGE=prod
### Pull base FROM images build-work: _check-image-exists
### build-work:
pull-from-52: docker build $(NO_CACHE) \
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.2 | sed 's/^FROM\s*//g';) --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
pull-from-53: --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM\s*//g';) --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
pull-from-54: $(ARGS) \
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.4 | sed 's/^FROM\s*//g';) -t $(IMAGE):${VERSION}-work \
pull-from-55: -f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.5 | sed 's/^FROM\s*//g';)
pull-from-56:
docker pull $(shell grep FROM $(location)/base/Dockerfile-5.6 | sed 's/^FROM\s*//g';)
pull-from-70:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.0 | sed 's/^FROM\s*//g';)
pull-from-71:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.1 | sed 's/^FROM\s*//g';)
pull-from-72:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.2 | sed 's/^FROM\s*//g';)
pull-from-73:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.3 | sed 's/^FROM\s*//g';)
pull-from-74:
docker pull $(shell grep FROM $(location)/base/Dockerfile-7.4 | sed 's/^FROM\s*//g';)
pull-from-80:
docker pull $(shell grep FROM $(location)/base/Dockerfile-8.0 | sed 's/^FROM\s*//g';)
### # -------------------------------------------------------------------------------------------------
### Test all # REBUILD TARGETS
### # -------------------------------------------------------------------------------------------------
test-all: test-base test-mods test-prod test-work
test-base: test-base-52 test-base-53 test-base-54 test-base-55 test-base-56 test-base-70 test-base-71 test-base-72 test-base-73 test-base-74 test-base-80 rebuild-base: _pull-root-image
test-mods: test-mods-52 test-mods-53 test-mods-54 test-mods-55 test-mods-56 test-mods-70 test-mods-71 test-mods-72 test-mods-73 test-mods-74 test-mods-80 rebuild-base: NO_CACHE=--no-cache
test-prod: test-prod-52 test-prod-53 test-prod-54 test-prod-55 test-prod-56 test-prod-70 test-prod-71 test-prod-72 test-prod-73 test-prod-74 test-prod-80 rebuild-base: build-base
test-work: test-work-52 test-work-53 test-work-54 test-work-55 test-work-56 test-work-70 test-work-71 test-work-72 test-work-73 test-work-74 test-work-80
### rebuild-mods: NO_CACHE=--no-cache
### Tests rebuild-mods: build-mods
###
test-base-52:
./tests/test.sh 5.2 base
test-base-53:
./tests/test.sh 5.3 base
test-base-54:
./tests/test.sh 5.4 base
test-base-55:
./tests/test.sh 5.5 base
test-base-56:
./tests/test.sh 5.6 base
test-base-70:
./tests/test.sh 7.0 base
test-base-71:
./tests/test.sh 7.1 base
test-base-72:
./tests/test.sh 7.2 base
test-base-73:
./tests/test.sh 7.3 base
test-base-74:
./tests/test.sh 7.4 base
test-base-80:
./tests/test.sh 8.0 base
test-mods-52:
./tests/test.sh 5.2 mods
test-mods-53:
./tests/test.sh 5.3 mods
test-mods-54:
./tests/test.sh 5.4 mods
test-mods-55:
./tests/test.sh 5.5 mods
test-mods-56:
./tests/test.sh 5.6 mods
test-mods-70:
./tests/test.sh 7.0 mods
test-mods-71:
./tests/test.sh 7.1 mods
test-mods-72:
./tests/test.sh 7.2 mods
test-mods-73:
./tests/test.sh 7.3 mods
test-mods-74:
./tests/test.sh 7.4 mods
test-mods-80:
./tests/test.sh 8.0 mods
test-prod-52: rebuild-prod: NO_CACHE=--no-cache
./tests/test.sh 5.2 prod rebuild-prod: build-prod
test-prod-53:
./tests/test.sh 5.3 prod
test-prod-54:
./tests/test.sh 5.4 prod
test-prod-55:
./tests/test.sh 5.5 prod
test-prod-56:
./tests/test.sh 5.6 prod
test-prod-70:
./tests/test.sh 7.0 prod
test-prod-71:
./tests/test.sh 7.1 prod
test-prod-72:
./tests/test.sh 7.2 prod
test-prod-73:
./tests/test.sh 7.3 prod
test-prod-74:
./tests/test.sh 7.4 prod
test-prod-80:
./tests/test.sh 8.0 prod
test-work-52:
./tests/test.sh 5.2 work rebuild-work: NO_CACHE=--no-cache
test-work-53: rebuild-work: build-work
./tests/test.sh 5.3 work
test-work-54:
./tests/test.sh 5.4 work # -------------------------------------------------------------------------------------------------
test-work-55: # TEST TARGETS
./tests/test.sh 5.5 work # -------------------------------------------------------------------------------------------------
test-work-56:
./tests/test.sh 5.6 work test-base: _check-version
test-work-70: test-base: _EXIST_IMAGE=base
./tests/test.sh 7.0 work test-base: _check-image-exists
test-work-71: test-base:
./tests/test.sh 7.1 work ./tests/test.sh ${VERSION} base
test-work-72:
./tests/test.sh 7.2 work
test-work-73: test-mods: _check-version
./tests/test.sh 7.3 work test-mods: _EXIST_IMAGE=mods
test-work-74: test-mods: _check-image-exists
./tests/test.sh 7.4 work test-mods: _check-version
test-work-80: ./tests/test.sh ${VERSION} mods
./tests/test.sh 8.0 work
test-prod: _check-version
test-prod: _EXIST_IMAGE=prod
test-prod: _check-image-exists
test-prod: _check-version
./tests/test.sh ${VERSION} prod
test-work: _check-version
test-work: _EXIST_IMAGE=work
test-work: _check-image-exists
test-work: _check-version
./tests/test.sh ${VERSION} work
# -------------------------------------------------------------------------------------------------
# HELPER TARGETS
# -------------------------------------------------------------------------------------------------
_check-version:
ifeq ($(strip $(VERSION)),)
@$(info This make target requires the VERSION variable to be set.)
@$(info make build-<flavour> VERSION=7.3)
@$(info )
@$(error Exiting)
endif
ifeq ($(VERSION),5.2)
else
ifeq ($(VERSION),5.3)
else
ifeq ($(VERSION),5.4)
else
ifeq ($(VERSION),5.5)
else
ifeq ($(VERSION),5.6)
else
ifeq ($(VERSION),7.0)
else
ifeq ($(VERSION),7.1)
else
ifeq ($(VERSION),7.2)
else
ifeq ($(VERSION),7.3)
else
ifeq ($(VERSION),7.4)
else
ifeq ($(VERSION),8.0)
else
@$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' or '8.0')
@$(info )
@$(error Exiting)
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
_check-image-exists:
@if [ "$$(docker images -q $(IMAGE):$(VERSION)-$(_EXIST_IMAGE))" = "" ]; then \
>&2 echo "Docker image '$(IMAGE):$(VERSION)-$(_EXIST_IMAGE)' was not found locally."; \
>&2 echo "Either build it first or explicitly pull it from Dockerhub."; \
>&2 echo "This is a safeguard to not automatically pull the Docker image."; \
>&2 echo; \
false; \
fi;
_pull-root-image:
@echo "Pulling root image for PHP ${VERSION}"
@docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';)

View File

@@ -1,11 +1,15 @@
# PHP-FPM Docker images # PHP-FPM Docker images
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm) [![Linting](https://github.com/devilbox/docker-php-fpm/workflows/Linting/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=Linting)
[![CI](https://github.com/devilbox/docker-php-fpm/workflows/PHP-CI/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-CI)
[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases) [![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases)
[![Gitter](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gitter](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group) [![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group)
[![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT) [![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT)
This repository will provide you fully functional PHP-FPM Docker images in different flavours, This repository will provide you fully functional PHP-FPM Docker images in different flavours,
versions and packed with different types of integrated PHP modules. It also solves the problem of **[syncronizing file permissions](#unsynchronized-permissions)** of mounted volumes between the host and the container. versions and packed with different types of integrated PHP modules. It also solves the problem of **[syncronizing file permissions](#unsynchronized-permissions)** of mounted volumes between the host and the container.
@@ -598,57 +602,57 @@ Check out this table to see which Docker image provides what PHP modules.
<tr> <tr>
<th>5.2</th> <th>5.2</th>
<td id="52-base">ctype, curl, date, dom, filter, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, readline, Reflection, session, SimpleXML, soap, SPL, SQLite, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="52-base">ctype, curl, date, dom, filter, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, readline, Reflection, session, SimpleXML, soap, SPL, SQLite, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="52-mods">amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="52-mods">amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, OAuth, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.3</th> <th>5.3</th>
<td id="53-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="53-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="53-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="53-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.4</th> <th>5.4</th>
<td id="54-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="54-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="54-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="54-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.5</th> <th>5.5</th>
<td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="55-mods">amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>5.6</th> <th>5.6</th>
<td id="56-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mhash, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="56-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mhash, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="56-mods">amqp, apc, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="56-mods">amqp, apc, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.0</th> <th>7.0</th>
<td id="70-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="70-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="70-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.1</th> <th>7.1</th>
<td id="71-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="71-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="71-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.2</th> <th>7.2</th>
<td id="72-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="72-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="72-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.3</th> <th>7.3</th>
<td id="73-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="73-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="73-mods">apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, sqlsrv, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>7.4</th> <th>7.4</th>
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="74-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, ssh2, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
<tr> <tr>
<th>8.0</th> <th>8.0</th>
<td id="80-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td> <td id="80-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="80-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td> <td id="80-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -794,7 +798,7 @@ Have a look at the following table to see all supported environment variables fo
<td><code>ENABLE_MAIL</code></td> <td><code>ENABLE_MAIL</code></td>
<td>bool</td> <td>bool</td>
<td><code>0</code></td> <td><code>0</code></td>
<td>Enable local email catch-all.<br/>Postfix will be configured for local delivery and all mails sent (even to real domains) will be catched locally. No email will ever go out. They will all be stored in a local devilbox account.<br/>Value: <code>0</code> or <code>1</code></td> <td>Start local postfix with or without email catch-all.<br/><code>0</code>: Postfix service disabled.<br/><code>1</code>: Postfix service started normally.<br/><code>2</code>: Postfix service started configured for local delivery and all mails sent (even to real domains) will be catched locally. No email will ever go out. They will all be stored in a local devilbox account.<br/>Value: <code>0</code>, <code>1</code> or <code>2</code></td>
</tr> </tr>
<tr> <tr>
<td><code>FORWARD_PORTS_TO_LOCALHOST</code></td> <td><code>FORWARD_PORTS_TO_LOCALHOST</code></td>
@@ -867,7 +871,7 @@ Have a look at the following table to see all offered volumes for each Docker im
</tr> </tr>
<tr> <tr>
<td><code>/var/mail</code></td> <td><code>/var/mail</code></td>
<td>Emails caught be the postfix catch-all (<code>ENABLE_MAIL=1</code>) will be available in this directory.</td> <td>Emails caught be the postfix catch-all (<code>ENABLE_MAIL=2</code>) will be available in this directory.</td>
</tr> </tr>
<tr> <tr>
<td colspan="3"></td> <td colspan="3"></td>
@@ -1052,6 +1056,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
<td><a href="https://github.com/FriendsOfPHP/PHP-CS-Fixer">php-cs-fixer</a></td> <td><a href="https://github.com/FriendsOfPHP/PHP-CS-Fixer">php-cs-fixer</a></td>
<td>A tool to automatically fix PHP Coding Standards issues.</td> <td>A tool to automatically fix PHP Coding Standards issues.</td>
</tr> </tr>
<tr>
<td><a href="https://phpmd.org">phpmd</a></td>
<td>PHP Mess Detector.</td>
</tr>
<tr> <tr>
<td><a href="https://photoncms.com/resources/installing">photon</a></td> <td><a href="https://photoncms.com/resources/installing">photon</a></td>
<td>Photon CMS cli.</td> <td>Photon CMS cli.</td>
@@ -1182,12 +1190,12 @@ $ docker run -d \
#### Launch Postfix for mail-catching #### Launch Postfix for mail-catching
Once you set `$ENABLE_MAIL=1`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails. Once you set `$ENABLE_MAIL=2`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails.
```shell ```shell
$ docker run -d \ $ docker run -d \
-p 127.0.0.1:9000:9000 \ -p 127.0.0.1:9000:9000 \
-v /tmp/mail:/var/mail \ -v /tmp/mail:/var/mail \
-e ENABLE_MAIL=1 \ -e ENABLE_MAIL=2 \
-t devilbox/php-fpm:7.2-prod -t devilbox/php-fpm:7.2-prod
``` ```
@@ -1224,7 +1232,7 @@ $ docker run -d \
-e MYSQL_BACKUP_USER=root \ -e MYSQL_BACKUP_USER=root \
-e MYSQL_BACKUP_PASS=somepass \ -e MYSQL_BACKUP_PASS=somepass \
-e MYSQL_BACKUP_HOST=mysql \ -e MYSQL_BACKUP_HOST=mysql \
-v ~/backups:/shared/backsup \ -v ~/backups:/shared/backups \
--name php \ --name php \
-t devilbox/php-fpm:7.2-work -t devilbox/php-fpm:7.2-work
@@ -1234,7 +1242,8 @@ $ docker exec -it php mysqldump-secure
<h2><img id="automated-builds" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Automated builds</h2> <h2><img id="automated-builds" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Automated builds</h2>
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm) [![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly)
[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches. Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead. {{ edit_comment_work }}
FROM devilbox/php-fpm:{{ php_version }}-prod FROM devilbox/php-fpm:{{ php_version }}-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org> MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -6,12 +6,20 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
### ###
### Labels ### Labels
### ###
LABEL \ # https://github.com/opencontainers/image-spec/blob/master/annotations.md
name="cytopia's PHP-FPM {{ php_version }} Image" \ #LABEL "org.opencontainers.image.created"=""
image="devilbox/php-fpm" \ #LABEL "org.opencontainers.image.version"=""
tag="{{ php_version }}-work" \ #LABEL "org.opencontainers.image.revision"=""
vendor="devilbox" \ LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
license="MIT" LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-work"
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-work"
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-work"
### ###
@@ -23,45 +31,40 @@ ENV BASH_PROFILE=".bashrc"
### ###
### Install Tools ### Install Tools
### ###
RUN set -x \ RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
curl \ curl \
dirmngr \ dirmngr \
gnupg \ gnupg \
{% for repo in apt_repositories_enabled -%} \
{%- for repo in apt_repositories_enabled -%}
{#- Not disabled -#} {#- Not disabled -#}
{%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%} {%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%}
{#- Version specific pre-command available? -#} {#- Version specific pre-command available? -#}
{%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %} {%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] -%}
&& {{ apt_repositories_available[repo][php_version]['pre'] }} \ {{ "\n\t" }}&& {{ apt_repositories_available[repo][php_version]['pre'] }} \
{# #}
{#- Generic pre-command available? -#} {#- Generic pre-command available? -#}
{%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %} {%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] -%}
&& {{ apt_repositories_available[repo]['all']['pre'] }} \ {{ "\n\t" }}&& {{ apt_repositories_available[repo]['all']['pre'] }} \
{# #}
{%- endif -%} {%- endif -%}
{#- Version specific key available? -#} {#- Version specific key available? -#}
{%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %} {%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] -%}
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \ {{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \
{# #}
{#- Generic key available? -#} {#- Generic key available? -#}
{%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %} {%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] -%}
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \ {{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \
{# #}
{%- endif -%} {%- endif -%}
{#- Version specific repository available? -#} {#- Version specific repository available? -#}
{%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %} {%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] -%}
&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ {{ "\n\t" }}&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{# #}
{#- Generic repository available? -#} {#- Generic repository available? -#}
{%- else %} {%- elif 'all' in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo]['all'] -%}
&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ {{ "\n\t" }}&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
{# #}
{%- endif -%} {%- endif -%}
{%- endif -%} {%- endif -%}
{%- endfor %} {%- endfor -%}{{ "\n\t" }}\
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
ack-grep \ ack-grep \
@@ -82,6 +85,7 @@ RUN set -x \
git \ git \
git-flow \ git-flow \
git-svn \ git-svn \
ghostscript \
graphviz \ graphviz \
hostname \ hostname \
htop \ htop \
@@ -97,7 +101,11 @@ RUN set -x \
mongodb-org-shell \ mongodb-org-shell \
mongodb-org-tools \ mongodb-org-tools \
moreutils \ moreutils \
{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0] %}
mariadb-client \
{% else %}
mysql-client \ mysql-client \
{% endif %}
nano \ nano \
net-tools \ net-tools \
netcat \ netcat \
@@ -123,6 +131,7 @@ RUN set -x \
xz-utils \ xz-utils \
yarn \ yarn \
zip \ zip \
zlib1g-dev \
zsh \ zsh \
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
@@ -135,35 +144,55 @@ RUN set -x \
### ###
### Install custom software ### Install custom software
### ###
RUN set -x \ {% if not build_fail_fast %}
{% for tool in software_enabled %} RUN set -eux \
{# Not disabled #} {%- endif -%}
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %} {%- for tool in software_enabled -%}
# {{ tool }} {# Not disabled #}
{# Version specific pre-command available? #} {%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
{% if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] %} {{ "\n" }}# -------------------- {{ tool }} --------------------
&& {{ software_available[tool][php_version]['pre'] }} \ {%- if build_fail_fast -%}
{# Generic pre-command available? #} {{ "\n" }}RUN set -eux \
{% elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] %} {%- endif -%}
&& {{ software_available[tool]['all']['pre'] }} \ {#- Version specific pre-command available? -#}
{% endif %} {%- if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] -%}
{# Version specific command available? #} {{ "\n\t" }}&& {{ software_available[tool][php_version]['pre'] }} \
{% if php_version in software_available[tool] and 'command' in software_available[tool][php_version] %} {#- Generic pre-command available? -#}
&& {{ software_available[tool][php_version]['command'] }} \ {%- elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] -%}
{# Generic command available? #} {{ "\n\t" }}&& {{ software_available[tool]['all']['pre'] }} \
{% else %} {%- endif -%}
&& {{ software_available[tool]['all']['command'] }} \ {#- Version specific command available? -#}
{% endif %} {%- if php_version in software_available[tool] and 'command' in software_available[tool][php_version] -%}
{# Version specific post-command available? #} {{ "\n\t" }}&& {{ software_available[tool][php_version]['command'] }} \
{% if php_version in software_available[tool] and 'post' in software_available[tool][php_version] %} {#- Generic command available? -#}
&& {{ software_available[tool][php_version]['post'] }} \ {%- else -%}
{# Generic post-command available? #} {{ "\n\t" }}&& {{ software_available[tool]['all']['command'] }} \
{% elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] %} {%- endif -%}
&& {{ software_available[tool]['all']['post'] }} \ {#- Version specific post-command available? -#}
{% endif %} {%- if php_version in software_available[tool] and 'post' in software_available[tool][php_version] -%}
{% endif %} {{ "\n\t" }}&& {{ software_available[tool][php_version]['post'] }} \
{% endfor %} {#- Generic post-command available? -#}
\ {%- elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] -%}
{{ "\n\t" }}&& {{ software_available[tool]['all']['post'] }} \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in software_available[tool] -%}
{{ "\n\t" }}&& {{ software_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& (rm -rf /root/.gem || true ) \ && (rm -rf /root/.gem || true ) \
&& (rm -rf /root/.cache || true) \ && (rm -rf /root/.cache || true) \
&& (rm -rf /root/.composer || true) \ && (rm -rf /root/.composer || true) \
@@ -181,61 +210,50 @@ RUN set -x \
### ###
### Install Node npm packages (globally) ### Install Composer (PHP)
### ###
RUN set -x \ {% if not build_fail_fast %}
{% for tool in npm_enabled %} RUN set -eux \
{# Not disabled #} {%- endif -%}
{% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %} {%- for tool in composer_enabled -%}
# {{ tool }} {#- Not disabled -#}
{# Version specific gem version available? #} {%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
{% if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] %} {{ "\n" }}# -------------------- {{ tool }} --------------------
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool][php_version]['version'] }}' devilbox \ {%- if build_fail_fast -%}
{# Generic gem version available? #} {{ "\n" }}RUN set -eux \
{% elif 'all' in npm_available[tool] and 'version' in npm_available[tool]['all'] %} {%- endif -%}
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \ {#- Version specific gem version available? -#}
{# No version info available #} {%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%}
{% else %} {{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['version'] }} \
&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }}' devilbox \ {#- Generic gem version available? -#}
{% endif %} {%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%}
{% endif %} {{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }} \
{%- endif -%}
{#- Symlinks available? -#}
{%- if 'link' in composer_available[tool] -%}
{{ "\n\t" }}&& ln -s {{ composer_home }}/vendor/{{ composer_available[tool]['name'] }}/{{ composer_available[tool]['link'] }} /usr/local/bin/ \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in composer_available[tool] -%}
{{ "\n\t" }}&& {{ composer_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{% endfor %} {% endfor %}
\ {% if build_fail_fast -%}
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \ RUN set -eux \{{ "\n" }}
\ {%- else -%}
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ {{ "\n\t" }}\{{ "\n" }}
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ {%- endif %}
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install Python pip packages
###
RUN set -x \
{% for tool in pip_enabled %}
{# Not disabled #}
{% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %}
# {{ tool }}
{# Version specific gem version available? #}
{% if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} \
{# Generic gem version available? #}
{% elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} \
{# No version info available #}
{% else %}
&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \
{% endif %}
{% endif %}
{% endfor %}
\
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
\ \
@@ -245,26 +263,100 @@ RUN set -x \
### ###
### Install Ruby gems ### Install npm (Node)
### ###
RUN set -x \ {% if not build_fail_fast %}
{% for tool in gem_enabled %} RUN set -eux \
{# Not disabled #} {%- endif -%}
{% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %} {%- for tool in npm_enabled -%}
# {{ tool }} {#- Not disabled -#}
{# Version specific gem version available? #} {%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
{% if php_version in gem_available[tool] and 'version' in gem_available[tool][php_version] %} {{ "\n" }}# -------------------- {{ tool }} --------------------
&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool][php_version]['version'] }} \ {%- if build_fail_fast -%}
{# Generic gem version available? #} {{ "\n" }}RUN set -eux \
{% elif 'all' in gem_available[tool] and 'version' in gem_available[tool]['all'] %} {%- endif -%}
&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool]['all']['version'] }} \ {#- Version specific gem version available? -#}
{# No version info available #} {%- if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] -%}
{% else %} {{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }} {{ npm_available[tool][php_version]['version'] }}' devilbox \
&& gem install {{ gem_available[tool]['name'] }} \ {#- Generic gem version available? -#}
{% endif %} {%- elif 'all' in npm_available[tool] and 'version' in npm_available[tool]['all'] -%}
{% endif %} {{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \
{% endfor %} {#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g --force {{ npm_available[tool]['name'] }}' devilbox \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in npm_available[tool] -%}
{{ "\n\t" }}&& PATH=$PATH:/opt/nvm/versions/node/$(/bin/ls -1 /opt/nvm/versions/node/ | sort -V | tail -1)/bin /opt/nvm/versions/node/$(/bin/ls -1 /opt/nvm/versions/node/ | sort -V | tail -1)/bin/{{ npm_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \
\ \
&& su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \
&& rm -rf /home/devilbox/.npm \
&& rm -rf /home/devilbox/.cache \
&& rm -rf /home/devilbox/.config \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
###
### Install gem (Ruby)
###
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in gem_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in gem_available[tool] and 'version' in gem_available[tool][php_version] -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool][php_version]['version'] }} \
{#- Generic gem version available? -#}
{%- elif 'all' in gem_available[tool] and 'version' in gem_available[tool]['all'] -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& gem install {{ gem_available[tool]['name'] }} \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in gem_available[tool] -%}
{{ "\n\t" }}&& {{ gem_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& rm -rf /root/.gem \ && rm -rf /root/.gem \
&& rm -rf /tmp/* \ && rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \ && (rm -rf /tmp/.* || true) \
@@ -274,12 +366,62 @@ RUN set -x \
&& (find /usr/local/sbin -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
###
{% if not build_fail_fast %}
RUN set -eux \
{%- endif -%}
{%- for tool in pip_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) -%}
{{ "\n" }}# -------------------- {{ tool }} --------------------
{%- if build_fail_fast -%}
{{ "\n" }}RUN set -eux \
{%- endif -%}
{#- Version specific gem version available? -#}
{%- if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} \
{#- Generic gem version available? -#}
{%- elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} \
{#- No version info available -#}
{%- else -%}
{{ "\n\t" }}&& pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \
{%- endif -%}
{#- Fail fast version -#}
{%- if build_fail_fast -%}
{%- if 'check' in pip_available[tool] -%}
{{ "\n\t" }}&& {{ pip_available[tool]['check'] }}{{ "\n\n" }}
{%- else -%}
{{ "\n\t" }}&& true{{ "\n\n" }}
{%- endif -%}
{%- else -%}
{{ "\n\t" }}\
{%- endif -%}
{#- end of Fail fast version -#}
{%- endif -%}
{%- endfor -%}
{% if build_fail_fast -%}
RUN set -eux \{{ "\n" }}
{%- else -%}
{{ "\n\t" }}\{{ "\n" }}
{%- endif %}
&& rm -rf /root/.cache/pip \
&& rm -rf /tmp/* \
&& (rm -rf /tmp/.* || true) \
\
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
### ###
### Configure Bash ### Configure Bash
### ###
RUN \ RUN \
{ \ { \
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/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 "export PATH"; \
echo ". /etc/bash-devilbox"; \ echo ". /etc/bash-devilbox"; \
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
@@ -298,7 +440,7 @@ RUN \
### ###
### Verify ### Verify
### ###
RUN set -x \ RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \
&& /usr/local/sbin/php-fpm --test \ && /usr/local/sbin/php-fpm --test \
@@ -314,43 +456,54 @@ RUN set -x \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini && rm -f /usr/local/etc/php/php.ini
RUN set -x \ RUN set -eux \
{# ---- SOFTWARE ---- #} # -------------------- Software --------------------
{% for tool in software_enabled %} {%- for tool in software_enabled -%}
{# Not disabled #} {#- Not disabled -#}
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %} {%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
{% if 'check' in software_available[tool] %} {%- if 'check' in software_available[tool] -%}
&& {{ software_available[tool]['check'] }} \ {{ "\n\t" }}&& {{ software_available[tool]['check'] }} \
{% endif %} {%- endif -%}
{% endif %} {%- endif -%}
{% endfor %} \ {%- endfor -%}{{ "\n\t" }}\
{# ---- PIP ---- #} # -------------------- Composer --------------------
{% for tool in pip_enabled %} {%- for tool in composer_enabled -%}
{# Not disabled #} {#- Not disabled -#}
{% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %} {%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
{% if 'check' in pip_available[tool] %} {%- if 'check' in composer_available[tool] -%}
&& {{ pip_available[tool]['check'] }} \ {{ "\n\t" }}&& {{ composer_available[tool]['check'] }} \
{% endif %} {%- endif -%}
{% endif %} {%- endif -%}
{% endfor %} \ {%- endfor -%}{{ "\n\t" }}\
{# ---- NPM ---- #} # -------------------- PIP --------------------
{% for tool in npm_enabled %} {%- for tool in pip_enabled -%}
{# Not disabled #} {#- Not disabled -#}
{% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %} {%- if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) -%}
{% if 'check' in npm_available[tool] %} {%- if 'check' in pip_available[tool] -%}
&& {{ npm_available[tool]['check'] }} \ {{ "\n\t" }}&& {{ pip_available[tool]['check'] }} \
{% endif %} {%- endif -%}
{% endif %} {%- endif -%}
{% endfor %} \ {%- endfor -%}{{ "\n\t" }}\
{# ---- GEM ---- #} # -------------------- NPM --------------------
{% for tool in gem_enabled %} {%- for tool in npm_enabled -%}
{# Not disabled #} {#- Not disabled -#}
{% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %} {%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
{% if 'check' in gem_available[tool] %} {%- if 'check' in npm_available[tool] -%}
&& {{ gem_available[tool]['check'] }} \ {{ "\n\t" }}&& {{ npm_available[tool]['check'] }} \
{% endif %} {%- endif -%}
{% endif %} {%- endif -%}
{% endfor %} \ {%- endfor -%}{{ "\n\t" }}\
# -------------------- GEM --------------------
{%- for tool in gem_enabled -%}
{#- Not disabled -#}
{%- if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) -%}
{%- if 'check' in gem_available[tool] -%}
{{ "\n\t" }}&& {{ gem_available[tool]['check'] }} \
{%- endif -%}
{%- endif -%}
{% endfor %}{{ "\n\t" }}\
# -------------------- Cleanup --------------------
&& rm -rf /home/devilbox/.cache/ \
&& rm -rf /home/devilbox/.config/ \ && rm -rf /home/devilbox/.config/ \
&& rm -rf /root/.ansible \ && rm -rf /root/.ansible \
&& rm -rf /root/.console \ && rm -rf /root/.console \
@@ -374,7 +527,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
### ###
### Volumes ### Volumes
### ###
@@ -398,4 +550,5 @@ WORKDIR /shared/httpd
### ###
### Entrypoint ### Entrypoint
### ###
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

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

View File

@@ -54,6 +54,7 @@ extensions_enabled:
- mysql - mysql
- mysqli - mysqli
- mysqlnd - mysqlnd
- oauth
- oci8 - oci8
- odbc - odbc
- opcache - opcache
@@ -70,6 +71,8 @@ extensions_enabled:
- pdo_sqlite - pdo_sqlite
- pdo_sqlsrv - pdo_sqlsrv
- pgsql - pgsql
- psr
# requires psr to be installed
- phalcon - phalcon
- phar - phar
- posix - posix
@@ -86,8 +89,11 @@ extensions_enabled:
- soap - soap
- sockets - sockets
- sodium - sodium
- solr
- spl - spl
- sqlsrv - sqlsrv
- ssh2
# requires sockets to be installed
- swoole - swoole
- sysvmsg - sysvmsg
- sysvsem - sysvsem
@@ -117,6 +123,7 @@ extensions_enabled:
# #
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# pre: [optional] Run command before anything else # pre: [optional] Run command before anything else
# post: [optional] Run command after anything else (builder and final image)
# build_dep: [optional] Array of build dependencies # build_dep: [optional] Array of build dependencies
# run_dep: [optional] Array of run-time dependencies # run_dep: [optional] Array of run-time dependencies
# type: [required] One of 'builtin', 'pecl' or 'git' # type: [required] One of 'builtin', 'pecl' or 'git'
@@ -135,7 +142,7 @@ extensions_enabled:
# command: [required] Custom command to install and enable a module # command: [required] Custom command to install and enable a module
extensions_available: extensions_available:
amqp: amqp:
disabled: [7.3, 7.4, 8.0] disabled: [8.0]
5.2: 5.2:
run_dep: [librabbitmq1] run_dep: [librabbitmq1]
type: pecl type: pecl
@@ -158,7 +165,7 @@ extensions_available:
build_dep: [librabbitmq-dev] build_dep: [librabbitmq-dev]
run_dep: [librabbitmq4] run_dep: [librabbitmq4]
apcu: apcu:
disabled: [5.2, 7.4, 8.0] disabled: [5.2, 8.0]
5.3: 5.3:
type: pecl type: pecl
version: 4.0.11 version: 4.0.11
@@ -177,7 +184,7 @@ extensions_available:
all: all:
type: builtin type: builtin
blackfire: blackfire:
disabled: [5.2, 5.3, 5.4, 5.5, 7.4, 8.0] disabled: [5.2, 5.3, 5.4, 5.5, 8.0]
all: all:
type: custom type: custom
command: | command: |
@@ -215,6 +222,7 @@ extensions_available:
all: all:
type: builtin type: builtin
ffi: ffi:
already_avail: [8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3]
all: all:
type: git type: git
@@ -275,9 +283,11 @@ extensions_available:
type: builtin type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
7.0: 7.0:
type: builtin type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
7.1: 7.1:
type: builtin type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
@@ -289,16 +299,16 @@ extensions_available:
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv
7.4: 7.4:
type: builtin type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv
8.0: 8.0:
type: builtin type: builtin
configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --enable-gd-jis-conv
all: all:
type: builtin type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf
build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev]
run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx5, libfreetype6, libwebp6]
gettext: gettext:
all: all:
type: builtin type: builtin
@@ -332,21 +342,17 @@ extensions_available:
all: all:
type: pecl type: pecl
imagick: imagick:
disabled: [5.2, 7.4, 8.0] disabled: [5.2, 5.3, 5.4, 5.5, 8.0] # 5.3, 5.4 and 5.5 segfaults
5.3: 5.6:
type: pecl type: pecl
version: 3.3.0 run_dep: [libmagickwand-6.q16-3, libwebp6]
run_dep: [libmagickwand-6.q16-2] 7.0:
5.4:
type: pecl type: pecl
run_dep: [libmagickwand-6.q16-2] run_dep: [libmagickwand-6.q16-3, libwebp6]
5.5:
type: pecl
run_dep: [libmagickwand-6.q16-2]
all: all:
type: pecl type: pecl
build_dep: [libmagickwand-dev] build_dep: [libmagickwand-dev, libwebp6]
run_dep: [libmagickwand-6.q16-3] run_dep: [libmagickwand-6.q16-6, libwebp-dev]
imap: imap:
disabled: [7.4, 8.0] # TODO: re-enable. currently fails with: configure: error: OpenSSL libraries not found. disabled: [7.4, 8.0] # TODO: re-enable. currently fails with: configure: error: OpenSSL libraries not found.
all: all:
@@ -356,6 +362,7 @@ extensions_available:
build_dep: [libc-client-dev, libkrb5-dev, libcurl4-openssl-dev] build_dep: [libc-client-dev, libkrb5-dev, libcurl4-openssl-dev]
run_dep: [libc-client2007e] run_dep: [libc-client2007e]
interbase: interbase:
disabled: [7.4, 8.0]
all: all:
type: builtin type: builtin
build_dep: [libfbclient2, libib-util, firebird-dev] build_dep: [libfbclient2, libib-util, firebird-dev]
@@ -373,12 +380,18 @@ extensions_available:
5.5: 5.5:
type: builtin type: builtin
run_dep: [libicu52] run_dep: [libicu52]
5.6:
type: builtin
run_dep: [libicu57]
7.0:
type: builtin
run_dep: [libicu57]
all: all:
type: builtin type: builtin
build_dep: [libicu-dev] build_dep: [libicu-dev]
run_dep: [libicu57] run_dep: [libicu63]
ioncube: ioncube:
disabled: [7.3, 7.4, 8.0] disabled: [7.4, 8.0]
all: all:
type: custom type: custom
command: | command: |
@@ -406,34 +419,36 @@ extensions_available:
all: all:
type: builtin type: builtin
mcrypt: mcrypt:
disabled: [7.4, 8.0] disabled: [8.0]
7.2: 7.2:
type: pecl type: pecl
version: 1.0.1 version: 1.0.1
7.3: 7.3:
type: pecl type: pecl
version: 1.0.2 version: 1.0.2
7.4:
type: pecl
all: all:
type: builtin type: builtin
run_dep: [libmcrypt4] run_dep: [libmcrypt4]
build_dep: [libmcrypt-dev] build_dep: [libmcrypt-dev]
memcache: memcache:
disabled: [7.3, 7.4, 8.0] disabled: [8.0]
7.0: 5.2:
type: git type: pecl
git_url: https://github.com/websupport-sk/pecl-memcache version: 2.2.7
git_ref: origin/php7 5.3:
configure: --with-zlib-dir=/usr type: pecl
7.1: version: 2.2.7
type: git 5.4:
git_url: https://github.com/websupport-sk/pecl-memcache type: pecl
git_ref: origin/php7 version: 2.2.7
configure: --with-zlib-dir=/usr 5.5:
7.2: type: pecl
type: git version: 2.2.7
git_url: https://github.com/websupport-sk/pecl-memcache 5.6:
git_ref: origin/php7 type: pecl
configure: --with-zlib-dir=/usr version: 2.2.7
all: all:
type: pecl type: pecl
build_dep: [zlib1g-dev] build_dep: [zlib1g-dev]
@@ -478,10 +493,10 @@ extensions_available:
disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0] # Deprecated disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0] # Deprecated
5.2: 5.2:
type: pecl type: pecl
command: yes | pecl install mongo-1.5.8 command: yes yes | pecl install mongo-1.5.8
all: all:
type: pecl type: pecl
command: yes | pecl install mongo command: yes yes | pecl install mongo
build_dep: [libssl-dev, libsasl2-dev] build_dep: [libssl-dev, libsasl2-dev]
mongodb: mongodb:
disabled: [5.2] disabled: [5.2]
@@ -491,11 +506,15 @@ extensions_available:
5.4: 5.4:
type: pecl type: pecl
version: 1.2.11 version: 1.2.11
5.5:
type: pecl
version: 1.5.5
8.0: 8.0:
type: git type: git
git_url: https://github.com/mongodb/mongo-php-driver git_url: https://github.com/mongodb/mongo-php-driver
command: | command: |
git submodule update --init \ git checkout v1.6 \
&& git submodule update --init \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0 # 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_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' \
@@ -504,6 +523,21 @@ extensions_available:
&& 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' \
&& 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_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 \ && phpize \
&& ./configure --enable-mongodb \ && ./configure --enable-mongodb \
&& make all \ && make all \
@@ -512,7 +546,7 @@ extensions_available:
type: pecl type: pecl
build_dep: [libssl-dev, libsasl2-dev] build_dep: [libssl-dev, libsasl2-dev]
msgpack: msgpack:
disabled: [7.4, 8.0] disabled: [8.0]
5.2: 5.2:
type: pecl type: pecl
version: 0.5.7 version: 0.5.7
@@ -546,6 +580,26 @@ extensions_available:
mysqlnd: mysqlnd:
disabled: [5.2] disabled: [5.2]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0] already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
oauth:
disabled: [8.0]
5.2:
type: pecl
version: 1.2.3
5.3:
type: pecl
version: 1.2.3
5.4:
type: pecl
version: 1.2.3
5.5:
type: pecl
version: 1.2.3
5.6:
type: pecl
version: 1.2.3
all:
type: pecl
build_dep: [libpcre3-dev]
oci8: oci8:
disabled: [5.2] disabled: [5.2]
all: all:
@@ -565,9 +619,13 @@ extensions_available:
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${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}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${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) \
build_dep: [alien, libaio-dev] build_dep: [alien, libaio-dev]
run_dep: [libaio1] run_dep: [libaio1]
post: |
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) \
odbc: odbc:
disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found! disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found!
opcache: opcache:
@@ -610,16 +668,16 @@ extensions_available:
build_dep: [zlib1g-dev] build_dep: [zlib1g-dev]
pdo_oci: pdo_oci:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6] disabled: [5.2, 5.3, 5.4, 5.5, 5.6]
8.0: 7.2:
type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
7.4:
type: builtin type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
7.3: 7.3:
type: builtin type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
7.2: 7.4:
type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
8.0:
type: builtin type: builtin
configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR}
all: all:
@@ -666,13 +724,26 @@ extensions_available:
type: builtin type: builtin
build_dep: [libpq-dev] build_dep: [libpq-dev]
run_dep: [libpq5] run_dep: [libpq5]
psr:
disabled: [5.2, 5.3, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module
5.4:
type: pecl
version: 0.5.1
5.5:
type: pecl
version: 0.5.1
5.6:
type: pecl
version: 0.6.0 # NOTE: 0.6.1 fails with: Package "psr" Version "0.6.1" does not have REST xml available
all:
type: pecl
phalcon: phalcon:
disabled: [5.2, 7.4, 8.0] disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks
5.3: 5.3:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
git_ref: phalcon-v2.0.9 git_ref: phalcon-v2.0.9
command: cd build && ./install >/dev/null command: cd build && ./install
5.4: 5.4:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
@@ -681,22 +752,22 @@ extensions_available:
5.5: 5.5:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
git_ref: v3.4.2 git_ref: v3.4.4
command: cd build && ./install command: cd build && ./install
5.6: 5.6:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
git_ref: v3.4.2 git_ref: v3.4.4
command: cd build && ./install command: cd build && ./install
7.0: 7.0:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
git_ref: v3.4.2 git_ref: v3.4.4
command: cd build && ./install command: cd build && ./install
7.1: 7.1:
type: git type: git
git_url: https://github.com/phalcon/cphalcon git_url: https://github.com/phalcon/cphalcon
git_ref: v3.4.2 git_ref: v3.4.4
command: cd build && ./install command: cd build && ./install
all: all:
type: git type: git
@@ -718,6 +789,7 @@ extensions_available:
readline: readline:
already_avail: "{{ php_all_versions }}" already_avail: "{{ php_all_versions }}"
recode: recode:
disabled: [7.4, 8.0]
already_avail: [5.3, 5.4] already_avail: [5.3, 5.4]
all: all:
type: builtin type: builtin
@@ -727,34 +799,26 @@ extensions_available:
5.2: 5.2:
type: pecl type: pecl
version: 2.2.7 version: 2.2.7
7.4: 5.3:
type: git type: pecl
git_url: https://github.com/phpredis/phpredis version: 4.3.0
# This is a nasty work-around to fix current phpredis implementation for PHP 7.4 5.4:
command: | type: pecl
phpize \ version: 4.3.0
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ 5.5:
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \ type: pecl
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \ version: 4.3.0
&& ./configure --enable-redis \ 5.6:
&& make -j$(getconf _NPROCESSORS_ONLN) \ type: pecl
&& make install \ version: 4.3.0
8.0: 8.0:
type: git type: git
git_url: https://github.com/phpredis/phpredis git_url: https://github.com/phpredis/phpredis
# This is a nasty work-around to fix current phpredis implementation for PHP 7.4 git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1)
# TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.0
command: | command: |
phpize \ sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \ && phpize \
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \
# 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' \
&& ./configure --enable-redis \ && ./configure --enable-redis \
&& make -j$(getconf _NPROCESSORS_ONLN) \ && make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \ && make install \
@@ -773,6 +837,12 @@ extensions_available:
5.5: 5.5:
type: pecl type: pecl
version: 3.0.5 version: 3.0.5
5.6:
type: pecl
version: 3.1.2
7.0:
type: pecl
version: 3.1.2
all: all:
type: pecl type: pecl
build_dep: [librdkafka-dev] build_dep: [librdkafka-dev]
@@ -792,6 +862,8 @@ extensions_available:
run_dep: [snmp] run_dep: [snmp]
soap: soap:
already_avail: [5.2] already_avail: [5.2]
7.4:
type: builtin
all: all:
type: builtin type: builtin
configure: --with-libxml-dir=/usr configure: --with-libxml-dir=/usr
@@ -805,6 +877,11 @@ extensions_available:
all: all:
type: builtin type: builtin
build_dep: [libsodium-dev] build_dep: [libsodium-dev]
solr:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.0]
all:
type: pecl
build_dep: [libxml2-dev, libcurl4-openssl-dev]
spl: spl:
already_avail: "{{ php_all_versions }}" already_avail: "{{ php_all_versions }}"
sqlsrv: sqlsrv:
@@ -818,6 +895,13 @@ extensions_available:
type: pecl type: pecl
build_dep: [unixodbc-dev] build_dep: [unixodbc-dev]
run_dep: [unixodbc] run_dep: [unixodbc]
ssh2:
disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0]
all:
type: pecl
version: 1.2
build_dep: [libssh2-1-dev]
run_dep: [libssh2-1]
swoole: swoole:
disabled: [5.2, 8.0] disabled: [5.2, 8.0]
5.3: 5.3:
@@ -835,40 +919,12 @@ extensions_available:
5.6: 5.6:
type: pecl type: pecl
version: 1.9.23 version: 1.9.23
7.3: 7.0:
type: git type: pecl
git_url: https://github.com/swoole/swoole-src version: 4.2.13
git_ref: $(git describe --abbrev=0 --tags)
command: |
phpize \
&& ./configure \
--enable-openssl \
--enable-sockets \
--enable-http2 \
--enable-mysqlnd \
--enable-coroutine-postgresql \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
run_dep: [libnghttp2-14, libhiredis0.13]
build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, libpq-dev, cmake]
7.4:
type: git
git_url: https://github.com/swoole/swoole-src
git_ref: master
command: |
phpize \
&& ./configure \
--enable-openssl \
--enable-sockets \
--enable-http2 \
--enable-mysqlnd \
--enable-coroutine-postgresql \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
run_dep: [libnghttp2-14, libhiredis0.13]
build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, libpq-dev, cmake]
all: all:
type: pecl type: pecl
command: yes yes | pecl install swoole
build_dep: [libnghttp2-dev, libssl-dev] build_dep: [libnghttp2-dev, libssl-dev]
run_dep: [libnghttp2-14] run_dep: [libnghttp2-14]
sysvmsg: sysvmsg:
@@ -893,14 +949,19 @@ extensions_available:
5.5: 5.5:
type: builtin type: builtin
run_dep: [libtidy-0.99-0] run_dep: [libtidy-0.99-0]
5.6:
type: builtin
run_dep: [libtidy5]
7.0:
type: builtin
run_dep: [libtidy5]
all: all:
type: builtin type: builtin
build_dep: [libtidy-dev] build_dep: [libtidy-dev]
run_dep: [libtidy5] run_dep: [libtidy5deb1]
tokenizer: tokenizer:
already_avail: "{{ php_all_versions }}" already_avail: "{{ php_all_versions }}"
uploadprogress: uploadprogress:
disabled: [8.0] #TODO: fixme
7.0: 7.0:
type: git type: git
git_url: https://github.com/php/pecl-php-uploadprogress git_url: https://github.com/php/pecl-php-uploadprogress
@@ -924,7 +985,17 @@ extensions_available:
8.0: 8.0:
type: git type: git
git_url: https://github.com/php/pecl-php-uploadprogress git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress command: |
true \
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' || true \
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' || true \
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' || true \
&& phpize \
&& ./configure --enable-uploadprogress \
&& make \
&& make install \
all: all:
type: pecl type: pecl
wddx: wddx:
@@ -935,7 +1006,7 @@ extensions_available:
configure: --with-libxml-dir=/usr configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev] build_dep: [libxml2-dev]
xdebug: xdebug:
disabled: [7.4, 8.0] disabled: [8.0]
5.2: 5.2:
type: pecl type: pecl
version: 2.2.7 version: 2.2.7
@@ -958,6 +1029,9 @@ extensions_available:
xmlreader: xmlreader:
already_avail: "{{ php_all_versions }}" already_avail: "{{ php_all_versions }}"
xmlrpc: xmlrpc:
7.4:
type: builtin
configure: --with-iconv-dir=/usr
all: all:
type: builtin type: builtin
configure: --with-libxml-dir=/usr --with-iconv-dir=/usr configure: --with-libxml-dir=/usr --with-iconv-dir=/usr
@@ -990,6 +1064,9 @@ extensions_available:
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev] build_dep: [zlib1g-dev]
run_dep: [] run_dep: []
7.4:
type: builtin
configure: --with-zip
all: all:
type: builtin type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip

View File

@@ -11,7 +11,7 @@
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# Global variables # Global variables
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
compose_home: /usr/local/src/composer composer_home: /usr/local/src/composer
nvm_home: /usr/local/src/nvm nvm_home: /usr/local/src/nvm
@@ -27,6 +27,17 @@ apt_repositories_enabled:
- yarn - yarn
# -------------------------------------------------------------------------------------------------
# PHP Composer packages to install
# -------------------------------------------------------------------------------------------------
composer_enabled:
- asgardcms
- codeception
- lumen
- photon
- prestissimo
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# Ruby gem packages to install # Ruby gem packages to install
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@@ -63,6 +74,7 @@ npm_enabled:
pip_enabled: pip_enabled:
- ansible - ansible
- yamllint - yamllint
- yq
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@@ -74,9 +86,7 @@ software_enabled:
- pip - pip
- nvm - nvm
# Normal packages start here # Normal packages start here
- asgardcms
- awesomeci - awesomeci
- codeception
- deployer - deployer
- drush7 - drush7
- drush8 - drush8
@@ -86,15 +96,14 @@ software_enabled:
- laravel - laravel
- linkcheck - linkcheck
- linuxbrew - linuxbrew
- lumen
- mhsendmail - mhsendmail
- mysqldumpsecure - mysqldumpsecure
- phalcon - phalcon
- phpcs - phpcs
- phpcbf - phpcbf
- php-cs-fixer - php-cs-fixer
- phpmd
- phpunit - phpunit
- photon
- symfony - symfony
- wkhtmltopdf - wkhtmltopdf
- wpcli - wpcli
@@ -182,29 +191,97 @@ apt_repositories_available:
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# Python pip definition # Composer (PHP) definition
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# name: Name of the Python pip package # name: Name of the PHP Composer package
# link: [optional] Name of the binary to symlink to /usr/local/bin
# all: is generic version of defines # all: is generic version of defines
# 7.2: is specific version of defines # 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module # disabled: [optional] Array of PHP versions for which to disable this module
# check: [optional] Include a check command to test if it was installed successfully # check: [optional] Include a check command to test if it was installed successfully
# #
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# version: [optional] Specific version of Python pip package # version: [optional] Specific version of Ruby gem
# #
pip_available: composer_available:
ansible: asgardcms:
name: ansible disabled: [5.2, 5.3, 5.4, 8.0]
check: ansible --version | grep -E '^ansible [.0-9]+$' check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+'
yamllint: name: asgardcms/asgardcms-installer
name: yamllint link: asgardcms
check: yamllint --version 2>&1 | grep -E '[.0-9]+' codeception:
disabled: [5.2, 8.0]
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'
name: codeception/codeception
link: codecept
lumen:
disabled: [5.2, 5.3, 5.4, 8.0]
check: lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$'
name: laravel/lumen-installer
link: lumen
photon:
disabled: [5.2, 5.3, 5.4, 8.0]
check: photon --version | grep -E 'Installer [.0-9]+'
name: photoncms/installer
link: photon
prestissimo:
disabled: [5.2, 8.0]
name: hirak/prestissimo
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# Node npm definition # Gems (Ruby) definition
# -------------------------------------------------------------------------------------------------
# name: Name of the Ruby gem package
# all: is generic version of defines
# 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module
# check: [optional] Include a check command to test if it was installed successfully
#
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# version: [optional] Specific version of Ruby gem
#
gem_available:
mixlib_config:
name: mixlib-config
all:
version: 2.2.4
rb_inotify:
name: rb-inotify
all:
version: 0.9.10
mdl:
name: mdl
check: mdl --version | grep -E '[.0-9]+'
8.0:
version: 0.5.0
7.4:
version: 0.5.0
7.0:
version: 0.5.0
5.6:
version: 0.5.0
5.5:
version: 0.5.0
5.4:
version: 0.5.0
5.3:
version: 0.5.0
5.2:
version: 0.5.0
scss_lint:
name: scss_lint
all:
version: 0.57.1
sass:
name: sass
check: sass --version | grep -E '[.0-9]+'
# -------------------------------------------------------------------------------------------------
# npm (Node) definition
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# name: Name of the Node npm package # name: Name of the Node npm package
@@ -253,35 +330,28 @@ npm_available:
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# Ruby Gems definition # pip (Python) definition
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
# name: Name of the Ruby gem package # name: Name of the Python pip package
# all: is generic version of defines # all: is generic version of defines
# 7.2: is specific version of defines # 7.2: is specific version of defines
# disabled: [optional] Array of PHP versions for which to disable this module # disabled: [optional] Array of PHP versions for which to disable this module
# check: [optional] Include a check command to test if it was installed successfully # check: [optional] Include a check command to test if it was installed successfully
# #
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# version: [optional] Specific version of Ruby gem # version: [optional] Specific version of Python pip package
# #
gem_available: pip_available:
mixlib_config: ansible:
name: mixlib-config name: ansible
all: check: ansible --version | grep -E '^ansible [.0-9]+$'
version: 2.2.4 yamllint:
rb_inotify: name: yamllint
name: rb-inotify check: yamllint --version 2>&1 | grep -E '[.0-9]+'
all: yq:
version: 0.9.10 name: yq
mdl: check: yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$'
name: mdl
check: mdl --version | grep -E '[.0-9]+'
scss_lint:
name: scss_lint
sass:
name: sass
check: sass --version | grep -E '[.0-9]+'
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@@ -296,7 +366,7 @@ gem_available:
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
# pre: [optional] Run command before 'command:' statement # pre: [optional] Run command before 'command:' statement
# command: Command to execute # command: Command to execute
# pre: [optional] Run command after 'command:' statement # post: [optional] Run command after 'command:' statement
# #
software_available: software_available:
# Composer is a dependency for others # Composer is a dependency for others
@@ -337,21 +407,8 @@ software_available:
su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \ 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 install --lts' devilbox \
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
asgardcms:
disabled: [5.2, 5.3, 5.4, 8.0]
check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require asgardcms/asgardcms-installer \
&& ln -s {{ compose_home }}/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
awesomeci: awesomeci:
check: | check: regex-grep --version | grep -E '[.0-9]+'
mdl --version | grep -E '[.0-9]+' \
&& scss-lint --version | grep -E '[.0-9]+' \
&& eslint -v | grep -E '[.0-9]+' \
&& jsonlint --version | grep -E '[.0-9]+' \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
all: all:
command: | command: |
git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
@@ -373,6 +430,12 @@ software_available:
5.6: 5.6:
command: curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep command: curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep post: chmod +x /usr/local/bin/dep
7.0:
command: curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep
7.1:
command: curl -sS https://deployer.org/releases/v6.7.0/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep
all: all:
command: curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep command: curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep
post: chmod +x /usr/local/bin/dep post: chmod +x /usr/local/bin/dep
@@ -424,15 +487,8 @@ software_available:
&& rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/docs \
&& rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/examples \
&& rm -rf /usr/local/src/drush9/misc \ && rm -rf /usr/local/src/drush9/misc \
codeception:
disabled: [5.2, 8.0]
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception \
&& ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
drupalconsole: drupalconsole:
disabled: [5.2, 5.3, 5.4] disabled: [5.2, 5.3, 5.4, 8.0] # TODO: re-enable for 8.0 (currently errors)
check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]'
all: all:
command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal
@@ -453,21 +509,36 @@ software_available:
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \ && git checkout v1.3.7 \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
5.5: 5.5:
pre: | pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
5.6: 5.6:
pre: | pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
7.0: 7.0:
pre: | pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \
&& git checkout v2.0.0 \ && git checkout v2.0.0 \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
7.1:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout $(git tag | grep '^v2\.3\.' | sort -u | tail -1) \
post:
ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel
all: all:
pre: | pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
@@ -476,8 +547,9 @@ software_available:
command: | command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \
post:
ln -s /usr/local/src/laravel-installer/bin/laravel /usr/local/bin/laravel
linkcheck: linkcheck:
check: linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' check: linkcheck --version | grep -E '^linkcheck\sv[.0-9]+'
all: all:
@@ -497,17 +569,10 @@ software_available:
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ && v="${BASH_PROFILE}" su ${MY_USER} -c -p \
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
lumen:
disabled: [5.2, 5.3, 5.4, 8.0]
check: lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require laravel/lumen-installer \
&& ln -s {{ compose_home }}/vendor/laravel/lumen-installer/lumen /usr/local/bin/lumen \
mhsendmail: mhsendmail:
all: all:
command: | command: |
wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ curl -sS -L https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \ && chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ && mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
mysqldumpsecure: mysqldumpsecure:
@@ -542,20 +607,82 @@ software_available:
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.7 \ && git checkout v2.0.7 \
command: |
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 \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
5.4: 5.4:
pre: | pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout v2.0.9 \ && git checkout v2.0.9 \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
5.5:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v3.4.11 \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
5.6:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v3.4.11 \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
7.0:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v3.4.11 \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
7.1:
pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \
&& git checkout v3.4.11 \
command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \
&& chmod +x /usr/local/bin/phalcon \
&& cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \
all: all:
pre: | pre: |
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
&& cd /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \
&& git checkout $(git describe --abbrev=0 --tags) \ && git checkout $(git describe --abbrev=0 --tags) \
&& composer install \
command: | command: |
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \
&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \
&& 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 / \ && cd / \
&& rm -rf /usr/local/src/phalcon-devtools/.git \ && rm -rf /usr/local/src/phalcon-devtools/.git \
phpcs: phpcs:
@@ -605,6 +732,14 @@ software_available:
command: | command: |
curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ 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 \ && chmod +x /usr/local/bin/php-cs-fixer \
phpmd:
disabled: [5.2]
check: phpmd --version | grep -E '^PHPMD [.0-9]+'
all:
command: |
curl -sS -L https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \
&& mv phpmd.phar /usr/local/bin/phpmd \
&& chmod +x /usr/local/bin/phpmd \
phpunit: phpunit:
disabled: [5.2, 8.0] disabled: [5.2, 8.0]
check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+'
@@ -632,13 +767,6 @@ software_available:
command: | command: |
curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
&& chmod +x /usr/local/bin/phpunit \ && chmod +x /usr/local/bin/phpunit \
photon:
disabled: [5.2, 5.3, 5.4, 8.0]
check: photon --version | grep -E 'Installer [.0-9]+'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \
&& ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \
symfony: symfony:
disabled: [5.2, 5.3] disabled: [5.2, 5.3]
check: symfony --version | grep -E 'version\s*[.0-9]+' check: symfony --version | grep -E 'version\s*[.0-9]+'
@@ -655,6 +783,46 @@ software_available:
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
5.5: 5.5:
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
7.1:
command: |
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
7.2:
command: |
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
7.3:
command: |
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
7.4:
command: |
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
8.0:
command: |
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
&& dpkg -i /tmp/wkhtmltopdf.deb \
&& rm -f /tmp/wkhtmltopdf.deb \
all: all:
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )"
command: | command: |

View File

@@ -35,14 +35,14 @@ get_modules() {
tag="${1}" tag="${1}"
# Retrieve all modules # Retrieve all modules
PHP_MODULES="$( docker run -it --entrypoint=php devilbox/php-fpm:${tag} -m )" PHP_MODULES="$( docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=php devilbox/php-fpm:${tag} -m )"
ALL_MODULES= ALL_MODULES=
if docker run -it --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then
ALL_MODULES="${ALL_MODULES},ioncube"; ALL_MODULES="${ALL_MODULES},ioncube";
fi fi
if docker run -it --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then
ALL_MODULES="${ALL_MODULES},blackfire"; ALL_MODULES="${ALL_MODULES},blackfire";
fi fi

View File

@@ -28,7 +28,7 @@ function run() {
printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2 printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2
fi fi
if sh -c "LANG=C LC_ALL=C ${cmd}"; then if sh -c "${cmd}"; then
if [ "${to_stderr}" -eq "0" ]; then if [ "${to_stderr}" -eq "0" ]; then
printf "${green}[%s]${reset}\n" "OK" printf "${green}[%s]${reset}\n" "OK"
else else
@@ -67,7 +67,7 @@ function run_fail() {
printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2 printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2
fi fi
if ! sh -c "LANG=C LC_ALL=C ${cmd}"; then if ! sh -c "${cmd}"; then
if [ "${to_stderr}" -eq "0" ]; then if [ "${to_stderr}" -eq "0" ]; then
printf "${green}[%s]${reset}\n" "OK" printf "${green}[%s]${reset}\n" "OK"
else else
@@ -112,12 +112,12 @@ function docker_run() {
local args="${*}" local args="${*}"
# Returns docker-id # Returns docker-id
did="$( run "docker run -d --name $( get_random_name ) ${args} ${image_name}" "1" )" did="$( run "docker run --rm -d --name $( get_random_name ) ${args} ${image_name}" "1" )"
sleep 4 sleep 10
# If it fails, start again in foreground to fail again, but show errors # If it fails, start again in foreground to fail again, but show errors
if ! docker exec -it ${did} ls >/dev/null 2>&1; then if ! docker exec $(tty -s && echo "-it" || echo ) ${did} ls >/dev/null 2>&1; then
run "docker run --name $( get_random_name ) ${args} ${image_name}" "1" run "docker run --rm --name $( get_random_name ) ${args} ${image_name}" "1"
return 1 return 1
fi fi
@@ -146,7 +146,7 @@ function docker_exec() {
shift shift
local args="${*}" local args="${*}"
run "docker exec ${args} -it ${did} ${cmd}" run "docker exec ${args} $(tty -s && echo '-it' || echo) ${did} ${cmd}"
} }

29
tests/mods/01-test-modules.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
IMAGE="${1}"
VERSION="${2}"
FLAVOUR="${3}"
# shellcheck disable=SC1090
. "${CWD}/../.lib.sh"
# -------------------------------------------------------------------------------------------------
# Testing
# -------------------------------------------------------------------------------------------------
ERROR=0
for dir in $( ls -1 "${CWD}/modules/" ); do
if ! "${CWD}/modules.sh" "${IMAGE}" "${VERSION}" "${FLAVOUR}" "${dir}"; then
ERROR="$(( ERROR + 1 ))"
fi
done
exit "${ERROR}"

80
tests/mods/modules.sh Executable file
View File

@@ -0,0 +1,80 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
if [ "${#}" != "4" ]; then
>&2 echo "Error, requires 4 arguments: <IMAGE> <VERSION> <FLAVOUR> <MODULE>"
exit 1
fi
IMAGE="${1}"
VERSION="${2}"
FLAVOUR="${3}"
MODULE="${4}"
# shellcheck disable=SC1090
. "${CWD}/../.lib.sh"
SKIP_GD=("")
echo
echo "# ------------------------------------------------------------"
echo "# Testing: ${MODULE}"
echo "# ------------------------------------------------------------"
echo
# -------------------------------------------------------------------------------------------------
# Check skipping
# -------------------------------------------------------------------------------------------------
if [[ ${SKIP_GD[*]} =~ ${VERSION} ]]; then
echo "Skipping '${MODULE}' checks for PHP ${VERSION}"
exit 0
fi
# -------------------------------------------------------------------------------------------------
# Testing
# -------------------------------------------------------------------------------------------------
WORKDIR="/tmp/${MODULE}"
docker run \
--rm \
-e DEBUG_ENTRYPOINT=0 \
-e NEW_UID="$(id -u)" \
-e NEW_GID="$(id -g)" \
-v "${CWD}/modules/${MODULE}:${WORKDIR}" \
--entrypoint=sh \
--workdir="${WORKDIR}" \
"${IMAGE}:${VERSION}-${FLAVOUR}" \
-c 'find . -name "*.php" -type f -print0 | xargs -0 -n1 sh -c "
set -e
set -u
if [ -f \"\${1:-}\" ]; then
fail=0
printf \"[TEST] %s\" \"\${1}\"
if script -e -c \"php \${1}\" /dev/null 2>&1 | grep -Ei \"core|segmentation|fatal|except|err|warn|notice\" 2>&1 >/dev/null; then
fail=1
fi
if ! php \"\${1}\" 2>&1 | grep -E \"^(OK|SKIP)$\" 2>&1 >/dev/null; then
fail=1
fi
if [ \"\${fail}\" != \"0\" ]; then
printf \"\\r[FAIL] %s\\n\" \"\${1}\"
php \"\${1}\" || true
exit 1
else
printf \"\\r[OK] %s\\n\" \"\${1}\"
fi
fi
" --'

View File

@@ -0,0 +1,26 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$a = '1.234';
$b = '5';
$num1 = bcadd($a, $b); // 6
$num2 = bcadd($a, $b, 4); // 6.2340
if ($num1 != 6) {
echo 'FAIL: ' . $num1;
exit(1);
}
if ($num2 != 6.2340) {
echo 'FAIL: ' . $num2;
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,30 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$backend = 'aspell';
$tag = 'en_US';
if (($r = enchant_broker_init()) === FALSE) {
echo 'FAIL: enchant_broker_init()';
exit(1);
}
if (($bprovides = enchant_broker_describe($r)) === FALSE) {
echo 'FAIL: enchant_broker_describe()';
exit(1);
}
foreach ($bprovides as $be) {
if ($be['name'] == $backend) {
echo 'OK';
exit(0);
}
}
echo 'FAIL: "'. $backend . '" not available';
exit(1);

View File

@@ -0,0 +1,30 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$backend = 'hspell';
$tag = 'en_US';
if (($r = enchant_broker_init()) === FALSE) {
echo 'FAIL: enchant_broker_init()';
exit(1);
}
if (($bprovides = enchant_broker_describe($r)) === FALSE) {
echo 'FAIL: enchant_broker_describe()';
exit(1);
}
foreach ($bprovides as $be) {
if ($be['name'] == $backend) {
echo 'OK';
exit(0);
}
}
echo 'FAIL: "'. $backend . '" not available';
exit(1);

View File

@@ -0,0 +1,30 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$backend = 'ispell';
$tag = 'en_US';
if (($r = enchant_broker_init()) === FALSE) {
echo 'FAIL: enchant_broker_init()';
exit(1);
}
if (($bprovides = enchant_broker_describe($r)) === FALSE) {
echo 'FAIL: enchant_broker_describe()';
exit(1);
}
foreach ($bprovides as $be) {
if ($be['name'] == $backend) {
echo 'OK';
exit(0);
}
}
echo 'FAIL: "'. $backend . '" not available';
exit(1);

View File

@@ -0,0 +1,30 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$backend = 'myspell';
$tag = 'en_US';
if (($r = enchant_broker_init()) === FALSE) {
echo 'FAIL: enchant_broker_init()';
exit(1);
}
if (($bprovides = enchant_broker_describe($r)) === FALSE) {
echo 'FAIL: enchant_broker_describe()';
exit(1);
}
foreach ($bprovides as $be) {
if ($be['name'] == $backend) {
echo 'OK';
exit(0);
}
}
echo 'FAIL: "'. $backend . '" not available';
exit(1);

View File

@@ -0,0 +1,20 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$arr = gd_info();
if (!isset($arr['FreeType Support'])) {
echo 'FAIL: FreeType Support array key does not exist.';
exit(1);
}
if ($arr['FreeType Support'] !== TRUE) {
echo 'FAIL: No FreeType support.';
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,67 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Create a blank image and add some text
if ( ($im = imagecreatetruecolor(640, 480)) === FALSE ) {
echo 'FAIL: imagecreatetruecolor()';
exit(1);
}
// First we create our stamp image manually from GD
if ( ($stamp = imagecreatetruecolor(100, 70)) === FALSE ) {
echo 'FAIL: imagecreatetruecolor()';
exit(1);
}
if (!imagefilledrectangle($stamp, 0, 0, 99, 69, 0x0000FF)) {
echo 'FAIL: imagefilledrectangle()';
exit(1);
}
if (!imagefilledrectangle($stamp, 9, 9, 90, 60, 0xFFFFFF)) {
echo 'FAIL: imagefilledrectangle()';
exit(1);
}
if (!imagestring($stamp, 5, 20, 20, 'libGD', 0x0000FF)) {
echo 'FAIL: imagestring()';
exit(1);
}
if (!imagestring($stamp, 3, 20, 40, '(c) 2007-9', 0x0000FF)) {
echo 'FAIL: imagestring()';
exit(1);
}
// Set the margins for the stamp and get the height/width of the stamp image
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
// Merge the stamp onto our photo with an opacity of 50%
if (!imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 50)) {
echo 'FAIL: imagecopymerge()';
exit(1);
}
// Save the image to file and free memory
if (!imagejpeg($im, 'image.jpg')) {
echo 'FAIL: imagejpeg()';
exit(1);
}
if (!imagedestroy($im)) {
echo 'FAIL: imagedestroy()';
unlink('image.jpg');
exit(1);
}
// Remove image after test
unlink('image.jpg');
echo 'OK';

View File

@@ -0,0 +1,67 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Create a blank image and add some text
if ( ($im = imagecreatetruecolor(640, 480)) === FALSE ) {
echo 'FAIL: imagecreatetruecolor()';
exit(1);
}
// First we create our stamp image manually from GD
if ( ($stamp = imagecreatetruecolor(100, 70)) === FALSE ) {
echo 'FAIL: imagecreatetruecolor()';
exit(1);
}
if (!imagefilledrectangle($stamp, 0, 0, 99, 69, 0x0000FF)) {
echo 'FAIL: imagefilledrectangle()';
exit(1);
}
if (!imagefilledrectangle($stamp, 9, 9, 90, 60, 0xFFFFFF)) {
echo 'FAIL: imagefilledrectangle()';
exit(1);
}
if (!imagestring($stamp, 5, 20, 20, 'libGD', 0x0000FF)) {
echo 'FAIL: imagestring()';
exit(1);
}
if (!imagestring($stamp, 3, 20, 40, '(c) 2007-9', 0x0000FF)) {
echo 'FAIL: imagestring()';
exit(1);
}
// Set the margins for the stamp and get the height/width of the stamp image
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
// Merge the stamp onto our photo with an opacity of 50%
if (!imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 50)) {
echo 'FAIL: imagecopymerge()';
exit(1);
}
// Save the image to file and free memory
if (!imagepng($im, 'image.png')) {
echo 'FAIL: imagepng()';
exit(1);
}
if (!imagedestroy($im)) {
echo 'FAIL: imagedestroy()';
unlink('image.png');
exit(1);
}
// Remove image after test
unlink('image.png');
echo 'OK';

View File

@@ -0,0 +1,50 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Only available since 5.4.0
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
echo 'SKIP';
exit(0);
}
// Create a blank image and add some text
if ( ($im = imagecreatetruecolor(120, 20)) === FALSE ) {
echo 'FAIL: imagecreatetruecolor()';
exit(1);
}
if ( ($text_color = imagecolorallocate($im, 233, 14, 91)) === FALSE ) {
echo 'FAIL: imagecolorallocate()';
exit(1);
}
if (!imagestring($im, 1, 5, 5, 'WebP with PHP', $text_color)) {
echo 'FAIL: imagestring()';
exit(1);
}
// Save the image
if (!imagewebp($im, 'image.webp')) {
echo 'FAIL: imagewebp()';
exit(1);
}
// Free up memory
if (!imagedestroy($im)) {
echo 'FAIL: imagedestroy()';
unlink('image.webp');
exit(1);
}
// Remove image after test
unlink('image.webp');
echo 'OK';

View File

@@ -0,0 +1,16 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Check for XPM support
// https://www.php.net/manual/en/function.imagetypes.php
if (!(imagetypes() & IMG_XPM)) {
echo 'FAIL: No XMP support';
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,52 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults)
if (version_compare($PHP_VERSION, '5.6.0', '<')) {
echo 'SKIP';
exit(0);
}
// FIXME: Currently not supported on PHP 8
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
echo 'SKIP';
exit(0);
}
/* Set width and height in proportion of genuine PHP logo */
$width = 400;
$height = 210;
/* Create an Imagick object with transparent canvas */
$img = new Imagick();
if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) {
echo 'FAIL: newImage()';
exit(1);
}
/* New ImagickDraw instance for ellipse draw */
$draw = new ImagickDraw();
/* Set purple fill color for ellipse */
$draw->setFillColor('#777bb4');
/* Set ellipse dimensions */
$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360);
/* Draw ellipse onto the canvas */
$img->drawImage($draw);
/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */
$draw->setFillColor('black');
if ($img->setImageFormat('jpeg') !== TRUE) {
echo 'FAIL: setImageFormat()';
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,52 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Only available since 5.3.0 (PHP 5.3, 5.4 and 5.5 segfaults)
if (version_compare($PHP_VERSION, '5.6.0', '<')) {
echo 'SKIP';
exit(0);
}
// FIXME: Currently not supported on PHP 8
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
echo 'SKIP';
exit(0);
}
/* Set width and height in proportion of genuine PHP logo */
$width = 400;
$height = 210;
/* Create an Imagick object with transparent canvas */
$img = new Imagick();
if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) {
echo 'FAIL: newImage()';
exit(1);
}
/* New ImagickDraw instance for ellipse draw */
$draw = new ImagickDraw();
/* Set purple fill color for ellipse */
$draw->setFillColor('#777bb4');
/* Set ellipse dimensions */
$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360);
/* Draw ellipse onto the canvas */
$img->drawImage($draw);
/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */
$draw->setFillColor('black');
if ($img->setImageFormat('png') !== TRUE) {
echo 'FAIL: setImageFormat()';
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,60 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$PHP_VERSION = str_replace('-dev', '', PHP_VERSION);
// Web support only since 7.2+
if (version_compare($PHP_VERSION, '7.1.0', '<=')) {
echo 'SKIP';
exit(0);
}
// FIXME: Currently not supported on PHP 8
if (version_compare($PHP_VERSION, '8.0.0', '>=')) {
echo 'SKIP';
exit(0);
}
/* Set width and height in proportion of genuine PHP logo */
$width = 400;
$height = 210;
/* Create an Imagick object with transparent canvas */
$img = new Imagick();
if ($img->newImage($width, $height, new ImagickPixel('transparent')) !== TRUE) {
echo 'FAIL: newImage()';
exit(1);
}
/* New ImagickDraw instance for ellipse draw */
$draw = new ImagickDraw();
/* Set purple fill color for ellipse */
$draw->setFillColor('#777bb4');
/* Set ellipse dimensions */
$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360);
/* Draw ellipse onto the canvas */
$img->drawImage($draw);
/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */
$draw->setFillColor('black');
if ($img->setImageFormat('webp') !== TRUE) {
echo 'FAIL: setImageFormat()';
exit(1);
}
if ($img->setImageAlphaChannel(imagick::ALPHACHANNEL_ACTIVATE) !== TRUE) {
echo 'FAIL: setImageAlphaChannel()';
exit(1);
}
if ($img->setBackgroundColor(new ImagickPixel('transparent')) !== TRUE) {
echo 'FAIL: setBackgroundColor()';
exit(1);
}
echo 'OK';

View File

@@ -23,7 +23,7 @@ FLAVOUR="${3}"
### Postfix ### Postfix
### ###
MOUNTPOINT="$( mktemp --directory )" MOUNTPOINT="$( mktemp --directory )"
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e ENABLE_MAIL=1 -v ${MOUNTPOINT}:/var/mail" )" did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e ENABLE_MAIL=2 -v ${MOUNTPOINT}:/var/mail" )"
run "sleep 10" run "sleep 10"
if ! run "docker logs ${did} 2>&1 | grep -q 'ENABLE_MAIL'"; then if ! run "docker logs ${did} 2>&1 | grep -q 'ENABLE_MAIL'"; then
@@ -36,7 +36,7 @@ fi
if [ ! -f "${MOUNTPOINT}/devilbox" ]; then if [ ! -f "${MOUNTPOINT}/devilbox" ]; then
echo "Mail file does not exist: ${MOUNTPOINT}/devilbox" echo "Mail file does not exist: ${MOUNTPOINT}/devilbox"
ls -lap ${MOUNTPOINT}/ ls -lap "${MOUNTPOINT}/"
docker_logs "${did}" || true docker_logs "${did}" || true
docker_stop "${did}" || true docker_stop "${did}" || true
rm -rf "${MOUNTPOINT}" rm -rf "${MOUNTPOINT}"
@@ -45,7 +45,7 @@ if [ ! -f "${MOUNTPOINT}/devilbox" ]; then
fi fi
if [ ! -r "${MOUNTPOINT}/devilbox" ]; then if [ ! -r "${MOUNTPOINT}/devilbox" ]; then
echo "Mail file is not readable" echo "Mail file is not readable"
ls -lap ${MOUNTPOINT}/ ls -lap "${MOUNTPOINT}/"
docker_logs "${did}" || true docker_logs "${did}" || true
docker_stop "${did}" || true docker_stop "${did}" || true
rm -rf "${MOUNTPOINT}" rm -rf "${MOUNTPOINT}"