mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-11 19:41:16 +00:00
Compare commits
179 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f59dd5bf6c | ||
|
|
bc01b396a1 | ||
|
|
dd78ed0b71 | ||
|
|
ec7e1cb622 | ||
|
|
91741aaf7f | ||
|
|
87234a6f46 | ||
|
|
a6236b19c7 | ||
|
|
67017e494e | ||
|
|
31864f8335 | ||
|
|
7585081644 | ||
|
|
3e8b4856d1 | ||
|
|
46d1c48104 | ||
|
|
47d2d1f9f5 | ||
|
|
019c3b82d8 | ||
|
|
1817f84301 | ||
|
|
3fd1652455 | ||
|
|
e75b7cb54c | ||
|
|
d68b8dcff0 | ||
|
|
5bd9466995 | ||
|
|
2b53dcab7a | ||
|
|
d286467a6f | ||
|
|
d87857e598 | ||
|
|
a9c8d4fbbe | ||
|
|
be4492795b | ||
|
|
5a10077fe2 | ||
|
|
3075f2afca | ||
|
|
36355c3d60 | ||
|
|
80f8557962 | ||
|
|
3883103a41 | ||
|
|
687a660baa | ||
|
|
6f8f5cc1ea | ||
|
|
f602092471 | ||
|
|
bcbc8e2e45 | ||
|
|
4b21c70b8f | ||
|
|
b943b30b01 | ||
|
|
2df2b8c7eb | ||
|
|
2ab9995e99 | ||
|
|
1e9cb5bcb9 | ||
|
|
bdb61b9c00 | ||
|
|
47e221e210 | ||
|
|
173fd463d3 | ||
|
|
e4dd462ef2 | ||
|
|
4b40a0d932 | ||
|
|
1126319f3d | ||
|
|
56a5cfeb5e | ||
|
|
391502b9eb | ||
|
|
b1c8c8b107 | ||
|
|
81bdfb1026 | ||
|
|
f69a96e16f | ||
|
|
e3ddad4e50 | ||
|
|
dfc3481773 | ||
|
|
6baf6ace61 | ||
|
|
92aed9e7a8 | ||
|
|
e3e0d760e9 | ||
|
|
8b0fdc6cca | ||
|
|
554e979d0e | ||
|
|
ceabd15ee0 | ||
|
|
0e813e6070 | ||
|
|
04ad135df5 | ||
|
|
481d095b39 | ||
|
|
8e907edbdb | ||
|
|
36d9af44e9 | ||
|
|
09b60b78fb | ||
|
|
c57c1eab02 | ||
|
|
ff7b52a025 | ||
|
|
244605f9b5 | ||
|
|
926df09109 | ||
|
|
e10de3dc35 | ||
|
|
812eba69bc | ||
|
|
d1a541c298 | ||
|
|
362ed7b3c5 | ||
|
|
f1211dc7eb | ||
|
|
cf49904400 | ||
|
|
711e52e46c | ||
|
|
3faa0a8245 | ||
|
|
8482667c00 | ||
|
|
409cd5afc9 | ||
|
|
599fd786d7 | ||
|
|
90ecbd62a3 | ||
|
|
1201ee4135 | ||
|
|
a128aa33c0 | ||
|
|
847ea4e6a1 | ||
|
|
1be3fa70f2 | ||
|
|
eefda31e3e | ||
|
|
b1d4c97db4 | ||
|
|
6cd2ef4a1b | ||
|
|
622af7851a | ||
|
|
b2c1b8e453 | ||
|
|
4a1efb6b74 | ||
|
|
e843265575 | ||
|
|
ff0b86c37c | ||
|
|
166eff3347 | ||
|
|
d309c38a41 | ||
|
|
9fedd002e8 | ||
|
|
61352d2451 | ||
|
|
628720af0e | ||
|
|
af427a7e0a | ||
|
|
5b72766680 | ||
|
|
ec82710b48 | ||
|
|
8f53730254 | ||
|
|
cb9826eff5 | ||
|
|
452269c1b0 | ||
|
|
3926ee7c7d | ||
|
|
f376fd6766 | ||
|
|
6e0db69047 | ||
|
|
a645486c84 | ||
|
|
f0bc16ef5f | ||
|
|
bd3585596f | ||
|
|
54a8258bbc | ||
|
|
33bb1f5213 | ||
|
|
16e65379d9 | ||
|
|
333297f8d7 | ||
|
|
ab68fd47a2 | ||
|
|
820c08490a | ||
|
|
ee6917b3ef | ||
|
|
67d056811c | ||
|
|
1728629048 | ||
|
|
dfaef4bd2c | ||
|
|
0aa767e8c9 | ||
|
|
651ef659b6 | ||
|
|
e55469f7c1 | ||
|
|
85991d2e3f | ||
|
|
70764c268c | ||
|
|
023ad2af60 | ||
|
|
4f1a054f8c | ||
|
|
3f08a762f5 | ||
|
|
689703a9b9 | ||
|
|
2f953cd062 | ||
|
|
4fa6afe4e3 | ||
|
|
66a5ce778a | ||
|
|
adc5f28c4d | ||
|
|
1a5600ff86 | ||
|
|
a4bcf2b091 | ||
|
|
152a92386e | ||
|
|
66fa1c195e | ||
|
|
87bc0aa085 | ||
|
|
faff334e14 | ||
|
|
bbe3785091 | ||
|
|
3378d7a10b | ||
|
|
11ef4c6f3f | ||
|
|
f90a3532fc | ||
|
|
59ecc5dc11 | ||
|
|
a2d43259a4 | ||
|
|
2947a465f8 | ||
|
|
9f280dd5b1 | ||
|
|
68f11781f1 | ||
|
|
8d2eee37f1 | ||
|
|
3a29a77925 | ||
|
|
79b9ed1308 | ||
|
|
dc20fbea6e | ||
|
|
77716db302 | ||
|
|
62cc38d4af | ||
|
|
68615b22be | ||
|
|
1740392d3c | ||
|
|
427cc3fff6 | ||
|
|
4d925540b7 | ||
|
|
be439edfb3 | ||
|
|
867c1121c9 | ||
|
|
db397e5ef5 | ||
|
|
4569855e6e | ||
|
|
dfe0f8c4b2 | ||
|
|
ab4f0e01fe | ||
|
|
6371378d03 | ||
|
|
594762b697 | ||
|
|
24ec18d051 | ||
|
|
f8903bcb04 | ||
|
|
e33231be79 | ||
|
|
6cbf1da423 | ||
|
|
9c7c504f88 | ||
|
|
ed13130025 | ||
|
|
e816c9a376 | ||
|
|
f5af07cede | ||
|
|
cb29e8da6a | ||
|
|
61224dfb12 | ||
|
|
b257ffb972 | ||
|
|
10e114fdd2 | ||
|
|
6fb6a2f61c | ||
|
|
a9fc2a95a1 | ||
|
|
dc2daccaaa |
250
.github/workflows/images.yml
vendored
Normal file
250
.github/workflows/images.yml
vendored
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Job Name
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
name: PHP
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# When to run
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
on:
|
||||||
|
# Runs on Pull Requests
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
# Runs on master Branch and Tags
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '[0-9]+.[0-9]+*'
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
- name: Show GitHub variables
|
||||||
|
run: |
|
||||||
|
echo "github.actor: ${{ github.actor }}"
|
||||||
|
echo "github.ref: ${{ github.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 }}"
|
||||||
|
|
||||||
|
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:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Base
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
- name: Build Base
|
||||||
|
run: |
|
||||||
|
retry() {
|
||||||
|
for ((n=0; n<${RETRIES}; n++)); do
|
||||||
|
echo "[${n}] ${*}";
|
||||||
|
if eval "${*}"; then
|
||||||
|
return 0;
|
||||||
|
fi;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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;
|
||||||
|
done;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
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: |
|
||||||
|
echo "Todo: Push to Dockerhub"
|
||||||
|
if: (github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id || github.ref == 'refs/heads/master')
|
||||||
27
.github/workflows/linting.yml
vendored
Normal file
27
.github/workflows/linting.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
###
|
||||||
|
### Lints all generic and json files in the whole git repository
|
||||||
|
###
|
||||||
|
|
||||||
|
name: linting
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: "[ ${{ matrix.job }} ]"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: False
|
||||||
|
matrix:
|
||||||
|
job: [gen-dockerfiles]
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Diff generated Docker files
|
||||||
|
run: |
|
||||||
|
make "${JOB}"
|
||||||
|
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||||
|
env:
|
||||||
|
JOB: ${{ matrix.job }}
|
||||||
77
.travis.yml
77
.travis.yml
@@ -4,7 +4,7 @@
|
|||||||
### Travis settings
|
### Travis settings
|
||||||
###
|
###
|
||||||
sudo: required
|
sudo: required
|
||||||
language: python
|
language: minimal
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
@@ -32,15 +32,14 @@ env:
|
|||||||
- PHP=7.1
|
- PHP=7.1
|
||||||
- PHP=7.2
|
- PHP=7.2
|
||||||
- PHP=7.3
|
- PHP=7.3
|
||||||
|
- PHP=7.4
|
||||||
|
- PHP=8.0
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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
|
||||||
@@ -62,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; }
|
||||||
|
|
||||||
|
|
||||||
@@ -97,28 +105,43 @@ script:
|
|||||||
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin &&
|
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin &&
|
||||||
if [ "${TRAVIS_BRANCH}" == "master" ]; then
|
if [ "${TRAVIS_BRANCH}" == "master" ]; then
|
||||||
docker push "${IMAGE}:${PHP}-base";
|
echo "Pushing latest";
|
||||||
docker push "${IMAGE}:${PHP}-mods";
|
until docker push "${IMAGE}:${PHP}-base"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-prod";
|
until docker push "${IMAGE}:${PHP}-mods"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-work";
|
until docker push "${IMAGE}:${PHP}-prod"; do sleep 1; done;
|
||||||
|
until docker push "${IMAGE}:${PHP}-work"; do sleep 1; done;
|
||||||
elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then
|
elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then
|
||||||
|
echo "Pushing branch ${TRAVIS_BRANCH}";
|
||||||
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}" &&
|
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}" &&
|
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}" &&
|
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}" &&
|
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}" &&
|
||||||
docker push "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}";
|
until docker push "${IMAGE}:${PHP}-base-${TRAVIS_BRANCH}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}";
|
until docker push "${IMAGE}:${PHP}-mods-${TRAVIS_BRANCH}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}";
|
until docker push "${IMAGE}:${PHP}-prod-${TRAVIS_BRANCH}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}";
|
until docker push "${IMAGE}:${PHP}-work-${TRAVIS_BRANCH}"; do sleep 1; done;
|
||||||
elif [ -n "${TRAVIS_TAG}" ]; then
|
elif [ -n "${TRAVIS_TAG}" ]; then
|
||||||
|
echo "Pushing tag ${TRAVIS_TAG}";
|
||||||
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_TAG}" &&
|
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${TRAVIS_TAG}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}" &&
|
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}" &&
|
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}" &&
|
||||||
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_TAG}" &&
|
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${TRAVIS_TAG}" &&
|
||||||
docker push "${IMAGE}:${PHP}-base-${TRAVIS_TAG}";
|
until docker push "${IMAGE}:${PHP}-base-${TRAVIS_TAG}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}";
|
until docker push "${IMAGE}:${PHP}-mods-${TRAVIS_TAG}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}";
|
until docker push "${IMAGE}:${PHP}-prod-${TRAVIS_TAG}"; do sleep 1; done;
|
||||||
docker push "${IMAGE}:${PHP}-work-${TRAVIS_TAG}";
|
until docker push "${IMAGE}:${PHP}-work-${TRAVIS_TAG}"; do sleep 1; done;
|
||||||
|
elif [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then
|
||||||
|
if MY_TAG="$( git describe --exact-match "$(git rev-parse HEAD)" 2>/dev/null )"; then
|
||||||
|
echo "Pushing cron tag ${MY_TAG}";
|
||||||
|
docker tag "${IMAGE}:${PHP}-base" "${IMAGE}:${PHP}-base-${MY_TAG}" &&
|
||||||
|
docker tag "${IMAGE}:${PHP}-mods" "${IMAGE}:${PHP}-mods-${MY_TAG}" &&
|
||||||
|
docker tag "${IMAGE}:${PHP}-prod" "${IMAGE}:${PHP}-prod-${MY_TAG}" &&
|
||||||
|
docker tag "${IMAGE}:${PHP}-work" "${IMAGE}:${PHP}-work-${MY_TAG}" &&
|
||||||
|
until docker push "${IMAGE}:${PHP}-base-${MY_TAG}"; do sleep 1; done;
|
||||||
|
until docker push "${IMAGE}:${PHP}-mods-${MY_TAG}"; do sleep 1; done;
|
||||||
|
until docker push "${IMAGE}:${PHP}-prod-${MY_TAG}"; do sleep 1; done;
|
||||||
|
until docker push "${IMAGE}:${PHP}-work-${MY_TAG}"; do sleep 1; done;
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Skipping push to dockerhub on normal branches";
|
echo "Skipping push to dockerhub on normal branches";
|
||||||
fi
|
fi
|
||||||
|
|||||||
14
.yamllint
Normal file
14
.yamllint
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
# Use 'default' rules
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
# Overwrite above default rules
|
||||||
|
rules:
|
||||||
|
colons:
|
||||||
|
max-spaces-before: 0
|
||||||
|
max-spaces-after: 60
|
||||||
|
comments:
|
||||||
|
require-starting-space: false
|
||||||
|
min-spaces-from-content: 1
|
||||||
|
line-length: disable
|
||||||
|
truthy: disable
|
||||||
@@ -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,17 +43,23 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& rm -f /etc/apt/sources.list \
|
||||||
&& apt-get upgrade -y \
|
&& { \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||||
|
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||||
|
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||||
|
} | tee /etc/apt/sources.list
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +81,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,23 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& rm -f /etc/apt/sources.list \
|
||||||
&& apt-get upgrade -y \
|
&& { \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||||
|
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||||
|
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||||
|
} | tee /etc/apt/sources.list
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +81,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,23 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& rm -f /etc/apt/sources.list \
|
||||||
&& apt-get upgrade -y \
|
&& { \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||||
|
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||||
|
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||||
|
} | tee /etc/apt/sources.list
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +81,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,23 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& rm -f /etc/apt/sources.list \
|
||||||
&& apt-get upgrade -y \
|
&& { \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||||
|
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||||
|
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||||
|
} | tee /etc/apt/sources.list
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +81,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,16 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get upgrade -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +74,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,16 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get upgrade -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +74,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,16 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get upgrade -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +74,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,17 +43,16 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get upgrade -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +74,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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.3
|
FROM php:7.3-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.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,17 +43,16 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get upgrade -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -67,11 +74,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|||||||
103
Dockerfiles/base/Dockerfile-7.4
Normal file
103
Dockerfiles/base/Dockerfile-7.4
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||||
|
FROM devilbox/php-fpm-7.4
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="7.4-base"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-base"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-base"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Envs
|
||||||
|
###
|
||||||
|
ENV MY_USER="devilbox" \
|
||||||
|
MY_GROUP="devilbox" \
|
||||||
|
MY_UID="1000" \
|
||||||
|
MY_GID="1000" \
|
||||||
|
PHP_VERSION="7.4"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### User/Group
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||||
|
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Upgrade (install ps)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Configure
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||||
|
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||||
|
&& mkdir -p /var/lib/php/session \
|
||||||
|
&& mkdir -p /var/lib/php/wsdlcache \
|
||||||
|
&& chown -R devilbox:devilbox /var/lib/php/session \
|
||||||
|
&& chown -R devilbox:devilbox /var/lib/php/wsdlcache
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/php-ini.d/php-7.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||||
|
COPY ./data/php-fpm.conf/php-fpm-7.4.conf /usr/local/etc/php-fpm.conf
|
||||||
|
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
103
Dockerfiles/base/Dockerfile-8.0
Normal file
103
Dockerfiles/base/Dockerfile-8.0
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
|
||||||
|
FROM devilbox/php-fpm-8.0
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="8.0-base"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-base"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-base"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Envs
|
||||||
|
###
|
||||||
|
ENV MY_USER="devilbox" \
|
||||||
|
MY_GROUP="devilbox" \
|
||||||
|
MY_UID="1000" \
|
||||||
|
MY_GID="1000" \
|
||||||
|
PHP_VERSION="8.0"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### User/Group
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
|
||||||
|
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Upgrade (install ps)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Configure
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& rm -rf /usr/local/etc/php-fpm.d \
|
||||||
|
&& mkdir -p /usr/local/etc/php-fpm.d \
|
||||||
|
&& mkdir -p /var/lib/php/session \
|
||||||
|
&& mkdir -p /var/lib/php/wsdlcache \
|
||||||
|
&& chown -R devilbox:devilbox /var/lib/php/session \
|
||||||
|
&& chown -R devilbox:devilbox /var/lib/php/wsdlcache
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/php-ini.d/php-8.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||||
|
COPY ./data/php-fpm.conf/php-fpm-8.0.conf /usr/local/etc/php-fpm.conf
|
||||||
|
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.4.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-7.4.conf
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings can be overwritten by later includes
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Timeouts
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; The timeout for serving a single request after which the worker process will be killed.
|
||||||
|
; This option should be used when the 'max_execution_time' ini option does not stop script
|
||||||
|
; execution for some reason.
|
||||||
|
request_terminate_timeout = 120s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Logging
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
error_log = /proc/self/fd/2
|
||||||
|
log_level = notice
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; if we send this to /proc/self/fd/1, it never appears
|
||||||
|
access.log = /proc/self/fd/2
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Backlog configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; A maximum of backlog incoming connections will be queued for processing.
|
||||||
|
; If a connection request arrives with the queue full the client may receive an error with an
|
||||||
|
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
|
||||||
|
; the request may be ignored so that retries may succeed.
|
||||||
|
|
||||||
|
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
|
||||||
|
; are silently truncated
|
||||||
|
listen.backlog = 1024
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Worker configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; static - the number of child processes is fixed (pm.max_children).
|
||||||
|
;
|
||||||
|
; dynamic - the number of child processes is set dynamically based on the following directives:
|
||||||
|
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
|
||||||
|
;
|
||||||
|
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
|
||||||
|
; pm.start_servers are started when the service is started.
|
||||||
|
pm = ondemand
|
||||||
|
|
||||||
|
; The maximum number of child processes to be created
|
||||||
|
pm.max_children = 50
|
||||||
|
|
||||||
|
; The number of child processes created on startup. Used only when pm is set to dynamic.
|
||||||
|
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
|
||||||
|
pm.start_servers = 4
|
||||||
|
|
||||||
|
; The desired minimum number of idle server processes.
|
||||||
|
pm.min_spare_servers = 2
|
||||||
|
|
||||||
|
; The desired maximum number of idle server processes.
|
||||||
|
pm.max_spare_servers = 6
|
||||||
|
|
||||||
|
; The number of requests each child process should execute before respawning.
|
||||||
|
; This can be useful to work around memory leaks in 3rd party libraries.
|
||||||
|
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||||
|
; Default value: 0.
|
||||||
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
|
||||||
|
pm.process_idle_timeout = 10s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Include
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
|
||||||
|
[global]
|
||||||
|
include = /usr/local/etc/php-fpm.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings overwrite any includes again
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Required for Dockerization
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
daemonize = no
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Keep env variables set by docker
|
||||||
|
clear_env = no
|
||||||
|
|
||||||
|
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||||
|
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||||
|
; Note: on highloaded environement, this can cause some delay in the page
|
||||||
|
; process time (several ms).
|
||||||
|
; Default Value: no
|
||||||
|
catch_workers_output = yes
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; User and Group
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
user = devilbox
|
||||||
|
group = devilbox
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Networking
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Ensure to listen here
|
||||||
|
listen = 9000
|
||||||
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-8.0.conf
Normal file
134
Dockerfiles/base/data/php-fpm.conf/php-fpm-8.0.conf
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings can be overwritten by later includes
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Timeouts
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; The timeout for serving a single request after which the worker process will be killed.
|
||||||
|
; This option should be used when the 'max_execution_time' ini option does not stop script
|
||||||
|
; execution for some reason.
|
||||||
|
request_terminate_timeout = 120s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Logging
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
error_log = /proc/self/fd/2
|
||||||
|
log_level = notice
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; if we send this to /proc/self/fd/1, it never appears
|
||||||
|
access.log = /proc/self/fd/2
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Backlog configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; A maximum of backlog incoming connections will be queued for processing.
|
||||||
|
; If a connection request arrives with the queue full the client may receive an error with an
|
||||||
|
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
|
||||||
|
; the request may be ignored so that retries may succeed.
|
||||||
|
|
||||||
|
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
|
||||||
|
; are silently truncated
|
||||||
|
listen.backlog = 1024
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Worker configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; static - the number of child processes is fixed (pm.max_children).
|
||||||
|
;
|
||||||
|
; dynamic - the number of child processes is set dynamically based on the following directives:
|
||||||
|
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
|
||||||
|
;
|
||||||
|
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
|
||||||
|
; pm.start_servers are started when the service is started.
|
||||||
|
pm = ondemand
|
||||||
|
|
||||||
|
; The maximum number of child processes to be created
|
||||||
|
pm.max_children = 50
|
||||||
|
|
||||||
|
; The number of child processes created on startup. Used only when pm is set to dynamic.
|
||||||
|
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
|
||||||
|
pm.start_servers = 4
|
||||||
|
|
||||||
|
; The desired minimum number of idle server processes.
|
||||||
|
pm.min_spare_servers = 2
|
||||||
|
|
||||||
|
; The desired maximum number of idle server processes.
|
||||||
|
pm.max_spare_servers = 6
|
||||||
|
|
||||||
|
; The number of requests each child process should execute before respawning.
|
||||||
|
; This can be useful to work around memory leaks in 3rd party libraries.
|
||||||
|
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||||
|
; Default value: 0.
|
||||||
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
|
||||||
|
pm.process_idle_timeout = 10s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Include
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
|
||||||
|
[global]
|
||||||
|
include = /usr/local/etc/php-fpm.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings overwrite any includes again
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Required for Dockerization
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
daemonize = no
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Keep env variables set by docker
|
||||||
|
clear_env = no
|
||||||
|
|
||||||
|
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||||
|
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||||
|
; Note: on highloaded environement, this can cause some delay in the page
|
||||||
|
; process time (several ms).
|
||||||
|
; Default Value: no
|
||||||
|
catch_workers_output = yes
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; User and Group
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
user = devilbox
|
||||||
|
group = devilbox
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Networking
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Ensure to listen here
|
||||||
|
listen = 9000
|
||||||
49
Dockerfiles/base/data/php-ini.d/php-7.4.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-7.4.ini
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
; ############################################################
|
||||||
|
; # Devilbox PHP defaults for 7.4-base
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||||
|
; If none is present, the one from the previous flavour is inherited.
|
||||||
|
|
||||||
|
|
||||||
|
[PHP]
|
||||||
|
|
||||||
|
; Memory
|
||||||
|
; Note: "memory_limit" should be larger than "post_max_size"
|
||||||
|
memory_limit = 512M
|
||||||
|
|
||||||
|
|
||||||
|
; Timeouts
|
||||||
|
max_execution_time = 120
|
||||||
|
max_input_time = 120
|
||||||
|
|
||||||
|
|
||||||
|
; Uploads
|
||||||
|
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||||
|
post_max_size = 72M
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
max_file_uploads = 20
|
||||||
|
|
||||||
|
|
||||||
|
; Vars
|
||||||
|
variables_order = EGPCS
|
||||||
|
max_input_vars = 8000
|
||||||
|
max_input_nesting_level = 64
|
||||||
|
|
||||||
|
|
||||||
|
; Error reporting
|
||||||
|
; Note: error_log is dynamic and handled during start to set appropriate setting
|
||||||
|
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
xmlrpc_errors = Off
|
||||||
|
report_memleaks = On
|
||||||
|
display_errors = Off
|
||||||
|
display_startup_errors = Off
|
||||||
|
log_errors = On
|
||||||
|
html_errors = Off
|
||||||
|
|
||||||
|
|
||||||
|
; Xdebug settings
|
||||||
|
xdebug.default_enable = Off
|
||||||
|
xdebug.profiler_enable = Off
|
||||||
|
xdebug.remote_enable = Off
|
||||||
|
xdebug.remote_autostart = Off
|
||||||
49
Dockerfiles/base/data/php-ini.d/php-8.0.ini
Normal file
49
Dockerfiles/base/data/php-ini.d/php-8.0.ini
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
; ############################################################
|
||||||
|
; # Devilbox PHP defaults for 8.0-base
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||||
|
; If none is present, the one from the previous flavour is inherited.
|
||||||
|
|
||||||
|
|
||||||
|
[PHP]
|
||||||
|
|
||||||
|
; Memory
|
||||||
|
; Note: "memory_limit" should be larger than "post_max_size"
|
||||||
|
memory_limit = 512M
|
||||||
|
|
||||||
|
|
||||||
|
; Timeouts
|
||||||
|
max_execution_time = 120
|
||||||
|
max_input_time = 120
|
||||||
|
|
||||||
|
|
||||||
|
; Uploads
|
||||||
|
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||||
|
post_max_size = 72M
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
max_file_uploads = 20
|
||||||
|
|
||||||
|
|
||||||
|
; Vars
|
||||||
|
variables_order = EGPCS
|
||||||
|
max_input_vars = 8000
|
||||||
|
max_input_nesting_level = 64
|
||||||
|
|
||||||
|
|
||||||
|
; Error reporting
|
||||||
|
; Note: error_log is dynamic and handled during start to set appropriate setting
|
||||||
|
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
xmlrpc_errors = Off
|
||||||
|
report_memleaks = On
|
||||||
|
display_errors = Off
|
||||||
|
display_startup_errors = Off
|
||||||
|
log_errors = On
|
||||||
|
html_errors = Off
|
||||||
|
|
||||||
|
|
||||||
|
; Xdebug settings
|
||||||
|
xdebug.default_enable = Off
|
||||||
|
xdebug.profiler_enable = Off
|
||||||
|
xdebug.remote_enable = Off
|
||||||
|
xdebug.remote_autostart = Off
|
||||||
@@ -1,114 +1,69 @@
|
|||||||
# 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>
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
### Labels
|
|
||||||
###
|
|
||||||
LABEL \
|
|
||||||
name="cytopia's PHP-FPM 5.2 Image" \
|
|
||||||
image="devilbox/php-fpm" \
|
|
||||||
tag="5.2-mods" \
|
|
||||||
vendor="devilbox" \
|
|
||||||
license="MIT"
|
|
||||||
|
|
||||||
|
|
||||||
###
|
|
||||||
### Envs
|
|
||||||
###
|
|
||||||
ENV BUILD_DEPS \
|
|
||||||
librabbitmq-dev \
|
|
||||||
libbz2-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libenchant-dev \
|
|
||||||
libmagic-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libpng-dev \
|
|
||||||
libjpeg-dev \
|
|
||||||
libxpm-dev \
|
|
||||||
libvpx-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libfreetype6-dev \
|
|
||||||
libc-client-dev \
|
|
||||||
libkrb5-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
libfbclient2 \
|
|
||||||
libib-util \
|
|
||||||
firebird-dev \
|
|
||||||
libicu-dev \
|
|
||||||
libldap2-dev \
|
|
||||||
libsasl2-dev \
|
|
||||||
libmcrypt-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libmemcached-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libsasl2-dev \
|
|
||||||
freetds-dev \
|
|
||||||
libfbclient2 \
|
|
||||||
libib-util \
|
|
||||||
firebird-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
libpq-dev \
|
|
||||||
libsqlite3-dev \
|
|
||||||
libpq-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libpspell-dev \
|
|
||||||
librecode-dev \
|
|
||||||
libmm-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libsnmp-dev \
|
|
||||||
snmp \
|
|
||||||
libxml2-dev \
|
|
||||||
libtidy-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt-dev \
|
|
||||||
zlib1g-dev \
|
|
||||||
ca-certificates \
|
|
||||||
git
|
|
||||||
|
|
||||||
ENV RUN_DEPS \
|
|
||||||
librabbitmq1 \
|
|
||||||
libenchant1c2a \
|
|
||||||
libpng12-0 \
|
|
||||||
libjpeg62-turbo \
|
|
||||||
libxpm4 \
|
|
||||||
libvpx1 \
|
|
||||||
libfreetype6 \
|
|
||||||
libc-client2007e \
|
|
||||||
libfbclient2 \
|
|
||||||
libicu52 \
|
|
||||||
libmcrypt4 \
|
|
||||||
libmemcachedutil2 \
|
|
||||||
libmysqlclient18 \
|
|
||||||
libsybdb5 \
|
|
||||||
libfbclient2 \
|
|
||||||
libpq5 \
|
|
||||||
libpq5 \
|
|
||||||
libaspell15 \
|
|
||||||
librecode0 \
|
|
||||||
snmp \
|
|
||||||
libtidy-0.99-0 \
|
|
||||||
libxslt1.1 \
|
|
||||||
ca-certificates
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Install
|
### Install
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
${BUILD_DEPS} \
|
&& 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 )" \
|
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
|
||||||
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
|
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
|
||||||
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
|
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
|
||||||
@@ -119,132 +74,550 @@ RUN set -x \
|
|||||||
&& rm -rf ioncube \
|
&& rm -rf ioncube \
|
||||||
&& rm -rf ioncube.tar.gz \
|
&& rm -rf ioncube.tar.gz \
|
||||||
\
|
\
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: amqp --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: PECL extension
|
||||||
|
# Default: Pecl command
|
||||||
&& pecl install amqp-1.4.0 \
|
&& pecl install amqp-1.4.0 \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable amqp \
|
&& docker-php-ext-enable amqp \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \
|
# -------------------- Installing PHP Extension: bcmath --------------------
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \
|
RUN set -eux \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
|
# Installation: Generic
|
||||||
&& /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \
|
# Type: Built-in extension
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \
|
&& 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 \
|
&& echo "/usr" | pecl install enchant \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable enchant \
|
&& docker-php-ext-enable enchant \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
|
&& 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 \
|
&& pecl install fileinfo \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable fileinfo \
|
&& docker-php-ext-enable fileinfo \
|
||||||
&& /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \
|
|
||||||
|
|
||||||
|
# -------------------- 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/libjpeg.* /usr/lib/ && \
|
||||||
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
|
ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \
|
||||||
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
|
ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \
|
||||||
mkdir /usr/include/freetype2/freetype && \
|
mkdir /usr/include/freetype2/freetype && \
|
||||||
ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \
|
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 \
|
# Installation: Version specific
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
|
# Type: Built-in extension
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
|
# Custom: configure command
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \
|
&& 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) iconv \
|
# Installation
|
||||||
&& pecl install igbinary \
|
&& 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 \
|
&& 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/ \
|
&& 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 \
|
# Installation: Generic
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \
|
# Type: Built-in extension
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \
|
# 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 \
|
&& pecl install intl \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable intl \
|
&& docker-php-ext-enable intl \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: ldap --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
|
&& ln -s /usr/lib/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
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \
|
# Custom: configure command
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \
|
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
|
||||||
&& pecl install memcache \
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
|
||||||
&& docker-php-ext-enable memcache \
|
&& true
|
||||||
&& pecl install memcached-2.1.0 \
|
|
||||||
&& docker-php-ext-enable memcached \
|
|
||||||
&& yes | pecl install mongo-1.5.8 \
|
# -------------------- Installing PHP Extension: mcrypt --------------------
|
||||||
&& docker-php-ext-enable mongo \
|
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 \
|
&& pecl install msgpack-0.5.7 \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable msgpack \
|
&& docker-php-ext-enable msgpack \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: memcache --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: PECL extension
|
||||||
|
# Default: Pecl command
|
||||||
|
&& pecl install memcache \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable memcache \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: memcached --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: 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 | 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 \
|
&& pecl install zendopcache \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable opcache \
|
&& docker-php-ext-enable opcache \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \
|
|
||||||
|
|
||||||
|
# -------------------- 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
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
# 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_dblib \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
|
# -------------------- 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 \
|
&& pecl install phar \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable phar \
|
&& docker-php-ext-enable phar \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \
|
|
||||||
|
# -------------------- 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 \
|
&& pecl install redis-2.2.7 \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable redis \
|
&& docker-php-ext-enable redis \
|
||||||
&& /usr/local/bin/docker-php-ext-configure session --with-mm \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
|
|
||||||
&& /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \
|
# -------------------- Installing PHP Extension: shmop --------------------
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \
|
RUN set -eux \
|
||||||
&& /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \
|
# Installation: Generic
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
|
# Type: Built-in extension
|
||||||
&& /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
|
# -------------------- Installing PHP Extension: snmp --------------------
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
|
RUN set -eux \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \
|
# Installation: Generic
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \
|
# 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 \
|
&& pecl install uploadprogress \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable uploadprogress \
|
&& docker-php-ext-enable uploadprogress \
|
||||||
&& /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \
|
|
||||||
|
|
||||||
|
# -------------------- 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 \
|
&& pecl install xdebug-2.2.7 \
|
||||||
|
# Enabling
|
||||||
&& docker-php-ext-enable xdebug \
|
&& docker-php-ext-enable xdebug \
|
||||||
&& /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \
|
&& true
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \
|
|
||||||
&& /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \
|
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \
|
# -------------------- Installing PHP Extension: xmlrpc --------------------
|
||||||
&& /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
RUN set -eux \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
# Installation: Generic
|
||||||
&& /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \
|
# Type: Built-in extension
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \
|
# Custom: configure command
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
||||||
&& /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||||
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
&& true
|
||||||
\
|
|
||||||
\
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
# -------------------- Installing PHP Extension: xsl --------------------
|
||||||
${BUILD_DEPS} \
|
RUN set -eux \
|
||||||
\
|
# Installation: Generic
|
||||||
\
|
# Type: Built-in extension
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||||
${RUN_DEPS} \
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: zip --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \
|
||||||
|
# Installation
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Fix php.ini settings for enabled extensions
|
||||||
|
RUN set -eux \
|
||||||
|
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
|
||||||
|
|
||||||
|
# Fix oracle dir for images that don't have oci installed
|
||||||
|
RUN set -eux \
|
||||||
|
&& mkdir -p /usr/lib/oracle/
|
||||||
|
|
||||||
|
# Shrink everything down
|
||||||
|
RUN set -eux \
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:5.2-base as final
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="5.2-mods"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-mods"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy artifacts from builder
|
||||||
|
###
|
||||||
|
ARG EXT_DIR
|
||||||
|
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
|
||||||
|
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
|
||||||
|
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libaspell15 \
|
||||||
|
libc-client2007e \
|
||||||
|
libenchant1c2a \
|
||||||
|
libfbclient2 \
|
||||||
|
libfreetype6 \
|
||||||
|
libicu52 \
|
||||||
|
libjpeg62-turbo \
|
||||||
|
libmcrypt4 \
|
||||||
|
libmemcachedutil2 \
|
||||||
|
libmysqlclient18 \
|
||||||
|
libpng12-0 \
|
||||||
|
libpq5 \
|
||||||
|
librabbitmq1 \
|
||||||
|
librecode0 \
|
||||||
|
libsybdb5 \
|
||||||
|
libtidy-0.99-0 \
|
||||||
|
libvpx1 \
|
||||||
|
libxpm4 \
|
||||||
|
libxslt1.1 \
|
||||||
|
snmp \
|
||||||
|
ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& update-ca-certificates \
|
\
|
||||||
&& sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true"
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Post Install
|
||||||
|
###
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
RUN set -x \
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini \
|
||||||
|
\
|
||||||
&& php -m | grep -oiE '^amqp$' \
|
&& php -m | grep -oiE '^amqp$' \
|
||||||
&& php-fpm -m | grep -oiE '^amqp$' \
|
&& php-fpm -m | grep -oiE '^amqp$' \
|
||||||
&& php -m | grep -oiE '^bcmath$' \
|
&& php -m | grep -oiE '^bcmath$' \
|
||||||
@@ -267,6 +640,8 @@ RUN set -x \
|
|||||||
&& php-fpm -m | grep -oiE '^exif$' \
|
&& php-fpm -m | grep -oiE '^exif$' \
|
||||||
&& php -m | grep -oiE '^fileinfo$' \
|
&& php -m | grep -oiE '^fileinfo$' \
|
||||||
&& php-fpm -m | grep -oiE '^fileinfo$' \
|
&& php-fpm -m | grep -oiE '^fileinfo$' \
|
||||||
|
&& php -m | grep -oiE '^filter$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^filter$' \
|
||||||
&& php -m | grep -oiE '^ftp$' \
|
&& php -m | grep -oiE '^ftp$' \
|
||||||
&& php-fpm -m | grep -oiE '^ftp$' \
|
&& php-fpm -m | grep -oiE '^ftp$' \
|
||||||
&& php -m | grep -oiE '^gd$' \
|
&& php -m | grep -oiE '^gd$' \
|
||||||
@@ -289,26 +664,34 @@ RUN set -x \
|
|||||||
&& php-fpm -m | grep -oiE '^json$' \
|
&& php-fpm -m | grep -oiE '^json$' \
|
||||||
&& php -m | grep -oiE '^ldap$' \
|
&& php -m | grep -oiE '^ldap$' \
|
||||||
&& php-fpm -m | grep -oiE '^ldap$' \
|
&& php-fpm -m | grep -oiE '^ldap$' \
|
||||||
|
&& php -m | grep -oiE '^libxml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^libxml$' \
|
||||||
&& php -m | grep -oiE '^mbstring$' \
|
&& php -m | grep -oiE '^mbstring$' \
|
||||||
&& php-fpm -m | grep -oiE '^mbstring$' \
|
&& php-fpm -m | grep -oiE '^mbstring$' \
|
||||||
&& php -m | grep -oiE '^mcrypt$' \
|
&& php -m | grep -oiE '^mcrypt$' \
|
||||||
&& php-fpm -m | grep -oiE '^mcrypt$' \
|
&& php-fpm -m | grep -oiE '^mcrypt$' \
|
||||||
|
&& php -m | grep -oiE '^msgpack$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^msgpack$' \
|
||||||
&& php -m | grep -oiE '^memcache$' \
|
&& php -m | grep -oiE '^memcache$' \
|
||||||
&& php-fpm -m | grep -oiE '^memcache$' \
|
&& php-fpm -m | grep -oiE '^memcache$' \
|
||||||
&& php -m | grep -oiE '^memcached$' \
|
&& php -m | grep -oiE '^memcached$' \
|
||||||
&& php-fpm -m | grep -oiE '^memcached$' \
|
&& php-fpm -m | grep -oiE '^memcached$' \
|
||||||
&& php -m | grep -oiE '^mongo$' \
|
&& php -m | grep -oiE '^mongo$' \
|
||||||
&& php-fpm -m | grep -oiE '^mongo$' \
|
&& php-fpm -m | grep -oiE '^mongo$' \
|
||||||
&& php -m | grep -oiE '^msgpack$' \
|
|
||||||
&& php-fpm -m | grep -oiE '^msgpack$' \
|
|
||||||
&& php -m | grep -oiE '^mysql$' \
|
&& php -m | grep -oiE '^mysql$' \
|
||||||
&& 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-fpm -m | grep -oiE '^openssl$' \
|
||||||
&& php -m | grep -oiE '^pcntl$' \
|
&& php -m | grep -oiE '^pcntl$' \
|
||||||
&& php-fpm -m | grep -oiE '^pcntl$' \
|
&& php-fpm -m | grep -oiE '^pcntl$' \
|
||||||
|
&& php -m | grep -oiE '^pcre$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pcre$' \
|
||||||
&& php -m | grep -oiE '^pdo$' \
|
&& php -m | grep -oiE '^pdo$' \
|
||||||
&& php-fpm -m | grep -oiE '^pdo$' \
|
&& php-fpm -m | grep -oiE '^pdo$' \
|
||||||
&& php -m | grep -oiE '^pdo_dblib$' \
|
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||||
@@ -329,10 +712,13 @@ RUN set -x \
|
|||||||
&& php-fpm -m | grep -oiE '^posix$' \
|
&& php-fpm -m | grep -oiE '^posix$' \
|
||||||
&& 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 '^recode$' \
|
&& php -m | grep -oiE '^recode$' \
|
||||||
&& php-fpm -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-fpm -m | grep -oiE '^reflection$' \
|
||||||
&& php -m | grep -oiE '^session$' \
|
&& php -m | grep -oiE '^session$' \
|
||||||
&& php-fpm -m | grep -oiE '^session$' \
|
&& php-fpm -m | grep -oiE '^session$' \
|
||||||
&& php -m | grep -oiE '^shmop$' \
|
&& php -m | grep -oiE '^shmop$' \
|
||||||
@@ -345,6 +731,8 @@ RUN set -x \
|
|||||||
&& php-fpm -m | grep -oiE '^soap$' \
|
&& php-fpm -m | grep -oiE '^soap$' \
|
||||||
&& php -m | grep -oiE '^sockets$' \
|
&& php -m | grep -oiE '^sockets$' \
|
||||||
&& php-fpm -m | grep -oiE '^sockets$' \
|
&& php-fpm -m | grep -oiE '^sockets$' \
|
||||||
|
&& php -m | grep -oiE '^spl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^spl$' \
|
||||||
&& php -m | grep -oiE '^sysvmsg$' \
|
&& php -m | grep -oiE '^sysvmsg$' \
|
||||||
&& php-fpm -m | grep -oiE '^sysvmsg$' \
|
&& php-fpm -m | grep -oiE '^sysvmsg$' \
|
||||||
&& php -m | grep -oiE '^sysvsem$' \
|
&& php -m | grep -oiE '^sysvsem$' \
|
||||||
|
|||||||
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
774
Dockerfiles/mods/Dockerfile-7.4
Normal file
774
Dockerfiles/mods/Dockerfile-7.4
Normal file
@@ -0,0 +1,774 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:7.4-base as builder
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
alien \
|
||||||
|
cmake \
|
||||||
|
firebird-dev \
|
||||||
|
freetds-dev \
|
||||||
|
libaio-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libevent-dev \
|
||||||
|
libfbclient2 \
|
||||||
|
libffi-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
libhiredis-dev \
|
||||||
|
libib-util \
|
||||||
|
libicu-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libldap2-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libnghttp2-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libpspell-dev \
|
||||||
|
librdkafka-dev \
|
||||||
|
libsasl2-dev \
|
||||||
|
libsnmp-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libtidy-dev \
|
||||||
|
libvpx-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxpm-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
libzip-dev \
|
||||||
|
snmp \
|
||||||
|
zlib1g-dev \
|
||||||
|
ca-certificates \
|
||||||
|
git
|
||||||
|
|
||||||
|
|
||||||
|
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install and enable PHP modules
|
||||||
|
###
|
||||||
|
# Enable ffi if it exists
|
||||||
|
RUN set -eux \
|
||||||
|
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
|
||||||
|
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: bcmath --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: bz2 --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: calendar --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: dba --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: exif --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: ffi --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/dstogov/php-ffi /tmp/ffi \
|
||||||
|
&& cd /tmp/ffi \
|
||||||
|
# Custom: Install command
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --with-ffi \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable ffi \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gd --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure gd --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
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gettext --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gmp --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: igbinary --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: PECL extension
|
||||||
|
# Default: Pecl command
|
||||||
|
&& pecl install igbinary \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable igbinary \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: intl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Installation
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: ldap --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: memcached --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \
|
||||||
|
&& cd /tmp/memcached \
|
||||||
|
# Custom: Branch
|
||||||
|
&& git checkout master \
|
||||||
|
# Custom: Install command
|
||||||
|
&& phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable memcached \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: mongodb --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: PECL extension
|
||||||
|
# Default: Pecl command
|
||||||
|
&& pecl install mongodb \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable mongodb \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: mysqli --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: oci8 --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
\
|
||||||
|
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
\
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
|
||||||
|
# Generic post-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: opcache --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pcntl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_dblib --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_firebird --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_mysql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_oci --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
\
|
||||||
|
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||||
|
# Installation
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pgsql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pspell --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: redis --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
|
||||||
|
&& cd /tmp/redis \
|
||||||
|
# Custom: Install command
|
||||||
|
&& phpize \
|
||||||
|
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \
|
||||||
|
&& sed -i'' 's/ZEND_ACC_DTOR | //g' redis.c \
|
||||||
|
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis_cluster.c \
|
||||||
|
&& ./configure --enable-redis \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable redis \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: rdkafka --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: PECL extension
|
||||||
|
# Default: Pecl command
|
||||||
|
&& pecl install rdkafka-3.1.2 \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable rdkafka \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: shmop --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: snmp --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure snmp --with-openssl-dir \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: soap --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sockets --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: swoole --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/swoole/swoole-src /tmp/swoole \
|
||||||
|
&& cd /tmp/swoole \
|
||||||
|
# Custom: Branch
|
||||||
|
&& git checkout master \
|
||||||
|
# Custom: Install command
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure \
|
||||||
|
--enable-openssl \
|
||||||
|
--enable-sockets \
|
||||||
|
--enable-http2 \
|
||||||
|
--enable-mysqlnd \
|
||||||
|
--enable-coroutine-postgresql \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable swoole \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvmsg --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvsem --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvshm --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: tidy --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: 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: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
|
||||||
|
&& cd /tmp/uploadprogress \
|
||||||
|
# Default: Install command
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --enable-uploadprogress \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable uploadprogress \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: xmlrpc --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: xsl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: zip --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Fix php.ini settings for enabled extensions
|
||||||
|
RUN set -eux \
|
||||||
|
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
|
||||||
|
|
||||||
|
# Fix oracle dir for images that don't have oci installed
|
||||||
|
RUN set -eux \
|
||||||
|
&& mkdir -p /usr/lib/oracle/
|
||||||
|
|
||||||
|
# Shrink everything down
|
||||||
|
RUN set -eux \
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:7.4-base as final
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="7.4-mods"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-mods"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-mods"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy artifacts from builder
|
||||||
|
###
|
||||||
|
ARG EXT_DIR
|
||||||
|
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
|
||||||
|
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
|
||||||
|
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libaio1 \
|
||||||
|
libaspell15 \
|
||||||
|
libfbclient2 \
|
||||||
|
libffi6 \
|
||||||
|
libfreetype6 \
|
||||||
|
libhiredis0.13 \
|
||||||
|
libicu57 \
|
||||||
|
libjpeg62-turbo \
|
||||||
|
libmemcachedutil2 \
|
||||||
|
libnghttp2-14 \
|
||||||
|
libpng16-16 \
|
||||||
|
libpq5 \
|
||||||
|
librdkafka1 \
|
||||||
|
libsybdb5 \
|
||||||
|
libtidy5 \
|
||||||
|
libvpx4 \
|
||||||
|
libwebp6 \
|
||||||
|
libxpm4 \
|
||||||
|
libxslt1.1 \
|
||||||
|
libzip4 \
|
||||||
|
snmp \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Post Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# ---------- oci8 ----------
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini \
|
||||||
|
\
|
||||||
|
&& php -m | grep -oiE '^bcmath$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^bcmath$' \
|
||||||
|
&& php -m | grep -oiE '^bz2$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^bz2$' \
|
||||||
|
&& php -m | grep -oiE '^calendar$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^calendar$' \
|
||||||
|
&& php -m | grep -oiE '^ctype$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ctype$' \
|
||||||
|
&& php -m | grep -oiE '^curl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^curl$' \
|
||||||
|
&& php -m | grep -oiE '^dba$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^dba$' \
|
||||||
|
&& php -m | grep -oiE '^dom$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^dom$' \
|
||||||
|
&& php -m | grep -oiE '^exif$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^exif$' \
|
||||||
|
&& php -m | grep -oiE '^ffi$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ffi$' \
|
||||||
|
&& php -m | grep -oiE '^fileinfo$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^fileinfo$' \
|
||||||
|
&& php -m | grep -oiE '^filter$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^filter$' \
|
||||||
|
&& php -m | grep -oiE '^ftp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ftp$' \
|
||||||
|
&& php -m | grep -oiE '^gd$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gd$' \
|
||||||
|
&& php -m | grep -oiE '^gettext$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gettext$' \
|
||||||
|
&& php -m | grep -oiE '^gmp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gmp$' \
|
||||||
|
&& php -m | grep -oiE '^hash$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^hash$' \
|
||||||
|
&& php -m | grep -oiE '^iconv$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^iconv$' \
|
||||||
|
&& php -m | grep -oiE '^igbinary$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^igbinary$' \
|
||||||
|
&& php -m | grep -oiE '^intl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^intl$' \
|
||||||
|
&& php -m | grep -oiE '^json$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^json$' \
|
||||||
|
&& php -m | grep -oiE '^ldap$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ldap$' \
|
||||||
|
&& php -m | grep -oiE '^libxml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^libxml$' \
|
||||||
|
&& php -m | grep -oiE '^mbstring$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mbstring$' \
|
||||||
|
&& php -m | grep -oiE '^memcached$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^memcached$' \
|
||||||
|
&& php -m | grep -oiE '^mongodb$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mongodb$' \
|
||||||
|
&& php -m | grep -oiE '^mysqli$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mysqli$' \
|
||||||
|
&& php -m | grep -oiE '^mysqlnd$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mysqlnd$' \
|
||||||
|
&& php -m | grep -oiE '^oci8$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^oci8$' \
|
||||||
|
&& php -m | grep -oiE '^Zend Opcache$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
|
||||||
|
&& php -m | grep -oiE '^openssl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^openssl$' \
|
||||||
|
&& php -m | grep -oiE '^pcntl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pcntl$' \
|
||||||
|
&& php -m | grep -oiE '^pcre$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pcre$' \
|
||||||
|
&& php -m | grep -oiE '^pdo$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_dblib$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_firebird$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_firebird$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_mysql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_mysql$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_oci$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_oci$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_pgsql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_sqlite$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \
|
||||||
|
&& php -m | grep -oiE '^pgsql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pgsql$' \
|
||||||
|
&& php -m | grep -oiE '^phar$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^phar$' \
|
||||||
|
&& php -m | grep -oiE '^posix$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^posix$' \
|
||||||
|
&& php -m | grep -oiE '^pspell$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pspell$' \
|
||||||
|
&& php -m | grep -oiE '^readline$' \
|
||||||
|
&& php -m | grep -oiE '^redis$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^redis$' \
|
||||||
|
&& php -m | grep -oiE '^reflection$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^reflection$' \
|
||||||
|
&& php -m | grep -oiE '^rdkafka$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^rdkafka$' \
|
||||||
|
&& php -m | grep -oiE '^session$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^session$' \
|
||||||
|
&& php -m | grep -oiE '^shmop$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^shmop$' \
|
||||||
|
&& php -m | grep -oiE '^simplexml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^simplexml$' \
|
||||||
|
&& php -m | grep -oiE '^snmp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^snmp$' \
|
||||||
|
&& php -m | grep -oiE '^soap$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^soap$' \
|
||||||
|
&& php -m | grep -oiE '^sockets$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sockets$' \
|
||||||
|
&& php -m | grep -oiE '^sodium$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sodium$' \
|
||||||
|
&& php -m | grep -oiE '^spl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^spl$' \
|
||||||
|
&& php -m | grep -oiE '^swoole$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^swoole$' \
|
||||||
|
&& php -m | grep -oiE '^sysvmsg$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvmsg$' \
|
||||||
|
&& php -m | grep -oiE '^sysvsem$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvsem$' \
|
||||||
|
&& php -m | grep -oiE '^sysvshm$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvshm$' \
|
||||||
|
&& php -m | grep -oiE '^tidy$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^tidy$' \
|
||||||
|
&& php -m | grep -oiE '^tokenizer$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^tokenizer$' \
|
||||||
|
&& php -m | grep -oiE '^uploadprogress$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^uploadprogress$' \
|
||||||
|
&& php -m | grep -oiE '^xml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xml$' \
|
||||||
|
&& php -m | grep -oiE '^xmlreader$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlreader$' \
|
||||||
|
&& php -m | grep -oiE '^xmlrpc$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlrpc$' \
|
||||||
|
&& php -m | grep -oiE '^xmlwriter$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlwriter$' \
|
||||||
|
&& php -m | grep -oiE '^xsl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xsl$' \
|
||||||
|
&& php -m | grep -oiE '^zip$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^zip$' \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
758
Dockerfiles/mods/Dockerfile-8.0
Normal file
758
Dockerfiles/mods/Dockerfile-8.0
Normal file
@@ -0,0 +1,758 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:8.0-base as builder
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
alien \
|
||||||
|
firebird-dev \
|
||||||
|
freetds-dev \
|
||||||
|
libaio-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libevent-dev \
|
||||||
|
libfbclient2 \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libgmp-dev \
|
||||||
|
libib-util \
|
||||||
|
libicu-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libldap2-dev \
|
||||||
|
libmemcached-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libpspell-dev \
|
||||||
|
libsasl2-dev \
|
||||||
|
libsnmp-dev \
|
||||||
|
libsodium-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libtidy-dev \
|
||||||
|
libvpx-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxpm-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
libzip-dev \
|
||||||
|
snmp \
|
||||||
|
zlib1g-dev \
|
||||||
|
ca-certificates \
|
||||||
|
git
|
||||||
|
|
||||||
|
|
||||||
|
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install and enable PHP modules
|
||||||
|
###
|
||||||
|
# Enable ffi if it exists
|
||||||
|
RUN set -eux \
|
||||||
|
&& if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \
|
||||||
|
echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: bcmath --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: bz2 --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: calendar --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: dba --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: exif --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gd --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure gd --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
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gettext --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: gmp --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: intl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Installation
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: ldap --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: memcached --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \
|
||||||
|
&& cd /tmp/memcached \
|
||||||
|
# Custom: Branch
|
||||||
|
&& git checkout master \
|
||||||
|
# Custom: Install command
|
||||||
|
&& true \
|
||||||
|
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
|
||||||
|
&& sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --enable-memcached \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable memcached \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: mongodb --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \
|
||||||
|
&& cd /tmp/mongodb \
|
||||||
|
# Custom: Install command
|
||||||
|
&& git checkout v1.6 \
|
||||||
|
&& git submodule update --init \
|
||||||
|
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
|
||||||
|
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C)/)/g' \
|
||||||
|
&& rgrep -I 'TSRMLS_C' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_C,/,/g' \
|
||||||
|
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' \
|
||||||
|
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' \
|
||||||
|
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' \
|
||||||
|
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' \
|
||||||
|
&& sed -i'' 's/TSRMLS_SET_CTX(ctx);/\/\/TSRMLS_SET_CTX(ctx);/g' php_phongo.c \
|
||||||
|
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' php_phongo.c \
|
||||||
|
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' phongo_compat.h \
|
||||||
|
&& sed -i'' 's/TSRMLS_FETCH();/\/\/TSRMLS_FETCH();/g' src/bson.c \
|
||||||
|
\
|
||||||
|
&& sed -i'' 's/php_phongo_handler_binary.compare_objects.*//g' src/BSON/Binary.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_dbpointer.compare_objects.*//g' src/BSON/DBPointer.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_int64.compare_objects.*//g' src/BSON/Int64.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_javascript.compare_objects.*//g' src/BSON/Javascript.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_objectid.compare_objects.*//g' src/BSON/ObjectId.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_symbol.compare_objects.*//g' src/BSON/Symbol.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_timestamp.compare_objects.*//g' src/BSON/Timestamp.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_regex.compare_objects.*//g' src/BSON/Regex.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_server.compare_objects.*//g' src/MongoDB/Server.c \
|
||||||
|
&& sed -i'' 's/php_phongo_handler_utcdatetime.compare_objects.*//g' src/BSON/UTCDateTime.c \
|
||||||
|
\
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --enable-mongodb \
|
||||||
|
&& make all \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable mongodb \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: mysqli --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: oci8 --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
\
|
||||||
|
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
\
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \
|
||||||
|
# Generic post-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: opcache --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pcntl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_dblib --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_firebird --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_mysql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_oci --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Generic pre-command
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
\
|
||||||
|
&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \
|
||||||
|
&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \
|
||||||
|
# Installation
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pdo_pgsql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pgsql --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: pspell --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: redis --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/phpredis/phpredis /tmp/redis \
|
||||||
|
&& cd /tmp/redis \
|
||||||
|
# Custom: Install command
|
||||||
|
&& phpize \
|
||||||
|
&& sed -i'' 's/ZEND_ACC_CTOR | //g' redis.c \
|
||||||
|
&& 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 \
|
||||||
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable redis \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: shmop --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: snmp --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure snmp --with-openssl-dir \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: soap --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sockets --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sodium --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvmsg --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvsem --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: sysvshm --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: tidy --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: 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: Version specific
|
||||||
|
# Type: GIT extension
|
||||||
|
&& git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \
|
||||||
|
&& cd /tmp/uploadprogress \
|
||||||
|
# Custom: Install command
|
||||||
|
&& true \
|
||||||
|
# FIXME: This is a work-around to mitigate compile error with PHP 8.0
|
||||||
|
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC)/)/g' || true \
|
||||||
|
&& rgrep -I 'TSRMLS_CC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_CC,/,/g' || true \
|
||||||
|
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC)/)/g' || true \
|
||||||
|
&& rgrep -I 'TSRMLS_DC' | cut -d':' -f1 | sort -u | xargs -n1 sed -i'' 's/TSRMLS_DC,/,/g' || true \
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --enable-uploadprogress \
|
||||||
|
&& make \
|
||||||
|
&& make install \
|
||||||
|
\
|
||||||
|
# Enabling
|
||||||
|
&& docker-php-ext-enable uploadprogress \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: xmlrpc --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: xsl --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------- Installing PHP Extension: zip --------------------
|
||||||
|
RUN set -eux \
|
||||||
|
# Installation: Generic
|
||||||
|
# Type: Built-in extension
|
||||||
|
# Custom: configure command
|
||||||
|
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
|
||||||
|
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Fix php.ini settings for enabled extensions
|
||||||
|
RUN set -eux \
|
||||||
|
&& chmod +x "$(php -r 'echo ini_get("extension_dir");')"/*
|
||||||
|
|
||||||
|
# Fix oracle dir for images that don't have oci installed
|
||||||
|
RUN set -eux \
|
||||||
|
&& mkdir -p /usr/lib/oracle/
|
||||||
|
|
||||||
|
# Shrink everything down
|
||||||
|
RUN set -eux \
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:8.0-base as final
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="8.0-mods"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-mods"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-mods"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy artifacts from builder
|
||||||
|
###
|
||||||
|
ARG EXT_DIR
|
||||||
|
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
|
||||||
|
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
|
||||||
|
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libaio1 \
|
||||||
|
libaspell15 \
|
||||||
|
libfbclient2 \
|
||||||
|
libffi6 \
|
||||||
|
libfreetype6 \
|
||||||
|
libicu57 \
|
||||||
|
libjpeg62-turbo \
|
||||||
|
libmemcachedutil2 \
|
||||||
|
libpng16-16 \
|
||||||
|
libpq5 \
|
||||||
|
libsybdb5 \
|
||||||
|
libtidy5 \
|
||||||
|
libvpx4 \
|
||||||
|
libwebp6 \
|
||||||
|
libxpm4 \
|
||||||
|
libxslt1.1 \
|
||||||
|
libzip4 \
|
||||||
|
snmp \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Post Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# ---------- oci8 ----------
|
||||||
|
&& ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \
|
||||||
|
&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \
|
||||||
|
&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \
|
||||||
|
&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \
|
||||||
|
\
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini \
|
||||||
|
\
|
||||||
|
&& php -m | grep -oiE '^bcmath$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^bcmath$' \
|
||||||
|
&& php -m | grep -oiE '^bz2$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^bz2$' \
|
||||||
|
&& php -m | grep -oiE '^calendar$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^calendar$' \
|
||||||
|
&& php -m | grep -oiE '^ctype$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ctype$' \
|
||||||
|
&& php -m | grep -oiE '^curl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^curl$' \
|
||||||
|
&& php -m | grep -oiE '^dba$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^dba$' \
|
||||||
|
&& php -m | grep -oiE '^dom$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^dom$' \
|
||||||
|
&& php -m | grep -oiE '^exif$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^exif$' \
|
||||||
|
&& php -m | grep -oiE '^ffi$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ffi$' \
|
||||||
|
&& php -m | grep -oiE '^fileinfo$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^fileinfo$' \
|
||||||
|
&& php -m | grep -oiE '^filter$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^filter$' \
|
||||||
|
&& php -m | grep -oiE '^ftp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ftp$' \
|
||||||
|
&& php -m | grep -oiE '^gd$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gd$' \
|
||||||
|
&& php -m | grep -oiE '^gettext$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gettext$' \
|
||||||
|
&& php -m | grep -oiE '^gmp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^gmp$' \
|
||||||
|
&& php -m | grep -oiE '^hash$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^hash$' \
|
||||||
|
&& php -m | grep -oiE '^iconv$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^iconv$' \
|
||||||
|
&& php -m | grep -oiE '^intl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^intl$' \
|
||||||
|
&& php -m | grep -oiE '^json$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^json$' \
|
||||||
|
&& php -m | grep -oiE '^ldap$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^ldap$' \
|
||||||
|
&& php -m | grep -oiE '^libxml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^libxml$' \
|
||||||
|
&& php -m | grep -oiE '^mbstring$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mbstring$' \
|
||||||
|
&& php -m | grep -oiE '^memcached$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^memcached$' \
|
||||||
|
&& php -m | grep -oiE '^mongodb$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mongodb$' \
|
||||||
|
&& php -m | grep -oiE '^mysqli$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mysqli$' \
|
||||||
|
&& php -m | grep -oiE '^mysqlnd$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^mysqlnd$' \
|
||||||
|
&& php -m | grep -oiE '^oci8$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^oci8$' \
|
||||||
|
&& php -m | grep -oiE '^Zend Opcache$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
|
||||||
|
&& php -m | grep -oiE '^openssl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^openssl$' \
|
||||||
|
&& php -m | grep -oiE '^pcntl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pcntl$' \
|
||||||
|
&& php -m | grep -oiE '^pcre$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pcre$' \
|
||||||
|
&& php -m | grep -oiE '^pdo$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_dblib$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_dblib$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_firebird$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_firebird$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_mysql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_mysql$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_oci$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_oci$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_pgsql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_pgsql$' \
|
||||||
|
&& php -m | grep -oiE '^pdo_sqlite$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \
|
||||||
|
&& php -m | grep -oiE '^pgsql$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pgsql$' \
|
||||||
|
&& php -m | grep -oiE '^phar$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^phar$' \
|
||||||
|
&& php -m | grep -oiE '^posix$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^posix$' \
|
||||||
|
&& php -m | grep -oiE '^pspell$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^pspell$' \
|
||||||
|
&& php -m | grep -oiE '^readline$' \
|
||||||
|
&& php -m | grep -oiE '^redis$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^redis$' \
|
||||||
|
&& php -m | grep -oiE '^reflection$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^reflection$' \
|
||||||
|
&& php -m | grep -oiE '^session$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^session$' \
|
||||||
|
&& php -m | grep -oiE '^shmop$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^shmop$' \
|
||||||
|
&& php -m | grep -oiE '^simplexml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^simplexml$' \
|
||||||
|
&& php -m | grep -oiE '^snmp$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^snmp$' \
|
||||||
|
&& php -m | grep -oiE '^soap$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^soap$' \
|
||||||
|
&& php -m | grep -oiE '^sockets$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sockets$' \
|
||||||
|
&& php -m | grep -oiE '^sodium$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sodium$' \
|
||||||
|
&& php -m | grep -oiE '^spl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^spl$' \
|
||||||
|
&& php -m | grep -oiE '^sysvmsg$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvmsg$' \
|
||||||
|
&& php -m | grep -oiE '^sysvsem$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvsem$' \
|
||||||
|
&& php -m | grep -oiE '^sysvshm$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^sysvshm$' \
|
||||||
|
&& php -m | grep -oiE '^tidy$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^tidy$' \
|
||||||
|
&& php -m | grep -oiE '^tokenizer$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^tokenizer$' \
|
||||||
|
&& php -m | grep -oiE '^uploadprogress$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^uploadprogress$' \
|
||||||
|
&& php -m | grep -oiE '^xml$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xml$' \
|
||||||
|
&& php -m | grep -oiE '^xmlreader$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlreader$' \
|
||||||
|
&& php -m | grep -oiE '^xmlrpc$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlrpc$' \
|
||||||
|
&& php -m | grep -oiE '^xmlwriter$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xmlwriter$' \
|
||||||
|
&& php -m | grep -oiE '^xsl$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^xsl$' \
|
||||||
|
&& php -m | grep -oiE '^zip$' \
|
||||||
|
&& php-fpm -m | grep -oiE '^zip$' \
|
||||||
|
&& true
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -6,43 +6,66 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -57,14 +80,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
96
Dockerfiles/prod/Dockerfile-7.4
Normal file
96
Dockerfiles/prod/Dockerfile-7.4
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:7.4-mods
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="7.4-prod"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-prod"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
locales-all \
|
||||||
|
postfix \
|
||||||
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
|
rsyslog \
|
||||||
|
socat \
|
||||||
|
supervisor \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& rm -rf /etc/supervisor* \
|
||||||
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||||
|
COPY ./data/postfix.sh /usr/local/sbin/postfix.sh
|
||||||
|
COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Volumes
|
||||||
|
###
|
||||||
|
VOLUME /var/log/php
|
||||||
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
96
Dockerfiles/prod/Dockerfile-8.0
Normal file
96
Dockerfiles/prod/Dockerfile-8.0
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:8.0-mods
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="8.0-prod"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-prod"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
locales-all \
|
||||||
|
postfix \
|
||||||
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
|
rsyslog \
|
||||||
|
socat \
|
||||||
|
supervisor \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& rm -rf /etc/supervisor* \
|
||||||
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||||
|
COPY ./data/postfix.sh /usr/local/sbin/postfix.sh
|
||||||
|
COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Volumes
|
||||||
|
###
|
||||||
|
VOLUME /var/log/php
|
||||||
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
49
Dockerfiles/prod/data/docker-entrypoint.d/310-custom-startup-scripts.sh
Executable file
49
Dockerfiles/prod/data/docker-entrypoint.d/310-custom-startup-scripts.sh
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Functions
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
###
|
||||||
|
### Execute custom uesr-supplied scripts
|
||||||
|
###
|
||||||
|
execute_custom_scripts() {
|
||||||
|
local script_dir="${1}"
|
||||||
|
local debug="${2}"
|
||||||
|
|
||||||
|
if [ ! -d "${script_dir}" ]; then
|
||||||
|
run "mkdir -p ${script_dir}" "${debug}"
|
||||||
|
fi
|
||||||
|
script_files="$( find -L "${script_dir}" -type f -iname '*.sh' )"
|
||||||
|
|
||||||
|
# loop over them line by line
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
for script_f in ${script_files}; do
|
||||||
|
script_name="$( basename "${script_f}" )"
|
||||||
|
log "info" "Executing custom startup script: ${script_name}" "${debug}"
|
||||||
|
if ! bash "${script_f}"; then
|
||||||
|
log "err" "Failed to execute script" "${debug}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Sanity Checks
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
if ! command -v find >/dev/null 2>&1; then
|
||||||
|
echo "find not found, but required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! command -v basename >/dev/null 2>&1; then
|
||||||
|
echo "basename not found, but required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -16,38 +16,38 @@ set -p pipefail
|
|||||||
# MY_GID
|
# MY_GID
|
||||||
|
|
||||||
# Path to scripts to source
|
# Path to scripts to source
|
||||||
CONFIG_DIR="/docker-entrypoint.d"
|
DVL_CONFIG_DIR="/docker-entrypoint.d"
|
||||||
|
|
||||||
# php.ini.d directory
|
# php.ini.d directory
|
||||||
PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||||
|
|
||||||
# php-fpm conf.d directory
|
# php-fpm conf.d directory
|
||||||
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
|
# This is the log file for any mail related functions
|
||||||
PHP_MAIL_LOG="/var/log/mail.log"
|
DVL_PHP_MAIL_LOG="/var/log/mail.log"
|
||||||
|
|
||||||
# This file holds error and access log definitions
|
# This file holds error and access log definitions
|
||||||
PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
||||||
PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
||||||
|
|
||||||
# PHP-FPM log dir
|
# PHP-FPM log dir
|
||||||
FPM_LOG_DIR="/var/log/php"
|
DVL_FPM_LOG_DIR="/var/log/php"
|
||||||
|
|
||||||
# Custom ini dir (to be copied to actual ini dir)
|
# Custom ini dir (to be copied to actual ini dir)
|
||||||
PHP_CUST_INI_DIR="/etc/php-custom.d"
|
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||||
|
|
||||||
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
||||||
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||||
|
|
||||||
# Supervisord config directory
|
# Supervisord config directory
|
||||||
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Source libs
|
### Source libs
|
||||||
###
|
###
|
||||||
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||||
for f in ${init}; do
|
for f in ${init}; do
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${f}"
|
. "${f}"
|
||||||
@@ -76,7 +76,7 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
|||||||
###
|
###
|
||||||
### Set timezone
|
### Set timezone
|
||||||
###
|
###
|
||||||
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -92,9 +92,9 @@ fi
|
|||||||
###
|
###
|
||||||
set_docker_logs \
|
set_docker_logs \
|
||||||
"DOCKER_LOGS" \
|
"DOCKER_LOGS" \
|
||||||
"${FPM_LOG_DIR}" \
|
"${DVL_FPM_LOG_DIR}" \
|
||||||
"${PHP_FPM_CONF_LOGFILE}" \
|
"${DVL_PHP_FPM_CONF_LOGFILE}" \
|
||||||
"${PHP_INI_CONF_LOGFILE}" \
|
"${DVL_PHP_INI_CONF_LOGFILE}" \
|
||||||
"${MY_USER}" \
|
"${MY_USER}" \
|
||||||
"${MY_GROUP}" \
|
"${MY_GROUP}" \
|
||||||
"${DEBUG_LEVEL}"
|
"${DEBUG_LEVEL}"
|
||||||
@@ -105,10 +105,10 @@ set_docker_logs \
|
|||||||
###
|
###
|
||||||
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
||||||
# PHP mail function should log to stderr
|
# PHP mail function should log to stderr
|
||||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||||
else
|
else
|
||||||
# PHP mail function should log to file
|
# PHP mail function should log to file
|
||||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
|
|||||||
supervisor_add_service \
|
supervisor_add_service \
|
||||||
"socat-${lport}-${rhost}-${rport}" \
|
"socat-${lport}-${rhost}-${rport}" \
|
||||||
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
||||||
"${SUPERVISOR_CONFD}" \
|
"${DVL_SUPERVISOR_CONFD}" \
|
||||||
"${DEBUG_LEVEL}"
|
"${DEBUG_LEVEL}"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -139,30 +139,30 @@ done
|
|||||||
### Supervisor: rsyslogd & postfix
|
### Supervisor: rsyslogd & postfix
|
||||||
###
|
###
|
||||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
||||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${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" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Supervisor: php-fpm
|
### Supervisor: php-fpm
|
||||||
###
|
###
|
||||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Copy custom *.ini files
|
### Copy custom *.ini files
|
||||||
###
|
###
|
||||||
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Copy custom PHP-FPM *.conf files
|
### Copy custom PHP-FPM *.conf files
|
||||||
###
|
###
|
||||||
if [ "${PHP_VERSION}" = "5.2" ]; then
|
if [ "${PHP_VERSION}" = "5.2" ]; then
|
||||||
copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
||||||
else
|
else
|
||||||
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -178,6 +178,14 @@ enable_modules "ENABLE_MODULES" "${DEBUG_LEVEL}"
|
|||||||
disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}"
|
disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Run custom user supplied scripts
|
||||||
|
###
|
||||||
|
execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}"
|
||||||
|
execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
###
|
###
|
||||||
### Startup
|
### Startup
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,36 +31,43 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||||
|
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +77,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +91,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,20 +110,52 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# ansible
|
### Install custom software
|
||||||
&& pip install --upgrade setuptools \
|
###
|
||||||
&& pip install ansible \
|
RUN set -eux \
|
||||||
|
# -------------------- pip --------------------
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# awesomeci
|
\
|
||||||
|
# -------------------- nvm --------------------
|
||||||
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
\
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -120,27 +164,20 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- gitflow --------------------
|
||||||
&& gem install scss_lint \
|
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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 \
|
||||||
@@ -149,15 +186,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -179,44 +217,184 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||||
\
|
\
|
||||||
# phpcs
|
\
|
||||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# sass
|
\
|
||||||
&& gem install sass \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# webpack
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||||
&& npm install -g webpack webpack-cli \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
# yamllint
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
&& pip install yamllint \
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
# cleanup
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- cleanup --------------------
|
||||||
&& rm -rf /home/${MY_USER}/.*json \
|
&& rm -rf /home/${MY_USER}/.*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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -224,7 +402,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -242,32 +420,65 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
# -------------------- Software --------------------
|
||||||
&& mdl --version | grep -E '[.0-9]+' \
|
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
|
||||||
&& scss-lint --version | grep -E '[.0-9]+' \
|
&& regex-grep --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]+' \
|
||||||
&& grunt --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]+' \
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -282,14 +493,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,43 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||||
|
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +77,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +91,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,22 +110,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# awesomeci
|
\
|
||||||
|
# -------------------- nvm --------------------
|
||||||
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
\
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -122,45 +167,34 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- drush7 --------------------
|
||||||
&& gem install scss_lint \
|
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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 \
|
||||||
@@ -169,15 +203,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -199,7 +234,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 \
|
||||||
@@ -210,51 +246,205 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||||
\
|
\
|
||||||
# phpcs
|
\
|
||||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
||||||
\
|
\
|
||||||
# sass
|
\
|
||||||
&& gem install sass \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# webpack
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||||
&& npm install -g webpack webpack-cli \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
# wpcli
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -262,7 +452,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -280,38 +470,72 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
||||||
&& grunt --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]+' \
|
||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -326,14 +550,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,43 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||||
|
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +77,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +91,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,22 +110,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# awesomeci
|
\
|
||||||
|
# -------------------- nvm --------------------
|
||||||
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
\
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -122,72 +167,63 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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 \
|
||||||
@@ -196,15 +232,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -226,65 +263,221 @@ 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
||||||
\
|
\
|
||||||
# sass
|
\
|
||||||
&& gem install sass \
|
# -------------------- 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -292,7 +485,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -310,28 +503,31 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -339,13 +535,44 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -360,14 +587,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,43 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \
|
||||||
|
&& echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +77,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +91,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +110,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,75 +167,67 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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 \
|
||||||
@@ -203,15 +236,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -233,69 +267,234 @@ 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) \
|
||||||
\
|
\
|
||||||
&& 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -303,7 +502,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -321,30 +520,32 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\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]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -352,14 +553,47 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -374,14 +608,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,42 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | 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://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
||||||
&& 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 \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +76,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +90,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +109,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,89 +166,81 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
&& rm -rf /usr/local/src/drush9/.git \
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
&& rm -rf /usr/local/src/drush9/docs \
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush9/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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,15 +249,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -247,69 +280,234 @@ 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) \
|
||||||
\
|
\
|
||||||
&& 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -317,7 +515,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -335,31 +533,33 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -367,14 +567,47 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -389,14 +622,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,42 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | 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://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
||||||
&& 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 \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,10 +76,11 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
@@ -75,14 +90,10 @@ RUN set -x \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +109,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,89 +166,81 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
&& rm -rf /usr/local/src/drush9/.git \
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
&& rm -rf /usr/local/src/drush9/docs \
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush9/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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,15 +249,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -247,69 +280,234 @@ 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) \
|
||||||
\
|
\
|
||||||
&& 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -317,7 +515,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -335,31 +533,33 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -367,14 +567,47 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -389,14 +622,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,42 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | 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://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
|
||||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
||||||
&& 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 \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,27 +76,24 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
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 \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +109,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,89 +166,81 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
&& rm -rf /usr/local/src/drush9/.git \
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
&& rm -rf /usr/local/src/drush9/docs \
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush9/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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,15 +249,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -247,69 +280,234 @@ 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) \
|
||||||
\
|
\
|
||||||
&& 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -317,7 +515,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -335,31 +533,33 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -367,14 +567,47 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -389,14 +622,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,42 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& 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 | 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 \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,27 +76,24 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
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 \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +109,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,89 +166,81 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
&& rm -rf /usr/local/src/drush9/.git \
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
&& rm -rf /usr/local/src/drush9/docs \
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush9/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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,15 +249,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -247,69 +280,234 @@ 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) \
|
||||||
\
|
\
|
||||||
&& 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
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -317,7 +515,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -335,31 +533,33 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
@@ -367,14 +567,47 @@ RUN set -x \
|
|||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -389,14 +622,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
@@ -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,36 +31,42 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
&& echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \
|
\
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
&& curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
&& echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list \
|
|
||||||
&& curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \
|
|
||||||
&& 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 | 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 \
|
||||||
&& apt-get update \
|
\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -62,27 +76,24 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
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 \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -98,26 +109,55 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
# composer
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# ansible
|
\
|
||||||
&& pip install --upgrade setuptools \
|
# -------------------- pip --------------------
|
||||||
&& pip install ansible \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
\
|
\
|
||||||
# asgardcms
|
\
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
# -------------------- nvm --------------------
|
||||||
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/asgardcms \
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
\
|
\
|
||||||
# awesomeci
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
&& 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) \
|
||||||
@@ -126,89 +166,81 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/awesome-ci \
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
\
|
\
|
||||||
&& gem install mixlib-config -v 2.2.4 \
|
\
|
||||||
&& gem install mdl \
|
# -------------------- deployer --------------------
|
||||||
&& gem install scss_lint \
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
&& npm install -g eslint \
|
|
||||||
&& npm install -g jsonlint \
|
|
||||||
&& npm install -g mdlint \
|
|
||||||
&& npm install -g gulp \
|
|
||||||
\
|
|
||||||
# codeception
|
|
||||||
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
|
|
||||||
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
|
|
||||||
\
|
|
||||||
# deployer
|
|
||||||
&& curl 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 \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
&& rm -rf /usr/local/src/drush7/.git \
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
&& rm -rf /usr/local/src/drush7/docs \
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush7/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
&& rm -rf /usr/local/src/drush8/.git \
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
&& rm -rf /usr/local/src/drush8/docs \
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush8/tests \
|
|
||||||
\
|
\
|
||||||
# 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' ) \
|
||||||
\
|
\
|
||||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
&& rm -rf /usr/local/src/drush9/.git \
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
&& rm -rf /usr/local/src/drush9/docs \
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
&& 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 \
|
||||||
&& rm -rf /usr/local/src/drush9/tests \
|
|
||||||
\
|
\
|
||||||
# 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 \
|
||||||
\
|
\
|
||||||
# grunt
|
\
|
||||||
&& npm install -g grunt grunt-cli \
|
# -------------------- 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' \
|
&& 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 \
|
&& 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
|
\
|
||||||
|
# -------------------- 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,15 +249,16 @@ RUN set -x \
|
|||||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
&& 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 update' \
|
|
||||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
\
|
\
|
||||||
# mhsendmail
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
&& 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) \
|
||||||
@@ -247,58 +280,221 @@ RUN set -x \
|
|||||||
&& cd / \
|
&& cd / \
|
||||||
&& rm -rf /usr/local/src/mysqldump-secure \
|
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||||
\
|
\
|
||||||
# phpcs
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcs \
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
\
|
\
|
||||||
# phpcbf
|
\
|
||||||
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
&& chmod +x /usr/local/bin/phpcbf \
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
\
|
\
|
||||||
# phpunit
|
\
|
||||||
|
# -------------------- php-cs-fixer --------------------
|
||||||
|
&& curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/php-cs-fixer \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- 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 \
|
|
||||||
\
|
|
||||||
# sass
|
|
||||||
&& gem install sass \
|
|
||||||
# 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 \
|
||||||
# webpack
|
\
|
||||||
&& npm install -g webpack webpack-cli \
|
# -------------------- wkhtmltopdf --------------------
|
||||||
# wpcli
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
&& 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 \
|
||||||
# yamllint
|
\
|
||||||
&& apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \
|
# -------------------- cleanup --------------------
|
||||||
&& pip install yamllint \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \
|
|
||||||
# cleanup
|
|
||||||
&& 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 \
|
||||||
&& rm -rf /home/${MY_USER}/.config \
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
&& rm -rf /home/${MY_USER}/.drush \
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
&& rm -rf /home/${MY_USER}/.gem \
|
|
||||||
&& rm -rf /home/${MY_USER}/.npm \
|
|
||||||
&& rm -rf /home/${MY_USER}/.subversion \
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /root/.*json \
|
&& rm -rf /root/.*json \
|
||||||
&& rm -rf /root/.cache \
|
&& rm -rf /root/.cache \
|
||||||
&& rm -rf /root/.composer \
|
&& rm -rf /root/.composer \
|
||||||
&& rm -rf /root/.config \
|
&& rm -rf /root/.config \
|
||||||
&& rm -rf /root/.drush \
|
&& rm -rf /root/.drush \
|
||||||
&& rm -rf /root/.gem \
|
|
||||||
&& rm -rf /root/.npm \
|
|
||||||
&& rm -rf /root/.subversion \
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
\
|
\
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
\
|
\
|
||||||
&& true
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -306,7 +502,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -324,45 +520,80 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \
|
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
&& ansible --version | grep -E '^ansible [.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]+' \
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.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 -E 'Deployer\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*$' \
|
||||||
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
&& git-flow version | grep -E '[.0-9]+' \
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
&& grunt --version | grep -E '[.0-9]+' \
|
|
||||||
&& 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]+' \
|
||||||
&& 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+' \
|
||||||
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
&& photon --version | grep -E 'Installer [.0-9]+' \
|
|
||||||
&& sass --version | grep -E '[.0-9]+' \
|
|
||||||
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
&& webpack --version | grep -E '[.0-9]+' \
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
&& true
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -377,14 +608,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
628
Dockerfiles/work/Dockerfile-7.4
Normal file
628
Dockerfiles/work/Dockerfile-7.4
Normal file
@@ -0,0 +1,628 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:7.4-prod
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="7.4-work"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-work"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-work"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Envs
|
||||||
|
###
|
||||||
|
ENV BASH_PROFILE=".bashrc"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Tools
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
|
dirmngr \
|
||||||
|
gnupg \
|
||||||
|
\
|
||||||
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
ack-grep \
|
||||||
|
aspell \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
|
build-essential \
|
||||||
|
bzip2 \
|
||||||
|
coreutils \
|
||||||
|
dnsutils \
|
||||||
|
dos2unix \
|
||||||
|
file \
|
||||||
|
gawk \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
git-flow \
|
||||||
|
git-svn \
|
||||||
|
graphviz \
|
||||||
|
hostname \
|
||||||
|
htop \
|
||||||
|
imagemagick \
|
||||||
|
iputils-ping \
|
||||||
|
jq \
|
||||||
|
less \
|
||||||
|
libc-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libyaml-dev \
|
||||||
|
make \
|
||||||
|
mongodb-org-shell \
|
||||||
|
mongodb-org-tools \
|
||||||
|
moreutils \
|
||||||
|
mysql-client \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
netcat \
|
||||||
|
openssh-client \
|
||||||
|
patch \
|
||||||
|
patchelf \
|
||||||
|
postgresql-client \
|
||||||
|
redis-tools \
|
||||||
|
rsync \
|
||||||
|
rubygems \
|
||||||
|
ruby-dev \
|
||||||
|
shellcheck \
|
||||||
|
silversearcher-ag \
|
||||||
|
subversion \
|
||||||
|
sudo \
|
||||||
|
tig \
|
||||||
|
tree \
|
||||||
|
unzip \
|
||||||
|
vim \
|
||||||
|
w3m \
|
||||||
|
wget \
|
||||||
|
whois \
|
||||||
|
xz-utils \
|
||||||
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
|
zsh \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
|
\
|
||||||
|
# -------------------- pip --------------------
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- nvm --------------------
|
||||||
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
\
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
|
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
||||||
|
&& cd /usr/local/src/awesome-ci \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& ./configure --prefix=/usr/local \
|
||||||
|
&& make install \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- deployer --------------------
|
||||||
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
|
&& chmod +x /usr/local/bin/dep \
|
||||||
|
\
|
||||||
|
# -------------------- drush7 --------------------
|
||||||
|
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||||
|
&& cd /usr/local/src/drush7 \
|
||||||
|
&& git checkout 7.4.0 \
|
||||||
|
\
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush7/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush7/misc \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- drush8 --------------------
|
||||||
|
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||||
|
&& cd /usr/local/src/drush8 \
|
||||||
|
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||||
|
\
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush8/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush8/misc \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- drush9 --------------------
|
||||||
|
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||||
|
&& cd /usr/local/src/drush9 \
|
||||||
|
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||||
|
\
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush9/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush9/misc \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- drupalconsole --------------------
|
||||||
|
&& curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \
|
||||||
|
&& chmod +x /usr/local/bin/drupal \
|
||||||
|
\
|
||||||
|
# -------------------- gitflow --------------------
|
||||||
|
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||||
|
&& cd /tmp/gitflow \
|
||||||
|
&& make install \
|
||||||
|
&& cd / && rm -rf /tmp/gitflow \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- laravel --------------------
|
||||||
|
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
\
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \
|
||||||
|
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||||
|
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- linkcheck --------------------
|
||||||
|
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||||
|
&& chmod +x /usr/local/bin/linkcheck \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- linuxbrew --------------------
|
||||||
|
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
|
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||||
|
&& chmod +x mhsendmail_linux_amd64 \
|
||||||
|
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- mysqldumpsecure --------------------
|
||||||
|
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||||
|
&& cd /usr/local/src/mysqldump-secure \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \
|
||||||
|
&& touch /var/log/mysqldump-secure.log \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.conf \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.cnf \
|
||||||
|
&& chmod 0644 /var/log/mysqldump-secure.log \
|
||||||
|
&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- phpunit --------------------
|
||||||
|
&& curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- symfony --------------------
|
||||||
|
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||||
|
&& chmod +x /usr/local/bin/symfony \
|
||||||
|
\
|
||||||
|
# -------------------- wkhtmltopdf --------------------
|
||||||
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
|
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||||
|
&& chmod +x /usr/local/bin/wp \
|
||||||
|
\
|
||||||
|
# -------------------- cleanup --------------------
|
||||||
|
&& rm -rf /home/${MY_USER}/.*json \
|
||||||
|
&& rm -rf /home/${MY_USER}/.cache \
|
||||||
|
&& rm -rf /home/${MY_USER}/.composer \
|
||||||
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.*json \
|
||||||
|
&& rm -rf /root/.cache \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.config \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- asgardcms --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/asgardcms/asgardcms-installer/asgardcms /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- codeception --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- lumen --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require laravel/lumen-installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/laravel/lumen-installer/lumen /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- photon --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require photoncms/installer \
|
||||||
|
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/ \
|
||||||
|
\
|
||||||
|
# -------------------- prestissimo --------------------
|
||||||
|
&& COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Configure Bash
|
||||||
|
###
|
||||||
|
RUN \
|
||||||
|
{ \
|
||||||
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
|
echo "export PATH"; \
|
||||||
|
echo ". /etc/bash-devilbox"; \
|
||||||
|
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||||
|
echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \
|
||||||
|
echo " if [ -r \"\${f}\" ]; then"; \
|
||||||
|
echo " . \"\${f}\""; \
|
||||||
|
echo " fi"; \
|
||||||
|
echo " done"; \
|
||||||
|
echo " unset f"; \
|
||||||
|
echo "fi"; \
|
||||||
|
} | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
|
||||||
|
&& regex-grep --version | grep -E '[.0-9]+' \
|
||||||
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
|
||||||
|
&& drush7 --version | grep -E '7[.0-9]+\s*$' \
|
||||||
|
&& drush8 --version | grep -E '8[.0-9]+\s*$' \
|
||||||
|
&& drush9 --version | grep -E '9[.0-9]+\s*$' \
|
||||||
|
&& drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \
|
||||||
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
|
&& laravel --version | grep -E '(Installer|version)\s*[.0-9]+' \
|
||||||
|
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
|
||||||
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
|
||||||
|
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
|
||||||
|
&& phpcs --version | grep -E 'version [.0-9]+' \
|
||||||
|
&& phpcbf --version | grep -E 'version [.0-9]+' \
|
||||||
|
&& phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \
|
||||||
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
&& asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+' \
|
||||||
|
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
|
||||||
|
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[.0-9]+$' \
|
||||||
|
&& photon --version | grep -E 'Installer [.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/php-ini.d/php-7.4.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||||
|
COPY ./data/php-fpm.conf/php-fpm-7.4.conf /usr/local/etc/php-fpm.conf
|
||||||
|
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||||
|
COPY ./data/bash-devilbox /etc/bash-devilbox
|
||||||
|
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Volumes
|
||||||
|
###
|
||||||
|
VOLUME /shared/backups
|
||||||
|
VOLUME /var/log/php
|
||||||
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to start inside the container
|
||||||
|
###
|
||||||
|
WORKDIR /shared/httpd
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
537
Dockerfiles/work/Dockerfile-8.0
Normal file
537
Dockerfiles/work/Dockerfile-8.0
Normal file
@@ -0,0 +1,537 @@
|
|||||||
|
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
|
||||||
|
FROM devilbox/php-fpm:8.0-prod
|
||||||
|
MAINTAINER "cytopia" <cytopia@everythingcli.org>
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Labels
|
||||||
|
###
|
||||||
|
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||||
|
#LABEL "org.opencontainers.image.created"=""
|
||||||
|
#LABEL "org.opencontainers.image.version"=""
|
||||||
|
#LABEL "org.opencontainers.image.revision"=""
|
||||||
|
LABEL "maintainer"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.authors"="cytopia <cytopia@everythingcli.org>"
|
||||||
|
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
|
||||||
|
LABEL "org.opencontainers.image.vendor"="devilbox"
|
||||||
|
LABEL "org.opencontainers.image.licenses"="MIT"
|
||||||
|
LABEL "org.opencontainers.image.ref.name"="8.0-work"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-work"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-work"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Envs
|
||||||
|
###
|
||||||
|
ENV BASH_PROFILE=".bashrc"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Tools
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
|
dirmngr \
|
||||||
|
gnupg \
|
||||||
|
\
|
||||||
|
&& echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \
|
||||||
|
&& curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||||
|
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||||
|
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||||
|
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||||
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||||
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||||
|
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
ack-grep \
|
||||||
|
aspell \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
|
build-essential \
|
||||||
|
bzip2 \
|
||||||
|
coreutils \
|
||||||
|
dnsutils \
|
||||||
|
dos2unix \
|
||||||
|
file \
|
||||||
|
gawk \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
git-flow \
|
||||||
|
git-svn \
|
||||||
|
graphviz \
|
||||||
|
hostname \
|
||||||
|
htop \
|
||||||
|
imagemagick \
|
||||||
|
iputils-ping \
|
||||||
|
jq \
|
||||||
|
less \
|
||||||
|
libc-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libyaml-dev \
|
||||||
|
make \
|
||||||
|
mongodb-org-shell \
|
||||||
|
mongodb-org-tools \
|
||||||
|
moreutils \
|
||||||
|
mysql-client \
|
||||||
|
nano \
|
||||||
|
net-tools \
|
||||||
|
netcat \
|
||||||
|
openssh-client \
|
||||||
|
patch \
|
||||||
|
patchelf \
|
||||||
|
postgresql-client \
|
||||||
|
redis-tools \
|
||||||
|
rsync \
|
||||||
|
rubygems \
|
||||||
|
ruby-dev \
|
||||||
|
shellcheck \
|
||||||
|
silversearcher-ag \
|
||||||
|
subversion \
|
||||||
|
sudo \
|
||||||
|
tig \
|
||||||
|
tree \
|
||||||
|
unzip \
|
||||||
|
vim \
|
||||||
|
w3m \
|
||||||
|
wget \
|
||||||
|
whois \
|
||||||
|
xz-utils \
|
||||||
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
|
zsh \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install custom software
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- composer --------------------
|
||||||
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
|
\
|
||||||
|
# -------------------- pip --------------------
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- nvm --------------------
|
||||||
|
&& git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
\
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- awesomeci --------------------
|
||||||
|
&& git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
||||||
|
&& cd /usr/local/src/awesome-ci \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& ./configure --prefix=/usr/local \
|
||||||
|
&& make install \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- deployer --------------------
|
||||||
|
&& curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \
|
||||||
|
&& chmod +x /usr/local/bin/dep \
|
||||||
|
\
|
||||||
|
# -------------------- gitflow --------------------
|
||||||
|
&& git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||||
|
&& cd /tmp/gitflow \
|
||||||
|
&& make install \
|
||||||
|
&& cd / && rm -rf /tmp/gitflow \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- linkcheck --------------------
|
||||||
|
&& curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||||
|
&& chmod +x /usr/local/bin/linkcheck \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- linuxbrew --------------------
|
||||||
|
&& git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- mhsendmail --------------------
|
||||||
|
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||||
|
&& chmod +x mhsendmail_linux_amd64 \
|
||||||
|
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- mysqldumpsecure --------------------
|
||||||
|
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||||
|
&& cd /usr/local/src/mysqldump-secure \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \
|
||||||
|
&& touch /var/log/mysqldump-secure.log \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.conf \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.cnf \
|
||||||
|
&& chmod 0644 /var/log/mysqldump-secure.log \
|
||||||
|
&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- phpcs --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- phpcbf --------------------
|
||||||
|
&& curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- symfony --------------------
|
||||||
|
&& curl https://symfony.com/installer -L -o /usr/local/bin/symfony \
|
||||||
|
&& chmod +x /usr/local/bin/symfony \
|
||||||
|
\
|
||||||
|
# -------------------- wkhtmltopdf --------------------
|
||||||
|
&& VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
\
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
# -------------------- wpcli --------------------
|
||||||
|
&& curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \
|
||||||
|
&& chmod +x /usr/local/bin/wp \
|
||||||
|
\
|
||||||
|
# -------------------- cleanup --------------------
|
||||||
|
&& rm -rf /home/${MY_USER}/.*json \
|
||||||
|
&& rm -rf /home/${MY_USER}/.cache \
|
||||||
|
&& rm -rf /home/${MY_USER}/.composer \
|
||||||
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.*json \
|
||||||
|
&& rm -rf /root/.cache \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.config \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& (rm -rf /root/.gem || true ) \
|
||||||
|
&& (rm -rf /root/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- angular_cli --------------------
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; npm install -g @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 gem (Ruby)
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- mixlib_config --------------------
|
||||||
|
&& gem install mixlib-config -v 2.2.4 \
|
||||||
|
\
|
||||||
|
# -------------------- rb_inotify --------------------
|
||||||
|
&& gem install rb-inotify -v 0.9.10 \
|
||||||
|
\
|
||||||
|
# -------------------- mdl --------------------
|
||||||
|
&& gem install mdl -v 0.5.0 \
|
||||||
|
\
|
||||||
|
# -------------------- scss_lint --------------------
|
||||||
|
&& gem install scss_lint -v 0.57.1 \
|
||||||
|
\
|
||||||
|
# -------------------- sass --------------------
|
||||||
|
&& gem install sass \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.gem \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- ansible --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall ansible \
|
||||||
|
\
|
||||||
|
# -------------------- yamllint --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yamllint \
|
||||||
|
\
|
||||||
|
# -------------------- yq --------------------
|
||||||
|
&& pip install --no-cache-dir --force-reinstall yq \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.cache/pip \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Configure Bash
|
||||||
|
###
|
||||||
|
RUN \
|
||||||
|
{ \
|
||||||
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
|
echo "export PATH"; \
|
||||||
|
echo ". /etc/bash-devilbox"; \
|
||||||
|
echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \
|
||||||
|
echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \
|
||||||
|
echo " if [ -r \"\${f}\" ]; then"; \
|
||||||
|
echo " . \"\${f}\""; \
|
||||||
|
echo " fi"; \
|
||||||
|
echo " done"; \
|
||||||
|
echo " unset f"; \
|
||||||
|
echo "fi"; \
|
||||||
|
} | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Verify
|
||||||
|
###
|
||||||
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
|
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \
|
||||||
|
&& /usr/local/sbin/php-fpm --test \
|
||||||
|
\
|
||||||
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
RUN set -eux \
|
||||||
|
# -------------------- Software --------------------
|
||||||
|
&& composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \
|
||||||
|
&& regex-grep --version | grep -E '[.0-9]+' \
|
||||||
|
&& dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+' \
|
||||||
|
&& git-flow version | grep -E '[.0-9]+' \
|
||||||
|
&& linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \
|
||||||
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \
|
||||||
|
&& mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \
|
||||||
|
&& phpcs --version | grep -E 'version [.0-9]+' \
|
||||||
|
&& phpcbf --version | grep -E 'version [.0-9]+' \
|
||||||
|
&& symfony --version | grep -E 'version\s*[.0-9]+' \
|
||||||
|
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \
|
||||||
|
&& wp --allow-root --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
&& ansible --version | grep -E '^ansible [.0-9]+$' \
|
||||||
|
&& yamllint --version 2>&1 | grep -E '[.0-9]+' \
|
||||||
|
&& yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \
|
||||||
|
\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
&& ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \
|
||||||
|
&& eslint -v | grep -E '[.0-9]+' \
|
||||||
|
&& grunt --version | grep -E '[.0-9]+' \
|
||||||
|
&& gulp --version | grep -E '[.0-9]+' \
|
||||||
|
&& jsonlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& pm2 --no-daemon --version | grep -E '[.0-9]+' \
|
||||||
|
&& mdlint --version | grep -E '[.0-9]+' \
|
||||||
|
&& vue --version | grep -E '[.0-9]+' \
|
||||||
|
&& webpack --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- GEM --------------------
|
||||||
|
&& mdl --version | grep -E '[.0-9]+' \
|
||||||
|
&& sass --version | grep -E '[.0-9]+' \
|
||||||
|
\
|
||||||
|
# -------------------- Cleanup --------------------
|
||||||
|
&& rm -rf /home/devilbox/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Copy files
|
||||||
|
###
|
||||||
|
COPY ./data/php-ini.d/php-8.0.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
|
||||||
|
COPY ./data/php-fpm.conf/php-fpm-8.0.conf /usr/local/etc/php-fpm.conf
|
||||||
|
|
||||||
|
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/
|
||||||
|
COPY ./data/bash-devilbox /etc/bash-devilbox
|
||||||
|
COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Volumes
|
||||||
|
###
|
||||||
|
VOLUME /shared/backups
|
||||||
|
VOLUME /var/log/php
|
||||||
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Ports
|
||||||
|
###
|
||||||
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Where to start inside the container
|
||||||
|
###
|
||||||
|
WORKDIR /shared/httpd
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Entrypoint
|
||||||
|
###
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
@@ -19,7 +19,7 @@ _clr_usr='\[\e[0;31m\]'
|
|||||||
_clr_ver='\[\e[0;36m\]'
|
_clr_ver='\[\e[0;36m\]'
|
||||||
_clr_dir='\[\e[0;34m\]'
|
_clr_dir='\[\e[0;34m\]'
|
||||||
_clr_off='\[\e[0m\]'
|
_clr_off='\[\e[0m\]'
|
||||||
PS1_PHP="$( php -v 2>/dev/null | grep -Eo '^PHP\s([-_.a-z0-9])+' )"
|
PS1_PHP="$( php -v 2>/dev/null | grep -Eo '^PHP\s([-_.a-zA-Z0-9])+' )"
|
||||||
PS1_PHP="${PS1_PHP//PHP[[:space:]]}"
|
PS1_PHP="${PS1_PHP//PHP[[:space:]]}"
|
||||||
PS1_USR="$( whoami )"
|
PS1_USR="$( whoami )"
|
||||||
PS1="${_clr_usr}${PS1_USR}${_clr_off}@${_clr_ver}php-${PS1_PHP}${_clr_off} in ${_clr_dir}\w${_clr_off} \$ "
|
PS1="${_clr_usr}${PS1_USR}${_clr_off}@${_clr_ver}php-${PS1_PHP}${_clr_off} in ${_clr_dir}\w${_clr_off} \$ "
|
||||||
@@ -27,42 +27,33 @@ PS1="${_clr_usr}${PS1_USR}${_clr_off}@${_clr_ver}php-${PS1_PHP}${_clr_off} in ${
|
|||||||
|
|
||||||
# Show Intro
|
# Show Intro
|
||||||
echo
|
echo
|
||||||
echo "--------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------------------"
|
||||||
echo " _ _ _ _ "
|
echo " _ _ _ _ "
|
||||||
echo " | | (_) | | "
|
echo " | | (_) | | "
|
||||||
echo " __| | _____ ___| | |__ _____ __"
|
echo " __| | _____ ___| | |__ _____ __"
|
||||||
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ \\/ /"
|
echo " / _\` |/ _ \\ \\ / / | | '_ \\ / _ \\ \\/ /"
|
||||||
echo " | (_| | __/\\ V /| | | |_) | (_) > < "
|
echo " | (_| | __/\\ V /| | | |_) | (_) > < "
|
||||||
echo " \\__,_|\\___| \\_/ |_|_|_.__/ \\___/_/\\_\\"
|
echo " \\__,_|\\___| \\_/ |_|_|_.__/ \\___/_/\\_\\"
|
||||||
echo " "
|
echo " "
|
||||||
echo " http://devilbox.org"
|
echo " http://devilbox.org"
|
||||||
|
echo " https://devilbox.readthedocs.io"
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo " | Available Tools | Project website |"
|
echo
|
||||||
echo " |------------------|------------------------------|"
|
echo " Available Tools"
|
||||||
echo " | awesome-ci | gh: cytopia/awesome-ci |"
|
echo " https://devilbox.readthedocs.io/en/latest/readings/available-tools.html"
|
||||||
echo " | composer | https://getcomposer.org |"
|
echo
|
||||||
echo " | drupal-console | https://drupalconsole.com |"
|
echo " How to work inside this PHP container"
|
||||||
echo " | drush | http://www.drush.org |"
|
echo " https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html"
|
||||||
echo " | eslint | https://eslint.org |"
|
|
||||||
echo " | git | https://git-scm.com |"
|
|
||||||
echo " | laravel | gh: laravel/installer |"
|
|
||||||
echo " | linuxbrew | http://linuxbrew.sh |"
|
|
||||||
echo " | mysqldump-secure | https://mysqldump-secure.org |"
|
|
||||||
echo " | node | https://nodejs.org |"
|
|
||||||
echo " | npm | https://www.npmjs.com |"
|
|
||||||
echo " | phalcon-devtools | gh: phalcon/phalcon-devtools |"
|
|
||||||
echo " | symfony installer| gh: symfony/symfony-installer|"
|
|
||||||
echo " | webpack | gh: webpack/webpack |"
|
|
||||||
echo " | wpcli | https://wp-cli.org |"
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo " | Available Dirs | Description |"
|
|
||||||
echo " |------------------|------------------------------|"
|
|
||||||
echo " | /shared/httpd | Project base directory |"
|
|
||||||
echo " | /shared/backups | Backup directory |"
|
|
||||||
echo " | /var/mail | Email directory |"
|
|
||||||
echo " | /var/log | Log file directory |"
|
|
||||||
echo
|
echo
|
||||||
echo "--------------------------------------------------------------------------------"
|
echo " | Available Dirs | Description |"
|
||||||
|
echo " |------------------|------------------------------|"
|
||||||
|
echo " | /shared/httpd | Project base directory |"
|
||||||
|
echo " | /shared/backups | Backup directory |"
|
||||||
|
echo " | /var/mail | Email directory |"
|
||||||
|
echo " | /var/log | Log file directory |"
|
||||||
|
echo
|
||||||
|
echo "------------------------------------------------------------------------------------------"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ set_mds_settings() {
|
|||||||
else
|
else
|
||||||
mds_pass_val="$( env_get "${mds_pass_var}" )"
|
mds_pass_val="$( env_get "${mds_pass_var}" )"
|
||||||
log "info" "\$${mds_pass_var} set for mysqldump-secure. Changing to '******'" "${debug}"
|
log "info" "\$${mds_pass_var} set for mysqldump-secure. Changing to '******'" "${debug}"
|
||||||
run "sed -i'' 's/^password.*/password = ${mds_pass_val}/g' ${mds_cnf}" "${debug}"
|
run "perl -pi -e 's/^password.*/password = ${mds_pass_val}/g' ${mds_cnf}" "${debug}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MySQL host
|
# MySQL host
|
||||||
@@ -16,38 +16,38 @@ set -p pipefail
|
|||||||
# MY_GID
|
# MY_GID
|
||||||
|
|
||||||
# Path to scripts to source
|
# Path to scripts to source
|
||||||
CONFIG_DIR="/docker-entrypoint.d"
|
DVL_CONFIG_DIR="/docker-entrypoint.d"
|
||||||
|
|
||||||
# php.ini.d directory
|
# php.ini.d directory
|
||||||
PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
DVL_PHP_INI_DIR="/usr/local/etc/php/conf.d"
|
||||||
|
|
||||||
# php-fpm conf.d directory
|
# php-fpm conf.d directory
|
||||||
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
|
# This is the log file for any mail related functions
|
||||||
PHP_MAIL_LOG="/var/log/mail.log"
|
DVL_PHP_MAIL_LOG="/var/log/mail.log"
|
||||||
|
|
||||||
# This file holds error and access log definitions
|
# This file holds error and access log definitions
|
||||||
PHP_FPM_CONF_LOGFILE="${PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
DVL_PHP_FPM_CONF_LOGFILE="${DVL_PHP_FPM_DIR}/zzz-entrypoint-logfiles.conf"
|
||||||
PHP_INI_CONF_LOGFILE="${PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
DVL_PHP_INI_CONF_LOGFILE="${DVL_PHP_INI_DIR}/zzz-entrypoint-logfiles.ini"
|
||||||
|
|
||||||
# PHP-FPM log dir
|
# PHP-FPM log dir
|
||||||
FPM_LOG_DIR="/var/log/php"
|
DVL_FPM_LOG_DIR="/var/log/php"
|
||||||
|
|
||||||
# Custom ini dir (to be copied to actual ini dir)
|
# Custom ini dir (to be copied to actual ini dir)
|
||||||
PHP_CUST_INI_DIR="/etc/php-custom.d"
|
DVL_PHP_CUST_INI_DIR="/etc/php-custom.d"
|
||||||
|
|
||||||
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
# Custom PHP-FPM dir (to be copied to actual FPM conf dir)
|
||||||
PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
DVL_PHP_CUST_FPM_DIR="/etc/php-fpm-custom.d"
|
||||||
|
|
||||||
# Supervisord config directory
|
# Supervisord config directory
|
||||||
SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
DVL_SUPERVISOR_CONFD="/etc/supervisor/conf.d"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Source libs
|
### Source libs
|
||||||
###
|
###
|
||||||
init="$( find "${CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
init="$( find "${DVL_CONFIG_DIR}" -name '*.sh' -type f | sort -u )"
|
||||||
for f in ${init}; do
|
for f in ${init}; do
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${f}"
|
. "${f}"
|
||||||
@@ -76,7 +76,7 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}"
|
|||||||
###
|
###
|
||||||
### Set timezone
|
### Set timezone
|
||||||
###
|
###
|
||||||
set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
set_timezone "TIMEZONE" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -92,9 +92,9 @@ fi
|
|||||||
###
|
###
|
||||||
set_docker_logs \
|
set_docker_logs \
|
||||||
"DOCKER_LOGS" \
|
"DOCKER_LOGS" \
|
||||||
"${FPM_LOG_DIR}" \
|
"${DVL_FPM_LOG_DIR}" \
|
||||||
"${PHP_FPM_CONF_LOGFILE}" \
|
"${DVL_PHP_FPM_CONF_LOGFILE}" \
|
||||||
"${PHP_INI_CONF_LOGFILE}" \
|
"${DVL_PHP_INI_CONF_LOGFILE}" \
|
||||||
"${MY_USER}" \
|
"${MY_USER}" \
|
||||||
"${MY_GROUP}" \
|
"${MY_GROUP}" \
|
||||||
"${DEBUG_LEVEL}"
|
"${DEBUG_LEVEL}"
|
||||||
@@ -105,10 +105,10 @@ set_docker_logs \
|
|||||||
###
|
###
|
||||||
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
if is_docker_logs_enabled "DOCKER_LOGS" >/dev/null; then
|
||||||
# PHP mail function should log to stderr
|
# PHP mail function should log to stderr
|
||||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "/proc/self/fd/2" "1" "${DEBUG_LEVEL}"
|
||||||
else
|
else
|
||||||
# PHP mail function should log to file
|
# PHP mail function should log to file
|
||||||
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${PHP_INI_DIR}" "${PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
set_postfix "ENABLE_MAIL" "${MY_USER}" "${MY_GROUP}" "${DVL_PHP_INI_DIR}" "${DVL_PHP_MAIL_LOG}" "0" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ for line in $( port_forward_get_lines "FORWARD_PORTS_TO_LOCALHOST" ); do
|
|||||||
supervisor_add_service \
|
supervisor_add_service \
|
||||||
"socat-${lport}-${rhost}-${rport}" \
|
"socat-${lport}-${rhost}-${rport}" \
|
||||||
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
"/usr/bin/socat tcp-listen:${lport},reuseaddr,fork tcp:${rhost}:${rport}" \
|
||||||
"${SUPERVISOR_CONFD}" \
|
"${DVL_SUPERVISOR_CONFD}" \
|
||||||
"${DEBUG_LEVEL}"
|
"${DEBUG_LEVEL}"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -139,30 +139,30 @@ done
|
|||||||
### Supervisor: rsyslogd & postfix
|
### Supervisor: rsyslogd & postfix
|
||||||
###
|
###
|
||||||
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
if [ "$( env_get "ENABLE_MAIL" )" = "1" ]; then
|
||||||
supervisor_add_service "rsyslogd" "/usr/sbin/rsyslogd -n" "${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" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
supervisor_add_service "postfix" "/usr/local/sbin/postfix.sh" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Supervisor: php-fpm
|
### Supervisor: php-fpm
|
||||||
###
|
###
|
||||||
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
supervisor_add_service "php-fpm" "/usr/local/sbin/php-fpm" "${DVL_SUPERVISOR_CONFD}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Copy custom *.ini files
|
### Copy custom *.ini files
|
||||||
###
|
###
|
||||||
copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
copy_ini_files "${DVL_PHP_CUST_INI_DIR}" "${DVL_PHP_INI_DIR}" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Copy custom PHP-FPM *.conf files
|
### Copy custom PHP-FPM *.conf files
|
||||||
###
|
###
|
||||||
if [ "${PHP_VERSION}" = "5.2" ]; then
|
if [ "${PHP_VERSION}" = "5.2" ]; then
|
||||||
copy_fpm_5_2_conf_file "${PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
copy_fpm_5_2_conf_file "${DVL_PHP_CUST_FPM_DIR}/php-fpm.xml" "${DEBUG_LEVEL}"
|
||||||
else
|
else
|
||||||
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
copy_fpm_files "${DVL_PHP_CUST_FPM_DIR}" "${DVL_PHP_FPM_DIR}" "${DEBUG_LEVEL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -206,6 +206,13 @@ run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}"
|
|||||||
update_ca_certificates "/ca" "${DEBUG_LEVEL}"
|
update_ca_certificates "/ca" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Run custom user supplied scripts
|
||||||
|
###
|
||||||
|
execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}"
|
||||||
|
execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Startup
|
### Startup
|
||||||
###
|
###
|
||||||
|
|||||||
134
Dockerfiles/work/data/php-fpm.conf/php-fpm-7.4.conf
Normal file
134
Dockerfiles/work/data/php-fpm.conf/php-fpm-7.4.conf
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings can be overwritten by later includes
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Timeouts
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; The timeout for serving a single request after which the worker process will be killed.
|
||||||
|
; This option should be used when the 'max_execution_time' ini option does not stop script
|
||||||
|
; execution for some reason.
|
||||||
|
request_terminate_timeout = 120s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Logging
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
error_log = /proc/self/fd/2
|
||||||
|
log_level = notice
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; if we send this to /proc/self/fd/1, it never appears
|
||||||
|
access.log = /proc/self/fd/2
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Backlog configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; A maximum of backlog incoming connections will be queued for processing.
|
||||||
|
; If a connection request arrives with the queue full the client may receive an error with an
|
||||||
|
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
|
||||||
|
; the request may be ignored so that retries may succeed.
|
||||||
|
|
||||||
|
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
|
||||||
|
; are silently truncated
|
||||||
|
listen.backlog = 1024
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Worker configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; static - the number of child processes is fixed (pm.max_children).
|
||||||
|
;
|
||||||
|
; dynamic - the number of child processes is set dynamically based on the following directives:
|
||||||
|
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
|
||||||
|
;
|
||||||
|
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
|
||||||
|
; pm.start_servers are started when the service is started.
|
||||||
|
pm = ondemand
|
||||||
|
|
||||||
|
; The maximum number of child processes to be created
|
||||||
|
pm.max_children = 50
|
||||||
|
|
||||||
|
; The number of child processes created on startup. Used only when pm is set to dynamic.
|
||||||
|
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
|
||||||
|
pm.start_servers = 4
|
||||||
|
|
||||||
|
; The desired minimum number of idle server processes.
|
||||||
|
pm.min_spare_servers = 2
|
||||||
|
|
||||||
|
; The desired maximum number of idle server processes.
|
||||||
|
pm.max_spare_servers = 6
|
||||||
|
|
||||||
|
; The number of requests each child process should execute before respawning.
|
||||||
|
; This can be useful to work around memory leaks in 3rd party libraries.
|
||||||
|
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||||
|
; Default value: 0.
|
||||||
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
|
||||||
|
pm.process_idle_timeout = 10s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Include
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
|
||||||
|
[global]
|
||||||
|
include = /usr/local/etc/php-fpm.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings overwrite any includes again
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Required for Dockerization
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
daemonize = no
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Keep env variables set by docker
|
||||||
|
clear_env = no
|
||||||
|
|
||||||
|
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||||
|
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||||
|
; Note: on highloaded environement, this can cause some delay in the page
|
||||||
|
; process time (several ms).
|
||||||
|
; Default Value: no
|
||||||
|
catch_workers_output = yes
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; User and Group
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
user = devilbox
|
||||||
|
group = devilbox
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Networking
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Ensure to listen here
|
||||||
|
listen = 9000
|
||||||
134
Dockerfiles/work/data/php-fpm.conf/php-fpm-8.0.conf
Normal file
134
Dockerfiles/work/data/php-fpm.conf/php-fpm-8.0.conf
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings can be overwritten by later includes
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Timeouts
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; The timeout for serving a single request after which the worker process will be killed.
|
||||||
|
; This option should be used when the 'max_execution_time' ini option does not stop script
|
||||||
|
; execution for some reason.
|
||||||
|
request_terminate_timeout = 120s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Logging
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
error_log = /proc/self/fd/2
|
||||||
|
log_level = notice
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; if we send this to /proc/self/fd/1, it never appears
|
||||||
|
access.log = /proc/self/fd/2
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Backlog configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; A maximum of backlog incoming connections will be queued for processing.
|
||||||
|
; If a connection request arrives with the queue full the client may receive an error with an
|
||||||
|
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
|
||||||
|
; the request may be ignored so that retries may succeed.
|
||||||
|
|
||||||
|
; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
|
||||||
|
; are silently truncated
|
||||||
|
listen.backlog = 1024
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Worker configuration
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; static - the number of child processes is fixed (pm.max_children).
|
||||||
|
;
|
||||||
|
; dynamic - the number of child processes is set dynamically based on the following directives:
|
||||||
|
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
|
||||||
|
;
|
||||||
|
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
|
||||||
|
; pm.start_servers are started when the service is started.
|
||||||
|
pm = ondemand
|
||||||
|
|
||||||
|
; The maximum number of child processes to be created
|
||||||
|
pm.max_children = 50
|
||||||
|
|
||||||
|
; The number of child processes created on startup. Used only when pm is set to dynamic.
|
||||||
|
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
|
||||||
|
pm.start_servers = 4
|
||||||
|
|
||||||
|
; The desired minimum number of idle server processes.
|
||||||
|
pm.min_spare_servers = 2
|
||||||
|
|
||||||
|
; The desired maximum number of idle server processes.
|
||||||
|
pm.max_spare_servers = 6
|
||||||
|
|
||||||
|
; The number of requests each child process should execute before respawning.
|
||||||
|
; This can be useful to work around memory leaks in 3rd party libraries.
|
||||||
|
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||||
|
; Default value: 0.
|
||||||
|
pm.max_requests = 500
|
||||||
|
|
||||||
|
; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
|
||||||
|
pm.process_idle_timeout = 10s
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Include
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
|
||||||
|
[global]
|
||||||
|
include = /usr/local/etc/php-fpm.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
; ################################################################################
|
||||||
|
; ####
|
||||||
|
; #### The following settings overwrite any includes again
|
||||||
|
; ####
|
||||||
|
; ################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Required for Dockerization
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[global]
|
||||||
|
daemonize = no
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Keep env variables set by docker
|
||||||
|
clear_env = no
|
||||||
|
|
||||||
|
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||||
|
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||||
|
; Note: on highloaded environement, this can cause some delay in the page
|
||||||
|
; process time (several ms).
|
||||||
|
; Default Value: no
|
||||||
|
catch_workers_output = yes
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; User and Group
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
user = devilbox
|
||||||
|
group = devilbox
|
||||||
|
|
||||||
|
|
||||||
|
; ############################################################
|
||||||
|
; Networking
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
[www]
|
||||||
|
; Ensure to listen here
|
||||||
|
listen = 9000
|
||||||
49
Dockerfiles/work/data/php-ini.d/php-7.4.ini
Normal file
49
Dockerfiles/work/data/php-ini.d/php-7.4.ini
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
; ############################################################
|
||||||
|
; # Devilbox PHP defaults for 7.4-work
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||||
|
; If none is present, the one from the previous flavour is inherited.
|
||||||
|
|
||||||
|
|
||||||
|
[PHP]
|
||||||
|
|
||||||
|
; Memory
|
||||||
|
; Note: "memory_limit" should be larger than "post_max_size"
|
||||||
|
memory_limit = 512M
|
||||||
|
|
||||||
|
|
||||||
|
; Timeouts
|
||||||
|
max_execution_time = 120
|
||||||
|
max_input_time = 120
|
||||||
|
|
||||||
|
|
||||||
|
; Uploads
|
||||||
|
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||||
|
post_max_size = 72M
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
max_file_uploads = 20
|
||||||
|
|
||||||
|
|
||||||
|
; Vars
|
||||||
|
variables_order = EGPCS
|
||||||
|
max_input_vars = 8000
|
||||||
|
max_input_nesting_level = 64
|
||||||
|
|
||||||
|
|
||||||
|
; Error reporting
|
||||||
|
; Note: error_log is dynamic and handled during start to set appropriate setting
|
||||||
|
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
|
||||||
|
xmlrpc_errors = Off
|
||||||
|
report_memleaks = On
|
||||||
|
display_errors = On
|
||||||
|
display_startup_errors = On
|
||||||
|
log_errors = On
|
||||||
|
html_errors = On
|
||||||
|
|
||||||
|
|
||||||
|
; Xdebug settings
|
||||||
|
xdebug.default_enable = Off
|
||||||
|
xdebug.profiler_enable = Off
|
||||||
|
xdebug.remote_enable = Off
|
||||||
|
xdebug.remote_autostart = Off
|
||||||
49
Dockerfiles/work/data/php-ini.d/php-8.0.ini
Normal file
49
Dockerfiles/work/data/php-ini.d/php-8.0.ini
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
; ############################################################
|
||||||
|
; # Devilbox PHP defaults for 8.0-work
|
||||||
|
; ############################################################
|
||||||
|
|
||||||
|
; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
|
||||||
|
; If none is present, the one from the previous flavour is inherited.
|
||||||
|
|
||||||
|
|
||||||
|
[PHP]
|
||||||
|
|
||||||
|
; Memory
|
||||||
|
; Note: "memory_limit" should be larger than "post_max_size"
|
||||||
|
memory_limit = 512M
|
||||||
|
|
||||||
|
|
||||||
|
; Timeouts
|
||||||
|
max_execution_time = 120
|
||||||
|
max_input_time = 120
|
||||||
|
|
||||||
|
|
||||||
|
; Uploads
|
||||||
|
; Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||||
|
post_max_size = 72M
|
||||||
|
upload_max_filesize = 64M
|
||||||
|
max_file_uploads = 20
|
||||||
|
|
||||||
|
|
||||||
|
; Vars
|
||||||
|
variables_order = EGPCS
|
||||||
|
max_input_vars = 8000
|
||||||
|
max_input_nesting_level = 64
|
||||||
|
|
||||||
|
|
||||||
|
; Error reporting
|
||||||
|
; Note: error_log is dynamic and handled during start to set appropriate setting
|
||||||
|
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
|
||||||
|
xmlrpc_errors = Off
|
||||||
|
report_memleaks = On
|
||||||
|
display_errors = On
|
||||||
|
display_startup_errors = On
|
||||||
|
log_errors = On
|
||||||
|
html_errors = On
|
||||||
|
|
||||||
|
|
||||||
|
; Xdebug settings
|
||||||
|
xdebug.default_enable = Off
|
||||||
|
xdebug.profiler_enable = Off
|
||||||
|
xdebug.remote_enable = Off
|
||||||
|
xdebug.remote_autostart = Off
|
||||||
671
Makefile
671
Makefile
@@ -1,429 +1,290 @@
|
|||||||
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 "\n"
|
@echo
|
||||||
@printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image"
|
@echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0',"
|
||||||
@printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image"
|
@echo " '7.1', '7.2', '7.3', '7.4', '8.0'."
|
||||||
@printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image"
|
@echo " For gen-readme target it is optional and if not"
|
||||||
@printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image"
|
@echo " specified, it will generate for all versions."
|
||||||
@printf "%s\n" "make build-mods-56: Build PHP 5.6 mods image"
|
@echo
|
||||||
@printf "%s\n" "make build-mods-70: Build PHP 7.0 mods image"
|
@echo "FAIL_FAST Either 'True' or 'False' (defaults to 'False')."
|
||||||
@printf "%s\n" "make build-mods-71: Build PHP 7.1 mods image"
|
@echo " If set to 'True', each module install has an"
|
||||||
@printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image"
|
@echo " immediate check, which is very slow for CI, but"
|
||||||
@printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image"
|
@echo " yields errors immediately."
|
||||||
@printf "\n"
|
@echo " If set to 'False', checks are done at the end."
|
||||||
@printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image"
|
@echo
|
||||||
@printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image"
|
@echo "ARGS Can be added to all build-* and rebuild-* targets"
|
||||||
@printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image"
|
@echo " to supply additional docker build options."
|
||||||
@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 "\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 "\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 "\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 "\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 "\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"
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# 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
|
--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
|
--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
|
--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
|
$(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
|
-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-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-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
|
|
||||||
|
|
||||||
|
|
||||||
|
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 \
|
||||||
|
-f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods;
|
||||||
build-mods-52:
|
else
|
||||||
docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods
|
docker build $(NO_CACHE) \
|
||||||
build-mods-53:
|
--target $(TARGET) \
|
||||||
docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods
|
--label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \
|
||||||
build-mods-54:
|
--label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \
|
||||||
docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods
|
--label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \
|
||||||
build-mods-55:
|
$(ARGS) \
|
||||||
docker build -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods
|
-t $(IMAGE):$(VERSION)-mods \
|
||||||
build-mods-56:
|
-f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods
|
||||||
docker build -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods
|
endif
|
||||||
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-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-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-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-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-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-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
|
|
||||||
|
|
||||||
|
|
||||||
|
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';)
|
|
||||||
|
|
||||||
|
|
||||||
###
|
# -------------------------------------------------------------------------------------------------
|
||||||
### 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
|
rebuild-base: NO_CACHE=--no-cache
|
||||||
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
|
rebuild-base: build-base
|
||||||
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-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
|
|
||||||
|
|
||||||
|
|
||||||
###
|
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-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-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-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-mods: _check-image-exists
|
||||||
|
test-mods: _check-version
|
||||||
|
./tests/test.sh ${VERSION} mods
|
||||||
|
|
||||||
|
|
||||||
|
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';)
|
||||||
|
|||||||
182
README.md
182
README.md
@@ -1,21 +1,65 @@
|
|||||||
# PHP-FPM Docker images
|
# PHP-FPM Docker images
|
||||||
|
|
||||||
[](https://travis-ci.org/devilbox/docker-php-fpm)
|
[](https://travis-ci.org/devilbox/docker-php-fpm)
|
||||||
[](https://github.com/devilbox/docker-php-fpm/releases)
|
[](https://github.com/devilbox/docker-php-fpm/releases)
|
||||||
[](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://github.com/devilbox/docker-php-fpm)
|
[](https://devilbox.discourse.group)
|
||||||
[](https://microbadger.com/images/devilbox/php-fpm "php-fpm")
|
[](https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
**[devilbox/docker-php-fpm](https://github.com/devilbox/docker-php-fpm)**
|
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
| Docker Hub | Upstream Project |
|
| Docker Hub | Upstream Project |
|
||||||
|------------|------------------|
|
|------------|------------------|
|
||||||
| <a href="https://hub.docker.com/r/devilbox/php-fpm"><img height="82px" src="http://dockeri.co/image/devilbox/php-fpm" /></a> | <a href="https://github.com/cytopia/devilbox" ><img height="82px" src="https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png" /></a> |
|
| <a href="https://hub.docker.com/r/devilbox/php-fpm"><img height="82px" src="http://dockeri.co/image/devilbox/php-fpm" /></a> | <a href="https://github.com/cytopia/devilbox" ><img height="82px" src="https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png" /></a> |
|
||||||
|
|
||||||
---
|
#### Base Images
|
||||||
|
|
||||||
|
Have a look at the following Devilbox base images for which no official versions exist yet, but are required to serve as a foundation for this repository:
|
||||||
|
|
||||||
|
* [PHP-FPM 5.2](https://github.com/devilbox/docker-php-fpm-5.2)
|
||||||
|
* [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3)
|
||||||
|
* [PHP-FPM 7.4](https://github.com/devilbox/docker-php-fpm-7.4)
|
||||||
|
* [PHP-FPM 8.0](https://github.com/devilbox/docker-php-fpm-8.0)
|
||||||
|
|
||||||
|
#### Documentation
|
||||||
|
|
||||||
|
In case you seek help, go and visit the community pages.
|
||||||
|
|
||||||
|
<table width="100%" style="width:100%; display:table;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="33%" style="width:33%;"><h3><a target="_blank" href="https://devilbox.readthedocs.io">Documentation</a></h3></th>
|
||||||
|
<th width="33%" style="width:33%;"><h3><a target="_blank" href="https://gitter.im/devilbox/Lobby">Chat</a></h3></th>
|
||||||
|
<th width="33%" style="width:33%;"><h3><a target="_blank" href="https://devilbox.discourse.group">Forum</a></h3></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody style="vertical-align: middle; text-align: center;">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://devilbox.readthedocs.io">
|
||||||
|
<img title="Documentation" name="Documentation" src="https://raw.githubusercontent.com/cytopia/icons/master/400x400/readthedocs.png" />
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://gitter.im/devilbox/Lobby">
|
||||||
|
<img title="Chat on Gitter" name="Chat on Gitter" src="https://raw.githubusercontent.com/cytopia/icons/master/400x400/gitter.png" />
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a target="_blank" href="https://devilbox.discourse.group">
|
||||||
|
<img title="Devilbox Forums" name="Forum" src="https://raw.githubusercontent.com/cytopia/icons/master/400x400/discourse.png" />
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="_blank" href="https://devilbox.readthedocs.io">devilbox.readthedocs.io</a></td>
|
||||||
|
<td><a target="_blank" href="https://gitter.im/devilbox/Lobby">gitter.im/devilbox</a></td>
|
||||||
|
<td><a target="_blank" href="https://devilbox.discourse.group">devilbox.discourse.group</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
#### Table of Contents
|
#### Table of Contents
|
||||||
|
|
||||||
@@ -173,7 +217,7 @@ The following table shows a more complete overview about the offered Docker imag
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="9"><strong>base</strong></td>
|
<td rowspan="11"><strong>base</strong></td>
|
||||||
<td><code>devilbox/php-fpm:5.2-base</code></td>
|
<td><code>devilbox/php-fpm:5.2-base</code></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-base.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-base.svg" /></a>
|
||||||
@@ -235,9 +279,23 @@ The following table shows a more complete overview about the offered Docker imag
|
|||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-base.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-base.svg" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:7.4-base</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.4-base.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.4-base.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:8.0-base</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.0-base.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-base.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="9"><strong>mods</strong></td>
|
<td rowspan="11"><strong>mods</strong></td>
|
||||||
<td><code>devilbox/php-fpm:5.2-mods</code></td>
|
<td><code>devilbox/php-fpm:5.2-mods</code></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-mods.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-mods.svg" /></a>
|
||||||
@@ -300,9 +358,23 @@ The following table shows a more complete overview about the offered Docker imag
|
|||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-mods.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-mods.svg" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:7.4-mods</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.4-mods.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.4-mods.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:8.0-mods</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.0-mods.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-mods.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="9"><strong>prod</strong></td>
|
<td rowspan="11"><strong>prod</strong></td>
|
||||||
<td><code>devilbox/php-fpm:5.2-prod</code></td>
|
<td><code>devilbox/php-fpm:5.2-prod</code></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-prod.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-prod.svg" /></a>
|
||||||
@@ -365,9 +437,23 @@ The following table shows a more complete overview about the offered Docker imag
|
|||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-prod.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-prod.svg" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:7.4-prod</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.4-prod.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.4-prod.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:8.0-prod</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.0-prod.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-prod.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="9"><strong>work</strong></td>
|
<td rowspan="11"><strong>work</strong></td>
|
||||||
<td><code>devilbox/php-fpm:5.2-work</code></td>
|
<td><code>devilbox/php-fpm:5.2-work</code></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-work.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.2-work.svg" /></a>
|
||||||
@@ -430,6 +516,20 @@ The following table shows a more complete overview about the offered Docker imag
|
|||||||
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-work.svg" /></a>
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-work.svg" /></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:7.4-work</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.4-work.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.4-work.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>devilbox/php-fpm:8.0-work</code></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:8.0-work.svg" /></a>
|
||||||
|
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:8.0-work.svg" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -498,47 +598,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, 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, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, 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, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, 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, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, 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, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, 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, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, 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, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, 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, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, 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, 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, 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, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, 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="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, 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>
|
||||||
</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, 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, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, 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="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, 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>
|
||||||
</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, 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, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, 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, sodium, SPL, sqlite3, 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, 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>
|
||||||
</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, 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, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, 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, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, 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, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, 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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>7.4</th>
|
||||||
|
<td id="74-base">Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
|
||||||
|
<td id="74-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, 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, 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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>8.0</th>
|
||||||
|
<td id="80-base">Core, ctype, curl, date, dom, FFI, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
|
||||||
|
<td id="80-mods">bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, 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>
|
||||||
@@ -558,6 +668,8 @@ docker pull devilbox/php-fpm:7.0-base
|
|||||||
docker pull devilbox/php-fpm:7.1-base
|
docker pull devilbox/php-fpm:7.1-base
|
||||||
docker pull devilbox/php-fpm:7.2-base
|
docker pull devilbox/php-fpm:7.2-base
|
||||||
docker pull devilbox/php-fpm:7.3-base
|
docker pull devilbox/php-fpm:7.3-base
|
||||||
|
docker pull devilbox/php-fpm:7.4-base
|
||||||
|
docker pull devilbox/php-fpm:8.0-base
|
||||||
```
|
```
|
||||||
|
|
||||||
Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub>
|
Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub>
|
||||||
@@ -573,6 +685,8 @@ docker pull devilbox/php-fpm:7.0-mods
|
|||||||
docker pull devilbox/php-fpm:7.1-mods
|
docker pull devilbox/php-fpm:7.1-mods
|
||||||
docker pull devilbox/php-fpm:7.2-mods
|
docker pull devilbox/php-fpm:7.2-mods
|
||||||
docker pull devilbox/php-fpm:7.3-mods
|
docker pull devilbox/php-fpm:7.3-mods
|
||||||
|
docker pull devilbox/php-fpm:7.4-mods
|
||||||
|
docker pull devilbox/php-fpm:8.0-mods
|
||||||
```
|
```
|
||||||
|
|
||||||
Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub></td>
|
Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub></td>
|
||||||
@@ -588,6 +702,8 @@ docker pull devilbox/php-fpm:7.0-prod
|
|||||||
docker pull devilbox/php-fpm:7.1-prod
|
docker pull devilbox/php-fpm:7.1-prod
|
||||||
docker pull devilbox/php-fpm:7.2-prod
|
docker pull devilbox/php-fpm:7.2-prod
|
||||||
docker pull devilbox/php-fpm:7.3-prod
|
docker pull devilbox/php-fpm:7.3-prod
|
||||||
|
docker pull devilbox/php-fpm:7.4-prod
|
||||||
|
docker pull devilbox/php-fpm:8.0-prod
|
||||||
```
|
```
|
||||||
|
|
||||||
Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting.
|
Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting.
|
||||||
@@ -603,6 +719,8 @@ docker pull devilbox/php-fpm:7.0-work
|
|||||||
docker pull devilbox/php-fpm:7.1-work
|
docker pull devilbox/php-fpm:7.1-work
|
||||||
docker pull devilbox/php-fpm:7.2-work
|
docker pull devilbox/php-fpm:7.2-work
|
||||||
docker pull devilbox/php-fpm:7.3-work
|
docker pull devilbox/php-fpm:7.3-work
|
||||||
|
docker pull devilbox/php-fpm:7.4-work
|
||||||
|
docker pull devilbox/php-fpm:8.0-work
|
||||||
```
|
```
|
||||||
|
|
||||||
Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this.
|
Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this.
|
||||||
@@ -664,7 +782,7 @@ Have a look at the following table to see all supported environment variables fo
|
|||||||
<td><code>ENABLE_MODULES</code></td>
|
<td><code>ENABLE_MODULES</code></td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
<td><code>''</code></td>
|
<td><code>''</code></td>
|
||||||
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=ioncube</code></td>
|
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=blackfire, ioncube</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>DISABLE_MODULES</code></td>
|
<td><code>DISABLE_MODULES</code></td>
|
||||||
@@ -723,18 +841,26 @@ Have a look at the following table to see all offered volumes for each Docker im
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="5"><strong>prod</strong><br/><br/><strong>work</strong></td>
|
<td rowspan="7"><strong>prod</strong><br/><br/><strong>work</strong></td>
|
||||||
<td><code>/etc/php-custom.d</code></td>
|
<td><code>/etc/php-custom.d</code></td>
|
||||||
<td>Mount this directory into your host computer and add custom <code>\*.ini</code> files in order to alter php behaviour.</td>
|
<td>Mount this directory into your host computer and add custom <code>\*.ini</code> files in order to alter php behaviour.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>/etc/php-fpm-custom.d</code></td>
|
<td><code>/etc/php-fpm-custom.d</code></td>
|
||||||
<td>Mount this directory into your host computer and add custom PHP-FOM <code>\*.conf</code> files in order to alter PHP-FPM behaviour.</td>
|
<td>Mount this directory into your host computer and add custom PHP-FPM <code>\*.conf</code> files in order to alter PHP-FPM behaviour.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>/etc/php-modules.d</code></td>
|
<td><code>/etc/php-modules.d</code></td>
|
||||||
<td>Mount this directory into your host computer and add custo <code>\*.so</code> files in order to add your php modules.<br/><br/><strong>Note:</strong>Your should then also provide a custom <code>\*.ini</code> file in order to actually load your custom provided module.</td>
|
<td>Mount this directory into your host computer and add custo <code>\*.so</code> files in order to add your php modules.<br/><br/><strong>Note:</strong>Your should then also provide a custom <code>\*.ini</code> file in order to actually load your custom provided module.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>/startup.1.d</code></td>
|
||||||
|
<td>Any executable scripts ending by <code>\*.sh</code> found in this directory will be executed during startup. This is useful to supply additional commands (such as installing custom software) when the container starts up. (will run before <code>/startup.2.d</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>/startup.2.d</code></td>
|
||||||
|
<td>Any executable scripts ending by <code>\*.sh</code> found in this directory will be executed during startup. This is useful to supply additional commands (such as installing custom software) when the container starts up. (will run after <code>/startup.1.d</code>)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>/var/log/php</code></td>
|
<td><code>/var/log/php</code></td>
|
||||||
<td>When setting environment variable <code>DOCKER_LOGS</code> to <code>0</code>, log files will be available under this directory.</td>
|
<td>When setting environment variable <code>DOCKER_LOGS</code> to <code>0</code>, log files will be available under this directory.</td>
|
||||||
@@ -874,6 +1000,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
|
|||||||
<td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td>
|
<td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td>
|
||||||
<td>Json command line linter.</td>
|
<td>Json command line linter.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://stedolan.github.io/jq/">jq</a></td>
|
||||||
|
<td>Command-line JSON processor.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://github.com/laravel/installer">laravel installer</a></td>
|
<td><a href="https://github.com/laravel/installer">laravel installer</a></td>
|
||||||
<td>A CLI tool to easily install and manage the laravel framework.</td>
|
<td>A CLI tool to easily install and manage the laravel framework.</td>
|
||||||
@@ -918,6 +1048,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc
|
|||||||
<td><a href="https://github.com/squizlabs/PHP_CodeSniffer">phpcbf</a></td>
|
<td><a href="https://github.com/squizlabs/PHP_CodeSniffer">phpcbf</a></td>
|
||||||
<td>PHP Code Beautifier and Fixer.</td>
|
<td>PHP Code Beautifier and Fixer.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# 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.3 %}
|
{% elif php_version == 7.4 %}
|
||||||
FROM devilbox/php-fpm-7.3
|
FROM devilbox/php-fpm-7.4
|
||||||
|
{% elif php_version == 8.0 %}
|
||||||
|
FROM devilbox/php-fpm-8.0
|
||||||
{% else %}
|
{% else %}
|
||||||
FROM php:{{ php_version }}-fpm
|
FROM php:{{ php_version }}-fpm
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -14,12 +16,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"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -35,7 +45,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}
|
||||||
|
|
||||||
@@ -43,17 +53,25 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
### Upgrade (install ps)
|
### Upgrade (install ps)
|
||||||
###
|
###
|
||||||
RUN set -x \
|
{% if php_version in [5.2, 5.3, 5.4, 5.5] %}
|
||||||
&& apt-get update \
|
RUN set -eux \
|
||||||
&& apt-get upgrade -y \
|
&& rm -f /etc/apt/sources.list \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
|
&& { \
|
||||||
|
echo "deb http://ftp.debian.org/debian jessie main"; \
|
||||||
|
echo "#deb http://ftp.debian.org/debian jessie-updates main"; \
|
||||||
|
echo "deb http://security.debian.org/debian-security jessie/updates main"; \
|
||||||
|
} | tee /etc/apt/sources.list
|
||||||
|
{% endif %}
|
||||||
|
RUN set -eux \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### 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 \
|
||||||
@@ -76,11 +94,21 @@ 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -1,199 +1,430 @@
|
|||||||
# 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>
|
|
||||||
|
|
||||||
|
|
||||||
|
{#
|
||||||
|
###################################################################################################
|
||||||
|
Loop over enabled build dependencies and gather build dependencies
|
||||||
|
###################################################################################################
|
||||||
|
#}
|
||||||
|
{%- set build_deps = [] -%}
|
||||||
|
{%- for ext in extensions_enabled -%}
|
||||||
|
{#- Not disabled AND not already available by default -#}
|
||||||
|
{%- 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 build dependency available? -#}
|
||||||
|
{%- if php_version in extensions_available[ext] and 'build_dep' in extensions_available[ext][php_version] -%}
|
||||||
|
{%- for build_dep in extensions_available[ext][php_version]['build_dep'] -%}
|
||||||
|
{#- Append build dependencies to our array -#}
|
||||||
|
{{- build_deps.append(build_dep) -}}
|
||||||
|
{%- endfor -%}
|
||||||
|
{#- Generic build dependency available? -#}
|
||||||
|
{%- elif 'all' in extensions_available[ext] and 'build_dep' in extensions_available[ext]['all'] -%}
|
||||||
|
{%- for build_dep in extensions_available[ext]['all']['build_dep'] -%}
|
||||||
|
{#- Append build dependencies to our array -#}
|
||||||
|
{{- build_deps.append(build_dep) -}}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- 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 %}
|
||||||
|
{{ build_dep }} \
|
||||||
|
{% endfor %}
|
||||||
|
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
|
||||||
|
|
||||||
|
{# 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
|
### 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 }}-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"="{{ php_version }}-mods"
|
||||||
|
LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-mods"
|
||||||
|
LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-mods"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Envs
|
### Copy artifacts from builder
|
||||||
###
|
###
|
||||||
ENV BUILD_DEPS \
|
ARG EXT_DIR
|
||||||
{# Loop over enabled build dependencies #}
|
COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/
|
||||||
{% for ext in extensions_enabled %}
|
COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
|
||||||
{# Not disabled #}
|
COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||||
{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
|
|
||||||
{# Version specific build dependency available? #}
|
|
||||||
{% if php_version in extensions_available[ext] and 'build_dep' in extensions_available[ext][php_version] %}
|
|
||||||
{% for build_dep in extensions_available[ext][php_version]['build_dep'] %}
|
|
||||||
{{ build_dep }} \
|
|
||||||
{% endfor %}
|
|
||||||
{# Generic build dependency available? #}
|
|
||||||
{% elif 'all' in extensions_available[ext] and 'build_dep' in extensions_available[ext]['all'] %}
|
|
||||||
{% for build_dep in extensions_available[ext]['all']['build_dep'] %}
|
|
||||||
{{ build_dep }} \
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
ca-certificates \
|
|
||||||
git
|
|
||||||
|
|
||||||
ENV RUN_DEPS \
|
|
||||||
{# Loop over enabled run-time dependencies #}
|
|
||||||
{% for ext in extensions_enabled %}
|
|
||||||
{# Not disabled #}
|
|
||||||
{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
|
|
||||||
{# Version specific run-time dependency available? #}
|
|
||||||
{% if php_version in extensions_available[ext] and 'run_dep' in extensions_available[ext][php_version] %}
|
|
||||||
{% for run_dep in extensions_available[ext][php_version]['run_dep'] %}
|
|
||||||
{{ run_dep }} \
|
|
||||||
{% endfor %}
|
|
||||||
{# Generic run-time dependency available? #}
|
|
||||||
{% elif 'all' in extensions_available[ext] and 'run_dep' in extensions_available[ext]['all'] %}
|
|
||||||
{% for run_dep in extensions_available[ext]['all']['run_dep'] %}
|
|
||||||
{{ run_dep }} \
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
ca-certificates
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Install
|
### Install
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
${BUILD_DEPS} \
|
{# Loop over enabled run-time dependencies -#}
|
||||||
\
|
{%- set run_deps = [] -%}
|
||||||
\
|
{%- for ext in extensions_enabled -%}
|
||||||
{# Loop over enabled extensions #}
|
{#- Not disabled -#}
|
||||||
{% for ext in extensions_enabled %}
|
{%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) -%}
|
||||||
{# Not disabled #}
|
{#- Version specific run-time dependency available? -#}
|
||||||
{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
|
{%- if php_version in extensions_available[ext] and 'run_dep' in extensions_available[ext][php_version] -%}
|
||||||
{# ---------- Pre Command ---------- #}
|
{%- for run_dep in extensions_available[ext][php_version]['run_dep'] -%}
|
||||||
{# Version specific pre-command available? #}
|
{#- Append run dependencies to our array -#}
|
||||||
{% if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] %}
|
{{- run_deps.append(run_dep) -}}
|
||||||
&& {{ extensions_available[ext][php_version]['pre'] }} \
|
{%- endfor -%}
|
||||||
{# Generic pre-command available? #}
|
{#- Generic run-time dependency available? -#}
|
||||||
{% elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %}
|
{%- elif 'all' in extensions_available[ext] and 'run_dep' in extensions_available[ext]['all'] -%}
|
||||||
&& {{ extensions_available[ext]['all']['pre'] }} \
|
{%- for run_dep in extensions_available[ext]['all']['run_dep'] -%}
|
||||||
{% endif %}
|
{#- Append run dependencies to our array -#}
|
||||||
{# ---------- Installation (specific) ---------- #}
|
{{- run_deps.append(run_dep) -}}
|
||||||
{% if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] %}
|
{%- endfor -%}
|
||||||
{# ---- 1.) Builtin ---- #}
|
{%- endif -%}
|
||||||
{% if extensions_available[ext][php_version]['type'] == 'builtin' %}
|
{%- endif -%}
|
||||||
{% if 'configure' in extensions_available[ext][php_version] %}
|
{%- endfor -%}
|
||||||
&& /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \
|
{% for run_dep in run_deps | unique | sort %}
|
||||||
{% endif %}
|
{{ run_dep }} \
|
||||||
&& /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 -v {{ 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 }} \
|
|
||||||
&& cd / && rm -rf /tmp/{{ 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 -v {{ 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 }} \
|
|
||||||
&& cd / && rm -rf /tmp/{{ ext }} \
|
|
||||||
{# ---- 4.) CUSTOM ---- #}
|
|
||||||
{% elif extensions_available[ext]['all']['type'] == 'custom' %}
|
|
||||||
&& {{ extensions_available[ext]['all']['command'] }} \
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
\
|
ca-certificates \
|
||||||
\
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
|
||||||
${BUILD_DEPS} \
|
|
||||||
\
|
|
||||||
\
|
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
|
||||||
${RUN_DEPS} \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& update-ca-certificates \
|
\
|
||||||
&& sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true"
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Post Install
|
||||||
|
###
|
||||||
|
{# 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 \
|
||||||
&& 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
RUN set -x \
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini \
|
||||||
|
\
|
||||||
{% for ext in extensions_enabled %}
|
{% for ext in extensions_enabled %}
|
||||||
{# Not disabled #}
|
{#- Not disabled #}
|
||||||
{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
|
{%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %}
|
||||||
{% if ext == 'opcache' %}
|
{%- if ext == 'opcache' %}
|
||||||
&& 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$' \
|
||||||
{% elif ext == 'ioncube' %}
|
{# #}
|
||||||
{# Not enabled #}
|
{%- elif ext == 'readline' %}
|
||||||
{% else %}
|
&& php -m | grep -oiE '^readline$' \
|
||||||
|
{# #}
|
||||||
|
{%- elif ext not in ['blackfire', 'ioncube'] %}
|
||||||
&& php -m | grep -oiE '^{{ ext }}$' \
|
&& php -m | grep -oiE '^{{ ext }}$' \
|
||||||
&& php-fpm -m | grep -oiE '^{{ ext }}$' \
|
&& php-fpm -m | grep -oiE '^{{ ext }}$' \
|
||||||
{% endif %}
|
{# #}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
&& true
|
&& true
|
||||||
|
|
||||||
|
|||||||
@@ -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,44 +6,67 @@ 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 \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
locales-all \
|
locales-all \
|
||||||
postfix \
|
postfix \
|
||||||
postfix-pcre \
|
postfix-pcre \
|
||||||
|
cron \
|
||||||
rsyslog \
|
rsyslog \
|
||||||
socat \
|
socat \
|
||||||
supervisor \
|
supervisor \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
\
|
\
|
||||||
&& rm -rf /etc/supervisor* \
|
&& rm -rf /etc/supervisor* \
|
||||||
&& mkdir -p /etc/supervisor/conf.d \
|
&& mkdir -p /etc/supervisor/conf.d \
|
||||||
&& mkdir -p /var/log/supervisor
|
&& mkdir -p /var/log/supervisor \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
{% if debug %}
|
{% if debug %}
|
||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -59,14 +82,10 @@ COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf
|
|||||||
###
|
###
|
||||||
### Volumes
|
### Volumes
|
||||||
###
|
###
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Ports
|
### Ports
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -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,51 +31,56 @@ ENV BASH_PROFILE=".bashrc"
|
|||||||
###
|
###
|
||||||
### Install Tools
|
### Install Tools
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
&& apt-get update \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gnupg \
|
gnupg \
|
||||||
{% for repo in apt_repositories_enabled %}
|
\
|
||||||
{# Not disabled #}
|
{%- for repo in apt_repositories_enabled -%}
|
||||||
{% if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) %}
|
{#- Not disabled -#}
|
||||||
{# Version specific pre-command available? #}
|
{%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%}
|
||||||
{% if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %}
|
{#- Version specific pre-command available? -#}
|
||||||
&& {{ apt_repositories_available[repo][php_version]['pre'] }} \
|
{%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] -%}
|
||||||
{# Generic pre-command available? #}
|
{{ "\n\t" }}&& {{ apt_repositories_available[repo][php_version]['pre'] }} \
|
||||||
{% elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %}
|
{#- Generic pre-command available? -#}
|
||||||
&& {{ apt_repositories_available[repo]['all']['pre'] }} \
|
{%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] -%}
|
||||||
{% endif %}
|
{{ "\n\t" }}&& {{ apt_repositories_available[repo]['all']['pre'] }} \
|
||||||
{# Version specific key available? #}
|
{%- endif -%}
|
||||||
{% if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %}
|
{#- Version specific key available? -#}
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \
|
{%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] -%}
|
||||||
{# Generic key available? #}
|
{{ "\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'] }} \
|
||||||
{% elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %}
|
{#- Generic key available? -#}
|
||||||
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \
|
{%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] -%}
|
||||||
{% endif %}
|
{{ "\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'] }} \
|
||||||
{# Version specific repository available? #}
|
{%- endif -%}
|
||||||
{% if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %}
|
{#- Version specific repository available? -#}
|
||||||
&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
|
{%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] -%}
|
||||||
{# Generic repository available? #}
|
{{ "\n\t" }}&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
|
||||||
{% else %}
|
{#- Generic repository available? -#}
|
||||||
&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
|
{%- elif 'all' in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo]['all'] -%}
|
||||||
{% endif %}
|
{{ "\n\t" }}&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% endfor %}
|
{%- endif -%}
|
||||||
&& apt-get update \
|
{%- endfor -%}{{ "\n\t" }}\
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
ack-grep \
|
ack-grep \
|
||||||
aspell \
|
aspell \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
bash-completion \
|
bash-completion \
|
||||||
|
binutils \
|
||||||
|
blackfire-agent \
|
||||||
build-essential \
|
build-essential \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
coreutils \
|
coreutils \
|
||||||
curl \
|
|
||||||
dnsutils \
|
dnsutils \
|
||||||
dos2unix \
|
dos2unix \
|
||||||
file \
|
file \
|
||||||
|
gawk \
|
||||||
gcc \
|
gcc \
|
||||||
git \
|
git \
|
||||||
git-flow \
|
git-flow \
|
||||||
@@ -77,27 +90,28 @@ RUN set -x \
|
|||||||
htop \
|
htop \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
jq \
|
||||||
less \
|
less \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libffi-dev\
|
libffi-dev \
|
||||||
libssl-dev\
|
libssl-dev \
|
||||||
libyaml-dev \
|
libyaml-dev \
|
||||||
make \
|
make \
|
||||||
mongodb-org-shell \
|
mongodb-org-shell \
|
||||||
mongodb-org-tools \
|
mongodb-org-tools \
|
||||||
moreutils \
|
moreutils \
|
||||||
|
{% if php_version in [7.1, 7.2, 7.3] %}
|
||||||
|
mariadb-client \
|
||||||
|
{% else %}
|
||||||
mysql-client \
|
mysql-client \
|
||||||
|
{% endif %}
|
||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
netcat \
|
netcat \
|
||||||
nodejs \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
patch \
|
patch \
|
||||||
|
patchelf \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
python-cffi \
|
|
||||||
python-dev \
|
|
||||||
python-pip \
|
|
||||||
python-wheel \
|
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rsync \
|
rsync \
|
||||||
rubygems \
|
rubygems \
|
||||||
@@ -113,43 +127,291 @@ RUN set -x \
|
|||||||
w3m \
|
w3m \
|
||||||
wget \
|
wget \
|
||||||
whois \
|
whois \
|
||||||
wkhtmltopdf \
|
|
||||||
xz-utils \
|
xz-utils \
|
||||||
yarn \
|
yarn \
|
||||||
|
zip \
|
||||||
|
zlib1g-dev \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
RUN set -x \
|
###
|
||||||
{% for tool in software_enabled %}
|
### Install custom software
|
||||||
{# Not disabled #}
|
###
|
||||||
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %}
|
{% if not build_fail_fast %}
|
||||||
# {{ tool }}
|
RUN set -eux \
|
||||||
{# Version specific pre-command available? #}
|
{%- endif -%}
|
||||||
{% if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] %}
|
{%- for tool in software_enabled -%}
|
||||||
&& {{ software_available[tool][php_version]['pre'] }} \
|
{# Not disabled #}
|
||||||
{# Generic pre-command available? #}
|
{%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
|
||||||
{% elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] %}
|
{{ "\n" }}# -------------------- {{ tool }} --------------------
|
||||||
&& {{ software_available[tool]['all']['pre'] }} \
|
{%- if build_fail_fast -%}
|
||||||
{% endif %}
|
{{ "\n" }}RUN set -eux \
|
||||||
{# Version specific command available? #}
|
{%- endif -%}
|
||||||
{% if php_version in software_available[tool] and 'command' in software_available[tool][php_version] %}
|
{#- Version specific pre-command available? -#}
|
||||||
&& {{ software_available[tool][php_version]['command'] }} \
|
{%- if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] -%}
|
||||||
{# Generic command available? #}
|
{{ "\n\t" }}&& {{ software_available[tool][php_version]['pre'] }} \
|
||||||
{% else %}
|
{#- Generic pre-command available? -#}
|
||||||
&& {{ software_available[tool]['all']['command'] }} \
|
{%- elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] -%}
|
||||||
{% endif %}
|
{{ "\n\t" }}&& {{ software_available[tool]['all']['pre'] }} \
|
||||||
{# Version specific post-command available? #}
|
{%- endif -%}
|
||||||
{% if php_version in software_available[tool] and 'post' in software_available[tool][php_version] %}
|
{#- Version specific command available? -#}
|
||||||
&& {{ software_available[tool][php_version]['post'] }} \
|
{%- if php_version in software_available[tool] and 'command' in software_available[tool][php_version] -%}
|
||||||
{# Generic post-command available? #}
|
{{ "\n\t" }}&& {{ software_available[tool][php_version]['command'] }} \
|
||||||
{% elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] %}
|
{#- Generic command available? -#}
|
||||||
&& {{ software_available[tool]['all']['post'] }} \
|
{%- else -%}
|
||||||
{% endif %}
|
{{ "\n\t" }}&& {{ software_available[tool]['all']['command'] }} \
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
|
{#- Version specific post-command available? -#}
|
||||||
|
{%- if php_version in software_available[tool] and 'post' in software_available[tool][php_version] -%}
|
||||||
|
{{ "\n\t" }}&& {{ software_available[tool][php_version]['post'] }} \
|
||||||
|
{#- 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/.cache || true) \
|
||||||
|
&& (rm -rf /root/.composer || true) \
|
||||||
|
&& (rm -rf /root/.config || true) \
|
||||||
|
&& (rm -rf /root/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /home/devilbox/.cache || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.composer || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.config || true) \
|
||||||
|
&& (rm -rf /home/devilbox/.npm || true) \
|
||||||
|
\
|
||||||
|
&& (rm -rf /usr/local/src/composer/cache/* || true) \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install Composer (PHP)
|
||||||
|
###
|
||||||
|
{% if not build_fail_fast %}
|
||||||
|
RUN set -eux \
|
||||||
|
{%- endif -%}
|
||||||
|
{%- for tool in composer_enabled -%}
|
||||||
|
{#- Not disabled -#}
|
||||||
|
{%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
|
||||||
|
{{ "\n" }}# -------------------- {{ tool }} --------------------
|
||||||
|
{%- if build_fail_fast -%}
|
||||||
|
{{ "\n" }}RUN set -eux \
|
||||||
|
{%- endif -%}
|
||||||
|
{#- Version specific gem version available? -#}
|
||||||
|
{%- if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] -%}
|
||||||
|
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool][php_version]['version'] }} \
|
||||||
|
{#- Generic gem version available? -#}
|
||||||
|
{%- elif 'all' in composer_available[tool] and 'version' in composer_available[tool]['all'] -%}
|
||||||
|
{{ "\n\t" }}&& COMPOSER_HOME="{{ composer_home }}" composer 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 %}
|
||||||
&& true
|
{% if build_fail_fast -%}
|
||||||
|
RUN set -eux \{{ "\n" }}
|
||||||
|
{%- else -%}
|
||||||
|
{{ "\n\t" }}\{{ "\n" }}
|
||||||
|
{%- endif %}
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install npm (Node)
|
||||||
|
###
|
||||||
|
{% if not build_fail_fast %}
|
||||||
|
RUN set -eux \
|
||||||
|
{%- endif -%}
|
||||||
|
{%- for tool in npm_enabled -%}
|
||||||
|
{#- Not disabled -#}
|
||||||
|
{%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
|
||||||
|
{{ "\n" }}# -------------------- {{ tool }} --------------------
|
||||||
|
{%- if build_fail_fast -%}
|
||||||
|
{{ "\n" }}RUN set -eux \
|
||||||
|
{%- endif -%}
|
||||||
|
{#- Version specific gem version available? -#}
|
||||||
|
{%- if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] -%}
|
||||||
|
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool][php_version]['version'] }}' devilbox \
|
||||||
|
{#- Generic gem version available? -#}
|
||||||
|
{%- elif 'all' in npm_available[tool] and 'version' in npm_available[tool]['all'] -%}
|
||||||
|
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \
|
||||||
|
{#- No version info available -#}
|
||||||
|
{%- else -%}
|
||||||
|
{{ "\n\t" }}&& su -c '. /opt/nvm/nvm.sh; npm install -g {{ 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/.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 /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
|
\
|
||||||
|
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||||
|
&& (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true)
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
### Install pip (Python) packages
|
||||||
|
###
|
||||||
|
{% 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)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -157,7 +419,7 @@ RUN set -x \
|
|||||||
###
|
###
|
||||||
RUN \
|
RUN \
|
||||||
{ \
|
{ \
|
||||||
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \
|
echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \
|
||||||
echo "export PATH"; \
|
echo "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"; \
|
||||||
@@ -176,22 +438,77 @@ RUN \
|
|||||||
###
|
###
|
||||||
### Verify
|
### Verify
|
||||||
###
|
###
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
|
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
|
||||||
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ 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 \
|
||||||
|
\
|
||||||
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
|
||||||
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
|
||||||
|
\
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
|
||||||
|
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
|
||||||
|
&& rm -f /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -eux \
|
||||||
{% for tool in software_enabled %}
|
# -------------------- Software --------------------
|
||||||
{# Not disabled #}
|
{%- for tool in software_enabled -%}
|
||||||
{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %}
|
{#- Not disabled -#}
|
||||||
{% if 'check' in software_available[tool] %}
|
{%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%}
|
||||||
&& {{ software_available[tool]['check'] }} \
|
{%- if 'check' in software_available[tool] -%}
|
||||||
{% endif %}
|
{{ "\n\t" }}&& {{ software_available[tool]['check'] }} \
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% endfor %}
|
{%- endif -%}
|
||||||
&& true
|
{%- endfor -%}{{ "\n\t" }}\
|
||||||
|
# -------------------- Composer --------------------
|
||||||
|
{%- for tool in composer_enabled -%}
|
||||||
|
{#- Not disabled -#}
|
||||||
|
{%- if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) -%}
|
||||||
|
{%- if 'check' in composer_available[tool] -%}
|
||||||
|
{{ "\n\t" }}&& {{ composer_available[tool]['check'] }} \
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}{{ "\n\t" }}\
|
||||||
|
# -------------------- PIP --------------------
|
||||||
|
{%- for tool in pip_enabled -%}
|
||||||
|
{#- Not disabled -#}
|
||||||
|
{%- if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) -%}
|
||||||
|
{%- if 'check' in pip_available[tool] -%}
|
||||||
|
{{ "\n\t" }}&& {{ pip_available[tool]['check'] }} \
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}{{ "\n\t" }}\
|
||||||
|
# -------------------- NPM --------------------
|
||||||
|
{%- for tool in npm_enabled -%}
|
||||||
|
{#- Not disabled -#}
|
||||||
|
{%- if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) -%}
|
||||||
|
{%- if 'check' in npm_available[tool] -%}
|
||||||
|
{{ "\n\t" }}&& {{ npm_available[tool]['check'] }} \
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- 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/.config/ \
|
||||||
|
&& rm -rf /root/.ansible \
|
||||||
|
&& rm -rf /root/.console \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.pm2 \
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true)
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -207,14 +524,9 @@ 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
|
||||||
###
|
###
|
||||||
VOLUME /etc/bashrc-devilbox.d
|
|
||||||
VOLUME /etc/php-custom.d
|
|
||||||
VOLUME /etc/php-fpm-custom.d
|
|
||||||
VOLUME /etc/php-modules.d
|
|
||||||
VOLUME /shared/backups
|
VOLUME /shared/backups
|
||||||
VOLUME /var/log/php
|
VOLUME /var/log/php
|
||||||
VOLUME /var/mail
|
VOLUME /var/mail
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
77
build/ansible/group_vars/all/all-ansible.yml
Normal file
77
build/ansible/group_vars/all/all-ansible.yml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
###################################################################################################
|
||||||
|
# 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
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
debug: True
|
||||||
|
|
||||||
|
# Also implement checks in builder images (slow, but fails faster)
|
||||||
|
build_fail_fast: False
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Available PHP versions (see inventory)
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
php_all_versions:
|
||||||
|
- 5.2
|
||||||
|
- 5.3
|
||||||
|
- 5.4
|
||||||
|
- 5.5
|
||||||
|
- 5.6
|
||||||
|
- 7.0
|
||||||
|
- 7.1
|
||||||
|
- 7.2
|
||||||
|
- 7.3
|
||||||
|
- 7.4
|
||||||
|
- 8.0
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Docker file paths for each version for base, mods, prod & work
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
template_dockerfiles:
|
||||||
|
- src: DOCKERFILES/Dockerfile-base.j2
|
||||||
|
dst: "../../Dockerfiles/base/Dockerfile-{{ php_version }}"
|
||||||
|
- src: DOCKERFILES/Dockerfile-mods.j2
|
||||||
|
dst: "../../Dockerfiles/mods/Dockerfile-{{ php_version }}"
|
||||||
|
- src: DOCKERFILES/Dockerfile-prod.j2
|
||||||
|
dst: "../../Dockerfiles/prod/Dockerfile-{{ php_version }}"
|
||||||
|
- src: DOCKERFILES/Dockerfile-work.j2
|
||||||
|
dst: "../../Dockerfiles/work/Dockerfile-{{ php_version }}"
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Assign php.ini & php-fpm.conf to PHP versions
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
template_configurations:
|
||||||
|
# php.ini
|
||||||
|
- src: CONFIGURATIONS/php.ini.j2
|
||||||
|
dst: "../../Dockerfiles/base/data/php-ini.d/php-{{ php_version }}.ini"
|
||||||
|
cfg: "{{ php_settings_ini }}"
|
||||||
|
key: base
|
||||||
|
alt: base
|
||||||
|
- src: CONFIGURATIONS/php.ini.j2
|
||||||
|
dst: "../../Dockerfiles/work/data/php-ini.d/php-{{ php_version }}.ini"
|
||||||
|
cfg: "{{ php_settings_ini }}"
|
||||||
|
key: work
|
||||||
|
alt: base # Alternative key to use when definition is not set in 'work'
|
||||||
|
# php-fpm.conf
|
||||||
|
- src: CONFIGURATIONS/php-fpm.conf.j2
|
||||||
|
dst: "../../Dockerfiles/base/data/php-fpm.conf/php-fpm-{{ php_version }}.conf"
|
||||||
|
cfg: "{{ php_settings_fpm }}"
|
||||||
|
key: base
|
||||||
|
alt: base
|
||||||
|
- src: CONFIGURATIONS/php-fpm.conf.j2
|
||||||
|
dst: "../../Dockerfiles/work/data/php-fpm.conf/php-fpm-{{ php_version }}.conf"
|
||||||
|
cfg: "{{ php_settings_fpm }}"
|
||||||
|
key: work
|
||||||
|
alt: base
|
||||||
106
build/ansible/group_vars/all/all-php-settings.yml
Normal file
106
build/ansible/group_vars/all/all-php-settings.yml
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
---
|
||||||
|
###################################################################################################
|
||||||
|
# PHP php.ini php-fpm.conf settings
|
||||||
|
###################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Global
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
php_timeout: 120
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# php.ini
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
php_settings_ini:
|
||||||
|
# ---- Sane default ----
|
||||||
|
base:
|
||||||
|
# Memory
|
||||||
|
memory_limit: 512M
|
||||||
|
# Timeouts
|
||||||
|
max_execution_time: "{{ php_timeout }}"
|
||||||
|
max_input_time: "{{ php_timeout }}"
|
||||||
|
# Uploads
|
||||||
|
# Note: "post_max_size" should be greater than "upload_max_filesize"
|
||||||
|
post_max_size: 72M
|
||||||
|
upload_max_filesize: 64M
|
||||||
|
max_file_uploads: 20
|
||||||
|
# Variables
|
||||||
|
variables_order: EGPCS
|
||||||
|
max_input_vars: 8000
|
||||||
|
max_input_nesting_level: 64
|
||||||
|
# Error reporting
|
||||||
|
error_reporting: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
|
||||||
|
xmlrpc_errors: 'Off'
|
||||||
|
report_memleaks: 'On'
|
||||||
|
display_errors: 'Off'
|
||||||
|
display_startup_errors: 'Off'
|
||||||
|
track_errors: 'On'
|
||||||
|
log_errors: 'On'
|
||||||
|
html_errors: 'Off'
|
||||||
|
# Xdebug settings
|
||||||
|
xdebug_default_enable: 'Off'
|
||||||
|
xdebug_profiler_enable: 'Off'
|
||||||
|
xdebug_remote_enable: 'Off'
|
||||||
|
xdebug_remote_autostart: 'Off'
|
||||||
|
|
||||||
|
# ---- Inherits from base ----
|
||||||
|
mods:
|
||||||
|
# ---- Inherits from base ----
|
||||||
|
prod:
|
||||||
|
# ---- Inherits from base and overwrites certain values ----
|
||||||
|
work:
|
||||||
|
# Error reporting
|
||||||
|
error_reporting: E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
|
||||||
|
xmlrpc_errors: 'Off'
|
||||||
|
report_memleaks: 'On'
|
||||||
|
display_errors: 'On'
|
||||||
|
display_startup_errors: 'On'
|
||||||
|
track_errors: 'On'
|
||||||
|
log_errors: 'On'
|
||||||
|
html_errors: 'On'
|
||||||
|
# Xdebug settings
|
||||||
|
xdebug_default_enable: 'Off'
|
||||||
|
xdebug_profiler_enable: 'Off'
|
||||||
|
xdebug_remote_enable: 'Off'
|
||||||
|
xdebug_remote_autostart: 'Off'
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# php-fpm.conf
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
php_settings_fpm:
|
||||||
|
# ---- Sane default ----
|
||||||
|
base:
|
||||||
|
# Docker
|
||||||
|
clear_env: 'no'
|
||||||
|
catch_workers_output: 'yes'
|
||||||
|
# Timeouts
|
||||||
|
request_terminate_timeout: "{{ php_timeout }}s"
|
||||||
|
# Network
|
||||||
|
listen: 9000
|
||||||
|
# Backlog
|
||||||
|
listen_backlog: 1024
|
||||||
|
# Logging
|
||||||
|
log_level: notice
|
||||||
|
error_log: /proc/self/fd/2
|
||||||
|
access_log: /proc/self/fd/2
|
||||||
|
# Worker
|
||||||
|
pm: ondemand
|
||||||
|
pm_max_children: 50 # pm: dynamic, ondemand or static
|
||||||
|
pm_start_servers: 4 # only for pm: dynamic (min_spare + (max_spare-min_spare)/2
|
||||||
|
pm_min_spare_servers: 2 # only for pm: dynamic
|
||||||
|
pm_max_spare_servers: 6 # only for pm: dynamic
|
||||||
|
pm_max_requests: 500 # pm: dynamic or ondemand
|
||||||
|
pm_process_idle_timeout: 10s # only for pm: ondemand
|
||||||
|
|
||||||
|
# User/Group
|
||||||
|
user: devilbox
|
||||||
|
group: devilbox
|
||||||
|
# ---- Inherits from base ----
|
||||||
|
mods:
|
||||||
|
# ---- Inherits from base ----
|
||||||
|
prod:
|
||||||
|
# ---- Inherits from base and overwrites certain values ----
|
||||||
|
work:
|
||||||
1113
build/ansible/group_vars/all/mods.yml
Normal file
1113
build/ansible/group_vars/all/mods.yml
Normal file
File diff suppressed because it is too large
Load Diff
771
build/ansible/group_vars/all/work.yml
Normal file
771
build/ansible/group_vars/all/work.yml
Normal file
@@ -0,0 +1,771 @@
|
|||||||
|
---
|
||||||
|
###################################################################################################
|
||||||
|
# Docker: work
|
||||||
|
###################################################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file holds definition for all devibox/php-fpm:x.y-work images
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Global variables
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
composer_home: /usr/local/src/composer
|
||||||
|
nvm_home: /usr/local/src/nvm
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Apt repositories to enable (in defined order)
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
apt_repositories_enabled:
|
||||||
|
- backports
|
||||||
|
- blackfire
|
||||||
|
- git
|
||||||
|
- mongo
|
||||||
|
- pgsql
|
||||||
|
- yarn
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# PHP Composer packages to install
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
composer_enabled:
|
||||||
|
- asgardcms
|
||||||
|
- codeception
|
||||||
|
- lumen
|
||||||
|
- photon
|
||||||
|
- prestissimo
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Ruby gem packages to install
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
gem_enabled:
|
||||||
|
- mixlib_config
|
||||||
|
- rb_inotify
|
||||||
|
- mdl
|
||||||
|
- scss_lint
|
||||||
|
- sass
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Node npm packages to install
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
npm_enabled:
|
||||||
|
- angular_cli
|
||||||
|
- eslint
|
||||||
|
- grunt
|
||||||
|
- grunt_cli
|
||||||
|
- gulp
|
||||||
|
- jsonlint
|
||||||
|
# https://github.com/Unitech/pm2
|
||||||
|
- pm2
|
||||||
|
- mdlint
|
||||||
|
- vue_cli
|
||||||
|
- vue_cli_service_global
|
||||||
|
- webpack
|
||||||
|
- webpack_cli
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Python pip packages to install
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
pip_enabled:
|
||||||
|
- ansible
|
||||||
|
- yamllint
|
||||||
|
- yq
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Software to install (in defined order)
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
software_enabled:
|
||||||
|
# Composer, pip and nvm need to be first, others rely on it
|
||||||
|
- composer
|
||||||
|
- pip
|
||||||
|
- nvm
|
||||||
|
# Normal packages start here
|
||||||
|
- awesomeci
|
||||||
|
- deployer
|
||||||
|
- drush7
|
||||||
|
- drush8
|
||||||
|
- drush9
|
||||||
|
- drupalconsole
|
||||||
|
- gitflow
|
||||||
|
- laravel
|
||||||
|
- linkcheck
|
||||||
|
- linuxbrew
|
||||||
|
- mhsendmail
|
||||||
|
- mysqldumpsecure
|
||||||
|
- phalcon
|
||||||
|
- phpcs
|
||||||
|
- phpcbf
|
||||||
|
- php-cs-fixer
|
||||||
|
- phpunit
|
||||||
|
- symfony
|
||||||
|
- wkhtmltopdf
|
||||||
|
- wpcli
|
||||||
|
# Cleanup needs to be last
|
||||||
|
- cleanup
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Apt repository definition
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
# all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4:
|
||||||
|
# deb: Deb line to add to sources list
|
||||||
|
# key: [optional] Key id to add for repository
|
||||||
|
# pre: [optional] Run custom command to add gpg key for repository
|
||||||
|
#
|
||||||
|
apt_repositories_available:
|
||||||
|
backports:
|
||||||
|
5.2:
|
||||||
|
pre: echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
|
||||||
|
deb: deb http://archive.debian.org/debian jessie-backports main
|
||||||
|
5.3:
|
||||||
|
pre: echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
|
||||||
|
deb: deb http://archive.debian.org/debian jessie-backports main
|
||||||
|
5.4:
|
||||||
|
pre: echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
|
||||||
|
deb: deb http://archive.debian.org/debian jessie-backports main
|
||||||
|
5.5:
|
||||||
|
pre: echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
|
||||||
|
deb: deb http://archive.debian.org/debian jessie-backports main
|
||||||
|
all:
|
||||||
|
deb: deb http://ftp.debian.org/debian stretch-backports main
|
||||||
|
blackfire:
|
||||||
|
all:
|
||||||
|
deb: deb http://packages.blackfire.io/debian any main
|
||||||
|
pre: curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add -
|
||||||
|
git:
|
||||||
|
7.2:
|
||||||
|
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
|
||||||
|
7.3:
|
||||||
|
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
|
||||||
|
7.4:
|
||||||
|
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
|
||||||
|
8.0:
|
||||||
|
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main
|
||||||
|
all:
|
||||||
|
deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main
|
||||||
|
key: A1715D88E1DF1F24
|
||||||
|
mongo:
|
||||||
|
5.2:
|
||||||
|
deb: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main
|
||||||
|
key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||||
|
5.3:
|
||||||
|
deb: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main
|
||||||
|
key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||||
|
5.4:
|
||||||
|
deb: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main
|
||||||
|
key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||||
|
5.5:
|
||||||
|
deb: deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main
|
||||||
|
key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||||
|
all:
|
||||||
|
deb: deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main
|
||||||
|
key: 9DA31620334BD75D9DCB49F368818C72E52529D4
|
||||||
|
pgsql:
|
||||||
|
5.2:
|
||||||
|
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
|
||||||
|
5.3:
|
||||||
|
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
|
||||||
|
5.4:
|
||||||
|
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
|
||||||
|
5.5:
|
||||||
|
deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
|
||||||
|
all:
|
||||||
|
deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
|
||||||
|
pre: curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add -
|
||||||
|
yarn:
|
||||||
|
all:
|
||||||
|
deb: deb http://dl.yarnpkg.com/debian/ stable main
|
||||||
|
pre: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add -
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Composer (PHP) definition
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
composer_available:
|
||||||
|
asgardcms:
|
||||||
|
disabled: [5.2, 5.3, 5.4, 8.0]
|
||||||
|
check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[.0-9]+'
|
||||||
|
name: asgardcms/asgardcms-installer
|
||||||
|
link: asgardcms
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# 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
|
||||||
|
# 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 Node npm package
|
||||||
|
#
|
||||||
|
npm_available:
|
||||||
|
angular_cli:
|
||||||
|
name: "@angular/cli"
|
||||||
|
check: ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+'
|
||||||
|
eslint:
|
||||||
|
name: eslint
|
||||||
|
check: eslint -v | grep -E '[.0-9]+'
|
||||||
|
grunt:
|
||||||
|
name: grunt
|
||||||
|
grunt_cli:
|
||||||
|
name: grunt-cli
|
||||||
|
check: grunt --version | grep -E '[.0-9]+'
|
||||||
|
gulp:
|
||||||
|
name: gulp
|
||||||
|
check: gulp --version | grep -E '[.0-9]+'
|
||||||
|
jsonlint:
|
||||||
|
name: jsonlint
|
||||||
|
check: jsonlint --version | grep -E '[.0-9]+'
|
||||||
|
pm2:
|
||||||
|
name: pm2
|
||||||
|
check: pm2 --no-daemon --version | grep -E '[.0-9]+'
|
||||||
|
mdlint:
|
||||||
|
name: mdlint
|
||||||
|
check: mdlint --version | grep -E '[.0-9]+'
|
||||||
|
vue_cli:
|
||||||
|
name: "@vue/cli"
|
||||||
|
check: vue --version | grep -E '[.0-9]+'
|
||||||
|
vue_cli_service_global:
|
||||||
|
name: "@vue/cli-service-global"
|
||||||
|
webpack:
|
||||||
|
name: webpack
|
||||||
|
webpack_cli:
|
||||||
|
name: webpack-cli
|
||||||
|
check: webpack --version | grep -E '[.0-9]+'
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# pip (Python) definition
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# name: Name of the Python pip 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 Python pip package
|
||||||
|
#
|
||||||
|
pip_available:
|
||||||
|
ansible:
|
||||||
|
name: ansible
|
||||||
|
check: ansible --version | grep -E '^ansible [.0-9]+$'
|
||||||
|
yamllint:
|
||||||
|
name: yamllint
|
||||||
|
check: yamllint --version 2>&1 | grep -E '[.0-9]+'
|
||||||
|
yq:
|
||||||
|
name: yq
|
||||||
|
check: yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$'
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
# Software definition
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
# pre: [optional] Run command before 'command:' statement
|
||||||
|
# command: Command to execute
|
||||||
|
# pre: [optional] Run command after 'command:' statement
|
||||||
|
#
|
||||||
|
software_available:
|
||||||
|
# Composer is a dependency for others
|
||||||
|
composer:
|
||||||
|
disabled: [5.2]
|
||||||
|
check: composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
# pip is a dependency for others
|
||||||
|
pip:
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libpython-dev \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
\
|
||||||
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python \
|
||||||
|
# nvm is a dependency for others
|
||||||
|
nvm:
|
||||||
|
check: su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+'
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/creationix/nvm /opt/nvm \
|
||||||
|
&& cd /opt/nvm \
|
||||||
|
&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \
|
||||||
|
\
|
||||||
|
&& { \
|
||||||
|
echo 'export NVM_DIR="/opt/nvm"'; \
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \
|
||||||
|
} >> /home/devilbox/.bashrc \
|
||||||
|
\
|
||||||
|
&& chown -R devilbox:devilbox /opt/nvm \
|
||||||
|
# Install latest and LTS version
|
||||||
|
command: |
|
||||||
|
su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \
|
||||||
|
&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \
|
||||||
|
awesomeci:
|
||||||
|
check: regex-grep --version | grep -E '[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \
|
||||||
|
&& cd /usr/local/src/awesome-ci \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& ./configure --prefix=/usr/local \
|
||||||
|
&& make install \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/awesome-ci \
|
||||||
|
deployer:
|
||||||
|
disabled: [5.2, 5.3]
|
||||||
|
check: dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[.0-9]+'
|
||||||
|
5.4:
|
||||||
|
command: curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep
|
||||||
|
post: chmod +x /usr/local/bin/dep
|
||||||
|
5.5:
|
||||||
|
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
|
||||||
|
5.6:
|
||||||
|
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
|
||||||
|
all:
|
||||||
|
command: curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep
|
||||||
|
post: chmod +x /usr/local/bin/dep
|
||||||
|
drush7:
|
||||||
|
disabled: [5.2, 8.0]
|
||||||
|
check: drush7 --version | grep -E '7[.0-9]+\s*$'
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \
|
||||||
|
&& cd /usr/local/src/drush7 \
|
||||||
|
&& git checkout 7.4.0 \
|
||||||
|
command: |
|
||||||
|
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
|
&& ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \
|
||||||
|
&& rm -rf /usr/local/src/drush7/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush7/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush7/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush7/misc \
|
||||||
|
drush8:
|
||||||
|
disabled: [5.2, 5.3, 8.0]
|
||||||
|
check: drush8 --version | grep -E '8[.0-9]+\s*$'
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \
|
||||||
|
&& cd /usr/local/src/drush8 \
|
||||||
|
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||||
|
command: |
|
||||||
|
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \
|
||||||
|
&& ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \
|
||||||
|
&& rm -rf /usr/local/src/drush8/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush8/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush8/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush8/misc \
|
||||||
|
drush9:
|
||||||
|
disabled: [5.2, 5.3, 5.4, 5.5, 8.0]
|
||||||
|
check: drush9 --version | grep -E '9[.0-9]+\s*$'
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \
|
||||||
|
&& cd /usr/local/src/drush9 \
|
||||||
|
&& git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \
|
||||||
|
command: |
|
||||||
|
chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \
|
||||||
|
&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && php -d memory_limit=-1 `which composer` install --no-interaction --no-progress' \
|
||||||
|
&& ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \
|
||||||
|
&& rm -rf /usr/local/src/drush9/.git \
|
||||||
|
&& rm -rf /usr/local/src/drush9/docs \
|
||||||
|
&& rm -rf /usr/local/src/drush9/examples \
|
||||||
|
&& rm -rf /usr/local/src/drush9/misc \
|
||||||
|
drupalconsole:
|
||||||
|
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]'
|
||||||
|
all:
|
||||||
|
command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal
|
||||||
|
post: chmod +x /usr/local/bin/drupal
|
||||||
|
gitflow:
|
||||||
|
check: git-flow version | grep -E '[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \
|
||||||
|
&& cd /tmp/gitflow \
|
||||||
|
&& make install \
|
||||||
|
&& cd / && rm -rf /tmp/gitflow \
|
||||||
|
laravel:
|
||||||
|
check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+'
|
||||||
|
disabled: [5.2, 5.3, 8.0]
|
||||||
|
5.4:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout v1.3.7 \
|
||||||
|
5.5:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout v2.0.0 \
|
||||||
|
5.6:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout v2.0.0 \
|
||||||
|
7.0:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout v2.0.0 \
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||||
|
&& cd /usr/local/src/laravel-installer \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
command: |
|
||||||
|
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' \
|
||||||
|
&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \
|
||||||
|
&& rm -rf /usr/local/src/laravel-installer/laravel/.git \
|
||||||
|
linkcheck:
|
||||||
|
check: linkcheck --version | grep -E '^linkcheck\sv[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||||
|
&& chmod +x /usr/local/bin/linkcheck \
|
||||||
|
linuxbrew:
|
||||||
|
check: su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||||
|
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||||
|
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||||
|
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||||
|
mhsendmail:
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
|
||||||
|
&& chmod +x mhsendmail_linux_amd64 \
|
||||||
|
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||||
|
mysqldumpsecure:
|
||||||
|
check: mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
|
||||||
|
&& cd /usr/local/src/mysqldump-secure \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \
|
||||||
|
&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \
|
||||||
|
&& touch /var/log/mysqldump-secure.log \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \
|
||||||
|
&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.conf \
|
||||||
|
&& chmod 0400 /etc/mysqldump-secure.cnf \
|
||||||
|
&& chmod 0644 /var/log/mysqldump-secure.log \
|
||||||
|
&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/mysqldump-secure \
|
||||||
|
phalcon:
|
||||||
|
disabled: [5.2, 7.3, 7.4, 8.0]
|
||||||
|
check: phalcon commands | grep -E '[.0-9]+'
|
||||||
|
5.3:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||||
|
&& cd /usr/local/src/phalcon-devtools \
|
||||||
|
&& 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:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||||
|
&& cd /usr/local/src/phalcon-devtools \
|
||||||
|
&& 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 \
|
||||||
|
all:
|
||||||
|
pre: |
|
||||||
|
git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \
|
||||||
|
&& cd /usr/local/src/phalcon-devtools \
|
||||||
|
&& git checkout $(git describe --abbrev=0 --tags) \
|
||||||
|
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 phalcon \
|
||||||
|
&& cd / \
|
||||||
|
&& rm -rf /usr/local/src/phalcon-devtools/.git \
|
||||||
|
phpcs:
|
||||||
|
check: phpcs --version | grep -E 'version [.0-9]+'
|
||||||
|
5.2:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
5.3:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcs \
|
||||||
|
phpcbf:
|
||||||
|
check: phpcbf --version | grep -E 'version [.0-9]+'
|
||||||
|
5.2:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
5.3:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpcbf \
|
||||||
|
php-cs-fixer:
|
||||||
|
disabled: [5.2, 7.4, 8.0]
|
||||||
|
check: php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+'
|
||||||
|
5.3:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
5.4:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
5.5:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
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 \
|
||||||
|
phpunit:
|
||||||
|
disabled: [5.2, 8.0]
|
||||||
|
check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+'
|
||||||
|
5.3:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
5.4:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
5.5:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
5.6:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
7.0:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \
|
||||||
|
&& chmod +x /usr/local/bin/phpunit \
|
||||||
|
symfony:
|
||||||
|
disabled: [5.2, 5.3]
|
||||||
|
check: symfony --version | grep -E 'version\s*[.0-9]+'
|
||||||
|
all:
|
||||||
|
command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony
|
||||||
|
post: chmod +x /usr/local/bin/symfony
|
||||||
|
wkhtmltopdf:
|
||||||
|
check: wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)"
|
||||||
|
5.2:
|
||||||
|
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||||
|
5.3:
|
||||||
|
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||||
|
5.4:
|
||||||
|
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||||
|
5.5:
|
||||||
|
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 \
|
||||||
|
all:
|
||||||
|
pre: VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )"
|
||||||
|
command: |
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||||
|
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||||
|
&& curl -sS -L -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||||
|
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||||
|
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||||
|
post: |
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
wpcli:
|
||||||
|
disabled: [5.2]
|
||||||
|
check: wp --allow-root --version | grep -E '[.0-9]+'
|
||||||
|
5.3:
|
||||||
|
command: 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
|
||||||
|
post: chmod +x /usr/local/bin/wp
|
||||||
|
all:
|
||||||
|
command: curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp
|
||||||
|
post: chmod +x /usr/local/bin/wp
|
||||||
|
cleanup:
|
||||||
|
all:
|
||||||
|
command: |
|
||||||
|
rm -rf /home/${MY_USER}/.*json \
|
||||||
|
&& rm -rf /home/${MY_USER}/.cache \
|
||||||
|
&& rm -rf /home/${MY_USER}/.composer \
|
||||||
|
&& rm -rf /home/${MY_USER}/.config \
|
||||||
|
&& rm -rf /home/${MY_USER}/.drush \
|
||||||
|
&& rm -rf /home/${MY_USER}/.subversion \
|
||||||
|
&& rm -rf /home/${MY_USER}/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /root/.*json \
|
||||||
|
&& rm -rf /root/.cache \
|
||||||
|
&& rm -rf /root/.composer \
|
||||||
|
&& rm -rf /root/.config \
|
||||||
|
&& rm -rf /root/.drush \
|
||||||
|
&& rm -rf /root/.subversion \
|
||||||
|
&& rm -rf /root/.v8* \
|
||||||
|
\
|
||||||
|
&& rm -rf /tmp/* \
|
||||||
|
&& (rm -rf /tmp/.* || true) \
|
||||||
@@ -8,3 +8,5 @@ php-7.0 php_version=7.0 ansible_connection=local
|
|||||||
php-7.1 php_version=7.1 ansible_connection=local
|
php-7.1 php_version=7.1 ansible_connection=local
|
||||||
php-7.2 php_version=7.2 ansible_connection=local
|
php-7.2 php_version=7.2 ansible_connection=local
|
||||||
php-7.3 php_version=7.3 ansible_connection=local
|
php-7.3 php_version=7.3 ansible_connection=local
|
||||||
|
php-7.4 php_version=7.4 ansible_connection=local
|
||||||
|
php-8.0 php_version=8.0 ansible_connection=local
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ print_usage() {
|
|||||||
echo " gen-readme.sh 7.1"
|
echo " gen-readme.sh 7.1"
|
||||||
echo " gen-readme.sh 7.2"
|
echo " gen-readme.sh 7.2"
|
||||||
echo " gen-readme.sh 7.3"
|
echo " gen-readme.sh 7.3"
|
||||||
|
echo " gen-readme.sh 7.4"
|
||||||
|
echo " gen-readme.sh 8.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -33,14 +35,31 @@ 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=
|
||||||
|
|
||||||
|
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";
|
||||||
|
fi
|
||||||
|
|
||||||
|
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";
|
||||||
|
fi
|
||||||
|
|
||||||
# Process module string into correct format for README.md
|
# Process module string into correct format for README.md
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/^\[.*//g' )" # Remove PHP Modules headlines
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/^\[.*//g' )" # Remove PHP Modules headlines
|
||||||
|
PHP_MODULES="${ALL_MODULES}${PHP_MODULES}" # Append all available modules
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sort -fu )" # Unique
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sort -fu )" # Unique
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sed '/^\s*$/d' )" # Remove empty lines
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed '/^\s*$/d' )" # Remove empty lines
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\r\n' ',' )" # Newlines to commas
|
PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\r\n' ',' )" # Newlines to commas
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\n' ',' )" # Newlines to commas
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\r' ',' )" # Newlines to commas
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/^M/,/g' )" # Newlines to commas
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,,/,/g' )" # Remove PHP Modules headlines
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,,/,/g' )" # Remove PHP Modules headlines
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,/\n/g' )" # Back to newlines
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sort -fu )" # Unique
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed '/^\s*$/d' )" # Remove empty lines
|
||||||
|
PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\n' ',' )" # Newlines to commas
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,$//g' )" # Remove trailing comma
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,$//g' )" # Remove trailing comma
|
||||||
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,/, /g' )" # Add space to comma
|
PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/,/, /g' )" # Add space to comma
|
||||||
|
|
||||||
@@ -73,6 +92,8 @@ if [ "${#}" -eq "0" ]; then
|
|||||||
update_readme "7.1"
|
update_readme "7.1"
|
||||||
update_readme "7.2"
|
update_readme "7.2"
|
||||||
update_readme "7.3"
|
update_readme "7.3"
|
||||||
|
update_readme "7.4"
|
||||||
|
update_readme "8.0"
|
||||||
elif [ "${#}" -gt "1" ]; then
|
elif [ "${#}" -gt "1" ]; then
|
||||||
# Specifying more than 1 argument is wrong
|
# Specifying more than 1 argument is wrong
|
||||||
echo "Error, invalid number of arguments."
|
echo "Error, invalid number of arguments."
|
||||||
@@ -87,7 +108,9 @@ else
|
|||||||
&& [ "${1}" != "7.0" ] \
|
&& [ "${1}" != "7.0" ] \
|
||||||
&& [ "${1}" != "7.1" ] \
|
&& [ "${1}" != "7.1" ] \
|
||||||
&& [ "${1}" != "7.2" ] \
|
&& [ "${1}" != "7.2" ] \
|
||||||
&& [ "${1}" != "7.3" ]; then
|
&& [ "${1}" != "7.3" ] \
|
||||||
|
&& [ "${1}" != "7.4" ] \
|
||||||
|
&& [ "${1}" != "8.0" ]; then
|
||||||
# Argument does not match any of the PHP versions
|
# Argument does not match any of the PHP versions
|
||||||
echo "Error, invalid argument."
|
echo "Error, invalid argument."
|
||||||
print_usage
|
print_usage
|
||||||
|
|||||||
@@ -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}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ chmod 0777 "${DOC_ROOT_HOST}"
|
|||||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||||
|
|
||||||
# Pull Image
|
# Pull Image
|
||||||
run "docker pull ${CONTAINER}"
|
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||||
|
|
||||||
# Start PHP-FPM
|
# Start PHP-FPM
|
||||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"
|
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ FLAVOUR="${3}"
|
|||||||
CONTAINER="mysql:5.6"
|
CONTAINER="mysql:5.6"
|
||||||
|
|
||||||
# Pull Container
|
# Pull Container
|
||||||
run "docker pull ${CONTAINER}"
|
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||||
|
|
||||||
# Start mysql container
|
# Start mysql container
|
||||||
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ALLOW_EMPTY_PASSWORD=yes" )"
|
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ALLOW_EMPTY_PASSWORD=yes" )"
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ chmod 0777 "${DOC_ROOT_HOST}"
|
|||||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||||
|
|
||||||
# Pull container
|
# Pull container
|
||||||
run "docker pull ${CONTAINER}"
|
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||||
|
|
||||||
# Start PHP-FPM
|
# Start PHP-FPM
|
||||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"
|
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ chmod 0777 "${DOC_ROOT_HOST}"
|
|||||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||||
|
|
||||||
# Pull container
|
# Pull container
|
||||||
run "docker pull ${CONTAINER}"
|
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||||
|
|
||||||
# Start PHP-FPM
|
# Start PHP-FPM
|
||||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_CNF_HOST}:${PHP_CNF_CONT}" )"
|
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_CNF_HOST}:${PHP_CNF_CONT}" )"
|
||||||
|
|||||||
62
tests/prod/08-test-custom-user-scripts-1.sh
Executable file
62
tests/prod/08-test-custom-user-scripts-1.sh
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Tests
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
###
|
||||||
|
### Check if PHP still starts up with working scripts
|
||||||
|
###
|
||||||
|
RUN_SH_HOST="$( mktemp -d )"
|
||||||
|
RUN_SH_CONT="/startup.1.d"
|
||||||
|
|
||||||
|
# Fix mount permissions
|
||||||
|
chmod 0777 "${RUN_SH_HOST}"
|
||||||
|
|
||||||
|
# Add a startup script to execute
|
||||||
|
printf "#!/bin/bash\\necho 'abcdefghijklmnopq';\\n" > "${RUN_SH_HOST}/myscript1.sh"
|
||||||
|
chmod +x "${RUN_SH_HOST}/myscript1.sh"
|
||||||
|
|
||||||
|
# Start PHP-FPM
|
||||||
|
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"
|
||||||
|
|
||||||
|
# Wait for both containers to be up and running
|
||||||
|
run "sleep 10"
|
||||||
|
|
||||||
|
# Check entrypoint for script run
|
||||||
|
if ! run "docker logs ${did} | grep 'myscript1.sh'"; then
|
||||||
|
docker_logs "${did}" || true
|
||||||
|
docker_stop "${did}" || true
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
|
echo "Failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check entrypoint for script output
|
||||||
|
if ! run "docker logs ${did} | grep 'abcdefghijklmnopq'"; then
|
||||||
|
docker_logs "${did}" || true
|
||||||
|
docker_stop "${did}" || true
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
|
echo "Failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
docker_stop "${did}"
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
62
tests/prod/09-test-custom-user-scripts-2.sh
Executable file
62
tests/prod/09-test-custom-user-scripts-2.sh
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Tests
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
###
|
||||||
|
### Check if PHP still starts up with working scripts
|
||||||
|
###
|
||||||
|
RUN_SH_HOST="$( mktemp -d )"
|
||||||
|
RUN_SH_CONT="/startup.2.d"
|
||||||
|
|
||||||
|
# Fix mount permissions
|
||||||
|
chmod 0777 "${RUN_SH_HOST}"
|
||||||
|
|
||||||
|
# Add a startup script to execute
|
||||||
|
printf "#!/bin/bash\\necho 'abcdefghijklmnopq';\\n" > "${RUN_SH_HOST}/myscript1.sh"
|
||||||
|
chmod +x "${RUN_SH_HOST}/myscript1.sh"
|
||||||
|
|
||||||
|
# Start PHP-FPM
|
||||||
|
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"
|
||||||
|
|
||||||
|
# Wait for both containers to be up and running
|
||||||
|
run "sleep 10"
|
||||||
|
|
||||||
|
# Check entrypoint for script run
|
||||||
|
if ! run "docker logs ${did} | grep 'myscript1.sh'"; then
|
||||||
|
docker_logs "${did}" || true
|
||||||
|
docker_stop "${did}" || true
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
|
echo "Failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check entrypoint for script output
|
||||||
|
if ! run "docker logs ${did} | grep 'abcdefghijklmnopq'"; then
|
||||||
|
docker_logs "${did}" || true
|
||||||
|
docker_stop "${did}" || true
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
|
echo "Failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
docker_stop "${did}"
|
||||||
|
rm -rf "${RUN_SH_HOST}"
|
||||||
@@ -27,7 +27,7 @@ MOUNTPOINT="$( mktemp --directory )"
|
|||||||
CONTAINER="mysql:5.6"
|
CONTAINER="mysql:5.6"
|
||||||
|
|
||||||
# Pull Container
|
# Pull Container
|
||||||
run "docker pull ${CONTAINER}"
|
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||||
|
|
||||||
# Start mysql container
|
# Start mysql container
|
||||||
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )"
|
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )"
|
||||||
|
|||||||
Reference in New Issue
Block a user