From 46d1c4810479669bfb03c1befc5828c2f6da2191 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 2 Nov 2019 14:37:21 +0100 Subject: [PATCH 01/11] Update yamllint --- .yamllint | 1 + 1 file changed, 1 insertion(+) diff --git a/.yamllint b/.yamllint index 0d965ce..01ec5ec 100644 --- a/.yamllint +++ b/.yamllint @@ -11,3 +11,4 @@ rules: require-starting-space: false min-spaces-from-content: 1 line-length: disable + truthy: disable From 3e8b4856d199b17e322c0d79a2644623686289f8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 2 Nov 2019 14:37:45 +0100 Subject: [PATCH 02/11] Dockerize generate command to remove local dependencies --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4fd29ab..0b6c3d8 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,14 @@ help: ### Generate ### generate: - cd build/ansible; ansible-playbook generate.yml --diff + docker run --rm \ + $$(tty -s && echo "-it" || echo) \ + -e USER=ansible \ + -e MY_UID=$$(id -u) \ + -e MY_GID=$$(id -g) \ + -v ${PWD}:/data \ + -w /data/build/ansible \ + cytopia/ansible:2.8 ansible-playbook generate.yml --diff ### From 7585081644d6ec6cdafdac43fb40e3e36ca66651 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 2 Nov 2019 14:42:05 +0100 Subject: [PATCH 03/11] Move builds to GitHub Actions --- .github/workflows/images.yml | 307 ++++++++++++++++ .github/workflows/linting.yml | 27 ++ .travis.yml | 36 +- Makefile | 650 ++++++++++------------------------ build/gen-readme.sh | 6 +- tests/.lib.sh | 14 +- 6 files changed, 545 insertions(+), 495 deletions(-) create mode 100644 .github/workflows/images.yml create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml new file mode 100644 index 0000000..bcfad70 --- /dev/null +++ b/.github/workflows/images.yml @@ -0,0 +1,307 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# 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 + + # ------------------------------------------------------------ + # Build Base + # ------------------------------------------------------------ + - name: Build Base + run: make rebuild-base VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Build Base (Retry) + 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 + if: failure() + + # ------------------------------------------------------------ + # Test Base + # ------------------------------------------------------------ + - name: Test Base + run: make test-base VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Test Base (Retry) + 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 + if: failure() + + + # ------------------------------------------------------------ + # Build Mods + # ------------------------------------------------------------ + - name: Build Mods + run: make rebuild-mods VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Build Mods (Retry) + 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 + if: failure() + + # ------------------------------------------------------------ + # Test Mods + # ------------------------------------------------------------ + - name: Test Mods + run: make test-mods VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Test Mods (Retry) + 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 + if: failure() + + + # ------------------------------------------------------------ + # Build Prod + # ------------------------------------------------------------ + - name: Build Prod + run: make rebuild-prod VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Build Prod (Retry) + 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 + if: failure() + + # ------------------------------------------------------------ + # Test Prod + # ------------------------------------------------------------ + - name: Test Prod + run: make test-prod VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Test Prod (Retry) + 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 + if: failure() + + + # ------------------------------------------------------------ + # Build Work + # ------------------------------------------------------------ + - name: Build Work + run: make rebuild-work VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Build Work (Retry) + 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 + if: failure() + + # ------------------------------------------------------------ + # Test Work + # ------------------------------------------------------------ + - name: Test Work + run: make test-work VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + + - name: Test Work (Retry) + 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 + if: failure() + + # ------------------------------------------------------------ + # Diff README.md + # ------------------------------------------------------------ + - name: Diff README.md + run: | + make gen-readme VERSION=${VERSION} + 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') diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..2d9484a --- /dev/null +++ b/.github/workflows/linting.yml @@ -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 }} diff --git a/.travis.yml b/.travis.yml index ebfa231..2b63ad4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ ### Travis settings ### sudo: required -language: python +language: minimal services: - docker @@ -40,9 +40,6 @@ env: ### Install requirements ### install: - # Get newer docker version - - max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done - - max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi done - docker version # Disable services enabled by default @@ -64,31 +61,40 @@ install: - sudo service redis stop || true - netstat -tulpn + - retry() { + for ((n=0; n<10; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + done; + return 1; + } + ### ### Check generation changes, build and test ### before_script: # Regenerate Dockerfiles and make sure nothing has changed (every stage) - - pip install ansible - - make generate + - make gen-dockerfiles - git diff --quiet || { echo "Build Changes"; git diff; git status; false; } # Build (multiple tries due to network outages) - - max=100; i=0; while [ $i -lt $max ]; do if make build-base-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi - - make test-base-${PHP//.} + - retry make build-base VERSION=${PHP} + - retry make test-base VERSION=${PHP} - - max=100; i=0; while [ $i -lt $max ]; do if make build-mods-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi - - make test-mods-${PHP//.} + - retry make build-mods VERSION=${PHP} + - retry make test-mods VERSION=${PHP} - - max=100; i=0; while [ $i -lt $max ]; do if make build-prod-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi - - make test-prod-${PHP//.} + - retry make build-prod VERSION=${PHP} + - retry make test-prod VERSION=${PHP} - - max=100; i=0; while [ $i -lt $max ]; do if make build-work-${PHP//.}; then break; else i=$((i+1)); fi; done; if [ $i -gt 98 ]; then false; fi - - make test-work-${PHP//.} + - retry make build-work VERSION=${PHP} + - retry make test-work VERSION=${PHP} # Test if PHP modules have changed - - ./build/gen-readme.sh "${PHP}" + - make gen-readme VERSION=${PHP} - git diff --quiet || { echo "Build Changes"; git diff; git status; false; } diff --git a/Makefile b/Makefile index 0b6c3d8..e1a3f55 100644 --- a/Makefile +++ b/Makefile @@ -1,134 +1,61 @@ -location = Dockerfiles/ +ifneq (,) +.error This Makefile requires GNU Make. +endif + + +# ------------------------------------------------------------------------------------------------- +# Docker configuration +# ------------------------------------------------------------------------------------------------- + +DIR = Dockerfiles/ +IMAGE = devilbox/php-fpm +NO_CACHE = + + +# ------------------------------------------------------------------------------------------------- +# DEFAULT TARGET +# ------------------------------------------------------------------------------------------------- -### -### Default -### help: - @printf "################################################################################\n" - @printf "# devilbox/php:XX-XX Makefile\n" - @printf "################################################################################\n\n" - @printf "%s\n\n" "Generate and build devilbox PHP-FPM docker images" - @printf "%s\n" "make generate: Generate Dockerfiles (requires Ansible)" - @printf "%s\n" "make readme: Update Readme with php modules (requires images to be built)" - @printf "\n" - @printf "%s\n" "make gen-build: Generate and build all images" - @printf "%s\n" "make gen-rebuild: Generate and rebuild all images" - @printf "\n" - @printf "%s\n" "make build-all: Build all images" - @printf "%s\n" "make rebuild-all: Rebuild all images" - @printf "\n" - @printf "%s\n" "make build-base: Build all base images" - @printf "%s\n" "make build-mods: Build all mods images" - @printf "%s\n" "make build-prod: Build all prod images" - @printf "%s\n" "make build-work: Build all work images" - @printf "\n" - @printf "%s\n" "make rebuild-base: Rebuild all base images" - @printf "%s\n" "make rebuild-mods: Rebuild all mods images" - @printf "%s\n" "make rebuild-prod: Rebuild all prod images" - @printf "%s\n" "make rebuild-work: Rebuild all work images" - @printf "\n" - @printf "%s\n" "make build-base-52: Build PHP 5.2 base image" - @printf "%s\n" "make build-base-53: Build PHP 5.3 base image" - @printf "%s\n" "make build-base-54: Build PHP 5.4 base image" - @printf "%s\n" "make build-base-55: Build PHP 5.5 base image" - @printf "%s\n" "make build-base-56: Build PHP 5.6 base image" - @printf "%s\n" "make build-base-70: Build PHP 7.0 base image" - @printf "%s\n" "make build-base-71: Build PHP 7.1 base image" - @printf "%s\n" "make build-base-72: Build PHP 7.2 base image" - @printf "%s\n" "make build-base-73: Build PHP 7.3 base image" - @printf "%s\n" "make build-base-74: Build PHP 7.4 base image" - @printf "%s\n" "make build-base-80: Build PHP 8.0 base image" - @printf "\n" - @printf "%s\n" "make build-mods-52: Build PHP 5.2 mods image" - @printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image" - @printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image" - @printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image" - @printf "%s\n" "make build-mods-56: Build PHP 5.6 mods image" - @printf "%s\n" "make build-mods-70: Build PHP 7.0 mods image" - @printf "%s\n" "make build-mods-71: Build PHP 7.1 mods image" - @printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image" - @printf "%s\n" "make build-mods-73: Build PHP 7.3 mods image" - @printf "%s\n" "make build-mods-74: Build PHP 7.4 mods image" - @printf "%s\n" "make build-mods-80: Build PHP 8.0 mods image" - @printf "\n" - @printf "%s\n" "make build-prod-52: Build PHP 5.2 prod image" - @printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image" - @printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image" - @printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image" - @printf "%s\n" "make build-prod-56: Build PHP 5.6 prod image" - @printf "%s\n" "make build-prod-70: Build PHP 7.0 prod image" - @printf "%s\n" "make build-prod-71: Build PHP 7.1 prod image" - @printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image" - @printf "%s\n" "make build-prod-73: Build PHP 7.3 prod image" - @printf "%s\n" "make build-prod-74: Build PHP 7.4 prod image" - @printf "%s\n" "make build-prod-80: Build PHP 8.0 prod image" - @printf "\n" - @printf "%s\n" "make build-work-52: Build PHP 5.2 work image" - @printf "%s\n" "make build-work-53: Build PHP 5.3 work image" - @printf "%s\n" "make build-work-54: Build PHP 5.4 work image" - @printf "%s\n" "make build-work-55: Build PHP 5.5 work image" - @printf "%s\n" "make build-work-56: Build PHP 5.6 work image" - @printf "%s\n" "make build-work-70: Build PHP 7.0 work image" - @printf "%s\n" "make build-work-71: Build PHP 7.1 work image" - @printf "%s\n" "make build-work-72: Build PHP 7.2 work image" - @printf "%s\n" "make build-work-73: Build PHP 7.3 work image" - @printf "%s\n" "make build-work-74: Build PHP 7.4 work image" - @printf "%s\n" "make build-work-80: Build PHP 8.0 work image" - @printf "\n" - @printf "%s\n" "make rebuild-base-52: Build PHP 5.2 base image" - @printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image" - @printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image" - @printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image" - @printf "%s\n" "make rebuild-base-56: Build PHP 5.6 base image" - @printf "%s\n" "make rebuild-base-70: Build PHP 7.0 base image" - @printf "%s\n" "make rebuild-base-71: Build PHP 7.1 base image" - @printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image" - @printf "%s\n" "make rebuild-base-73: Build PHP 7.3 base image" - @printf "%s\n" "make rebuild-base-74: Build PHP 7.4 base image" - @printf "%s\n" "make rebuild-base-80: Build PHP 8.0 base image" - @printf "\n" - @printf "%s\n" "make rebuild-mods-52: Build PHP 5.2 mods image" - @printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image" - @printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image" - @printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image" - @printf "%s\n" "make rebuild-mods-56: Build PHP 5.6 mods image" - @printf "%s\n" "make rebuild-mods-70: Build PHP 7.0 mods image" - @printf "%s\n" "make rebuild-mods-71: Build PHP 7.1 mods image" - @printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image" - @printf "%s\n" "make rebuild-mods-73: Build PHP 7.3 mods image" - @printf "%s\n" "make rebuild-mods-74: Build PHP 7.4 mods image" - @printf "%s\n" "make rebuild-mods-80: Build PHP 8.0 mods image" - @printf "\n" - @printf "%s\n" "make rebuild-prod-52: Build PHP 5.2 prod image" - @printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image" - @printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image" - @printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image" - @printf "%s\n" "make rebuild-prod-56: Build PHP 5.6 prod image" - @printf "%s\n" "make rebuild-prod-70: Build PHP 7.0 prod image" - @printf "%s\n" "make rebuild-prod-71: Build PHP 7.1 prod image" - @printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image" - @printf "%s\n" "make rebuild-prod-73: Build PHP 7.3 prod image" - @printf "%s\n" "make rebuild-prod-74: Build PHP 7.4 prod image" - @printf "%s\n" "make rebuild-prod-80: Build PHP 8.0 prod image" - @printf "\n" - @printf "%s\n" "make rebuild-work-52: Build PHP 5.2 work image" - @printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image" - @printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image" - @printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image" - @printf "%s\n" "make rebuild-work-56: Build PHP 5.6 work image" - @printf "%s\n" "make rebuild-work-70: Build PHP 7.0 work image" - @printf "%s\n" "make rebuild-work-71: Build PHP 7.1 work image" - @printf "%s\n" "make rebuild-work-72: Build PHP 7.2 work image" - @printf "%s\n" "make rebuild-work-73: Build PHP 7.3 work image" - @printf "%s\n" "make rebuild-work-74: Build PHP 7.4 work image" - @printf "%s\n" "make rebuild-work-80: Build PHP 8.0 work image" + @echo "################################################################################" + @echo "# devilbox/php:XX-XX Makefile" + @echo "################################################################################" + @echo + @echo "gen-readme [VERSION=] Update README.md with PHP modules from built images." + @echo "gen-dockerfiles Generate Dockerfiles from templates." + @echo + @echo "build-base VERSION= Build base image by specified version". + @echo "build-mods VERSION= Build mods image by specified version". + @echo "build-prod VERSION= Build prod image by specified version". + @echo "build-work VERSION= Build work image by specified version". + @echo + @echo "rebuild-base VERSION= Rebuild base image by specified version". + @echo "rebuild-mods VERSION= Rebuild mods image by specified version". + @echo "rebuild-prod VERSION= Rebuild prod image by specified version". + @echo "rebuild-work VERSION= Rebuild work image by specified version". + @echo + @echo "test-base VERSION= Test base image by specified version". + @echo "test-mods VERSION= Test mods image by specified version". + @echo "test-prod VERSION= Test prod image by specified version". + @echo "test-work VERSION= Test work image by specified version". +# ------------------------------------------------------------------------------------------------- +# GENERATE TARGETS +# ------------------------------------------------------------------------------------------------- -### -### Generate -### -generate: +gen-readme: +ifeq ($(strip $(VERSION)),) + cd build; ./gen-readme.sh +else + @$(MAKE) --no-print-directory _check-version + @$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=base + @$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods + cd build; ./gen-readme.sh ${VERSION} +endif + + +gen-dockerfiles: docker run --rm \ $$(tty -s && echo "-it" || echo) \ -e USER=ansible \ @@ -139,366 +66,149 @@ generate: cytopia/ansible:2.8 ansible-playbook generate.yml --diff -### -### Update readme -### -readme: - cd build; ./gen-readme.sh +# ------------------------------------------------------------------------------------------------- +# BUILD TARGETS +# ------------------------------------------------------------------------------------------------- -### -### Generate and build -### -gen-build: generate build-all -gen-rebuild: generate rebuild-all +build-base: _check-version +build-base: + docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-base -f $(DIR)/base/Dockerfile-${VERSION} $(DIR)/base - -### -### Build all -### -build-all: build-base build-mods build-prod build-work -rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work +build-mods: _check-version +build-mods: _EXIST_IMAGE=base +build-mods: _check-image-exists +build-mods: + docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-mods -f $(DIR)/mods/Dockerfile-${VERSION} $(DIR)/mods - -### -### Build categories -### -build-base: build-base-52 build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 build-base-74 build-base-80 -build-mods: build-mods-52 build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 build-mods-74 build-mods-80 -build-prod: build-prod-52 build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 build-prod-74 build-prod-80 -build-work: build-work-52 build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 build-work-74 build-work-80 - -rebuild-base: rebuild-base-52 rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 rebuild-base-74 rebuild-base-80 -rebuild-mods: rebuild-mods-52 rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 rebuild-mods-74 rebuild-mods-80 -rebuild-prod: rebuild-prod-52 rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 rebuild-prod-74 rebuild-prod-80 -rebuild-work: rebuild-work-52 rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 rebuild-work-74 rebuild-work-80 +build-prod: _check-version +build-prod: _EXIST_IMAGE=mods +build-prod: _check-image-exists +build-prod: + docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-prod -f $(DIR)/prod/Dockerfile-${VERSION} $(DIR)/prod - -### -### Build separately -### -build-base-52: pull-from-52 - docker build -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base -build-base-53: pull-from-53 - docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base -build-base-54: pull-from-54 - docker build -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base -build-base-55: pull-from-55 - docker build -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base -build-base-56: pull-from-56 - docker build -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base -build-base-70: pull-from-70 - docker build -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base -build-base-71: pull-from-71 - docker build -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base -build-base-72: pull-from-72 - docker build -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base -build-base-73: pull-from-73 - docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base -build-base-74: pull-from-74 - docker build -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base -build-base-80: pull-from-80 - docker build -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base - -build-mods-52: - docker build -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods -build-mods-53: - docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods -build-mods-54: - docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods -build-mods-55: - docker build -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods -build-mods-56: - docker build -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods -build-mods-70: - docker build -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods -build-mods-71: - docker build -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods -build-mods-72: - docker build -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods -build-mods-73: - docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods -build-mods-74: - docker build -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods -build-mods-80: - docker build -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods - -build-prod-52: - docker build -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod -build-prod-53: - docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod -build-prod-54: - docker build -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod -build-prod-55: - docker build -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod -build-prod-56: - docker build -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod -build-prod-70: - docker build -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod -build-prod-71: - docker build -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod -build-prod-72: - docker build -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod -build-prod-73: - docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod -build-prod-74: - docker build -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod -build-prod-80: - docker build -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod - -build-work-52: - docker build -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work -build-work-53: - docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work -build-work-54: - docker build -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work -build-work-55: - docker build -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work -build-work-56: - docker build -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work -build-work-70: - docker build -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work -build-work-71: - docker build -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work -build-work-72: - docker build -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work -build-work-73: - docker build -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work -build-work-74: - docker build -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work -build-work-80: - docker build -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work +build-work: _check-version +build-work: _EXIST_IMAGE=prod +build-work: _check-image-exists +build-work: + docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-work -f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work +# ------------------------------------------------------------------------------------------------- +# REBUILD TARGETS +# ------------------------------------------------------------------------------------------------- -### -### Rebuild separately -### -rebuild-base-52: pull-from-52 - docker build --no-cache -t devilbox/php-fpm:5.2-base -f $(location)/base/Dockerfile-5.2 $(location)/base -rebuild-base-53: pull-from-53 - docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base -rebuild-base-54: pull-from-54 - docker build --no-cache -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base -rebuild-base-55: pull-from-55 - docker build --no-cache -t devilbox/php-fpm:5.5-base -f $(location)/base/Dockerfile-5.5 $(location)/base -rebuild-base-56: pull-from-56 - docker build --no-cache -t devilbox/php-fpm:5.6-base -f $(location)/base/Dockerfile-5.6 $(location)/base -rebuild-base-70: pull-from-70 - docker build --no-cache -t devilbox/php-fpm:7.0-base -f $(location)/base/Dockerfile-7.0 $(location)/base -rebuild-base-71: pull-from-71 - docker build --no-cache -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base -rebuild-base-72: pull-from-72 - docker build --no-cache -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base -rebuild-base-73: pull-from-73 - docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base -rebuild-base-74: pull-from-74 - docker build --no-cache -t devilbox/php-fpm:7.4-base -f $(location)/base/Dockerfile-7.4 $(location)/base -rebuild-base-80: pull-from-80 - docker build --no-cache -t devilbox/php-fpm:8.0-base -f $(location)/base/Dockerfile-8.0 $(location)/base - -rebuild-mods-52: - docker build --no-cache -t devilbox/php-fpm:5.2-mods -f $(location)/mods/Dockerfile-5.2 $(location)/mods -rebuild-mods-53: - docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods -rebuild-mods-54: - docker build --no-cache -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods -rebuild-mods-55: - docker build --no-cache -t devilbox/php-fpm:5.5-mods -f $(location)/mods/Dockerfile-5.5 $(location)/mods -rebuild-mods-56: - docker build --no-cache -t devilbox/php-fpm:5.6-mods -f $(location)/mods/Dockerfile-5.6 $(location)/mods -rebuild-mods-70: - docker build --no-cache -t devilbox/php-fpm:7.0-mods -f $(location)/mods/Dockerfile-7.0 $(location)/mods -rebuild-mods-71: - docker build --no-cache -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods -rebuild-mods-72: - docker build --no-cache -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods -rebuild-mods-73: - docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods -rebuild-mods-74: - docker build --no-cache -t devilbox/php-fpm:7.4-mods -f $(location)/mods/Dockerfile-7.4 $(location)/mods -rebuild-mods-80: - docker build --no-cache -t devilbox/php-fpm:8.0-mods -f $(location)/mods/Dockerfile-8.0 $(location)/mods - -rebuild-prod-52: - docker build --no-cache -t devilbox/php-fpm:5.2-prod -f $(location)/prod/Dockerfile-5.2 $(location)/prod -rebuild-prod-53: - docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod -rebuild-prod-54: - docker build --no-cache -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod -rebuild-prod-55: - docker build --no-cache -t devilbox/php-fpm:5.5-prod -f $(location)/prod/Dockerfile-5.5 $(location)/prod -rebuild-prod-56: - docker build --no-cache -t devilbox/php-fpm:5.6-prod -f $(location)/prod/Dockerfile-5.6 $(location)/prod -rebuild-prod-70: - docker build --no-cache -t devilbox/php-fpm:7.0-prod -f $(location)/prod/Dockerfile-7.0 $(location)/prod -rebuild-prod-71: - docker build --no-cache -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod -rebuild-prod-72: - docker build --no-cache -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod -rebuild-prod-73: - docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod -rebuild-prod-74: - docker build --no-cache -t devilbox/php-fpm:7.4-prod -f $(location)/prod/Dockerfile-7.4 $(location)/prod -rebuild-prod-80: - docker build --no-cache -t devilbox/php-fpm:8.0-prod -f $(location)/prod/Dockerfile-8.0 $(location)/prod - -rebuild-work-52: - docker build --no-cache -t devilbox/php-fpm:5.2-work -f $(location)/work/Dockerfile-5.2 $(location)/work -rebuild-work-53: - docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work -rebuild-work-54: - docker build --no-cache -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work -rebuild-work-55: - docker build --no-cache -t devilbox/php-fpm:5.5-work -f $(location)/work/Dockerfile-5.5 $(location)/work -rebuild-work-56: - docker build --no-cache -t devilbox/php-fpm:5.6-work -f $(location)/work/Dockerfile-5.6 $(location)/work -rebuild-work-70: - docker build --no-cache -t devilbox/php-fpm:7.0-work -f $(location)/work/Dockerfile-7.0 $(location)/work -rebuild-work-71: - docker build --no-cache -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work -rebuild-work-72: - docker build --no-cache -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work -rebuild-work-73: - docker build --no-cache -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work -rebuild-work-74: - docker build --no-cache -t devilbox/php-fpm:7.4-work -f $(location)/work/Dockerfile-7.4 $(location)/work -rebuild-work-80: - docker build --no-cache -t devilbox/php-fpm:8.0-work -f $(location)/work/Dockerfile-8.0 $(location)/work +rebuild-base: _check-version +rebuild-base: _pull-root-image +rebuild-base: NO_CACHE=--no-cache +rebuild-base: build-base - -### -### Pull base FROM images -### -pull-from-52: - docker pull $(shell grep FROM $(location)/base/Dockerfile-5.2 | sed 's/^FROM\s*//g';) -pull-from-53: - docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM\s*//g';) -pull-from-54: - docker pull $(shell grep FROM $(location)/base/Dockerfile-5.4 | sed 's/^FROM\s*//g';) -pull-from-55: - docker pull $(shell grep FROM $(location)/base/Dockerfile-5.5 | sed 's/^FROM\s*//g';) -pull-from-56: - docker pull $(shell grep FROM $(location)/base/Dockerfile-5.6 | sed 's/^FROM\s*//g';) -pull-from-70: - docker pull $(shell grep FROM $(location)/base/Dockerfile-7.0 | sed 's/^FROM\s*//g';) -pull-from-71: - docker pull $(shell grep FROM $(location)/base/Dockerfile-7.1 | sed 's/^FROM\s*//g';) -pull-from-72: - docker pull $(shell grep FROM $(location)/base/Dockerfile-7.2 | sed 's/^FROM\s*//g';) -pull-from-73: - docker pull $(shell grep FROM $(location)/base/Dockerfile-7.3 | sed 's/^FROM\s*//g';) -pull-from-74: - docker pull $(shell grep FROM $(location)/base/Dockerfile-7.4 | sed 's/^FROM\s*//g';) -pull-from-80: - docker pull $(shell grep FROM $(location)/base/Dockerfile-8.0 | sed 's/^FROM\s*//g';) +rebuild-mods: NO_CACHE=--no-cache +rebuild-mods: build-mods -### -### Test all -### -test-all: test-base test-mods test-prod test-work - -test-base: test-base-52 test-base-53 test-base-54 test-base-55 test-base-56 test-base-70 test-base-71 test-base-72 test-base-73 test-base-74 test-base-80 -test-mods: test-mods-52 test-mods-53 test-mods-54 test-mods-55 test-mods-56 test-mods-70 test-mods-71 test-mods-72 test-mods-73 test-mods-74 test-mods-80 -test-prod: test-prod-52 test-prod-53 test-prod-54 test-prod-55 test-prod-56 test-prod-70 test-prod-71 test-prod-72 test-prod-73 test-prod-74 test-prod-80 -test-work: test-work-52 test-work-53 test-work-54 test-work-55 test-work-56 test-work-70 test-work-71 test-work-72 test-work-73 test-work-74 test-work-80 +rebuild-prod: NO_CACHE=--no-cache +rebuild-prod: build-prod -### -### Tests -### -test-base-52: - ./tests/test.sh 5.2 base -test-base-53: - ./tests/test.sh 5.3 base -test-base-54: - ./tests/test.sh 5.4 base -test-base-55: - ./tests/test.sh 5.5 base -test-base-56: - ./tests/test.sh 5.6 base -test-base-70: - ./tests/test.sh 7.0 base -test-base-71: - ./tests/test.sh 7.1 base -test-base-72: - ./tests/test.sh 7.2 base -test-base-73: - ./tests/test.sh 7.3 base -test-base-74: - ./tests/test.sh 7.4 base -test-base-80: - ./tests/test.sh 8.0 base +rebuild-work: NO_CACHE=--no-cache +rebuild-work: build-work -test-mods-52: - ./tests/test.sh 5.2 mods -test-mods-53: - ./tests/test.sh 5.3 mods -test-mods-54: - ./tests/test.sh 5.4 mods -test-mods-55: - ./tests/test.sh 5.5 mods -test-mods-56: - ./tests/test.sh 5.6 mods -test-mods-70: - ./tests/test.sh 7.0 mods -test-mods-71: - ./tests/test.sh 7.1 mods -test-mods-72: - ./tests/test.sh 7.2 mods -test-mods-73: - ./tests/test.sh 7.3 mods -test-mods-74: - ./tests/test.sh 7.4 mods -test-mods-80: - ./tests/test.sh 8.0 mods -test-prod-52: - ./tests/test.sh 5.2 prod -test-prod-53: - ./tests/test.sh 5.3 prod -test-prod-54: - ./tests/test.sh 5.4 prod -test-prod-55: - ./tests/test.sh 5.5 prod -test-prod-56: - ./tests/test.sh 5.6 prod -test-prod-70: - ./tests/test.sh 7.0 prod -test-prod-71: - ./tests/test.sh 7.1 prod -test-prod-72: - ./tests/test.sh 7.2 prod -test-prod-73: - ./tests/test.sh 7.3 prod -test-prod-74: - ./tests/test.sh 7.4 prod -test-prod-80: - ./tests/test.sh 8.0 prod +# ------------------------------------------------------------------------------------------------- +# TEST TARGETS +# ------------------------------------------------------------------------------------------------- -test-work-52: - ./tests/test.sh 5.2 work -test-work-53: - ./tests/test.sh 5.3 work -test-work-54: - ./tests/test.sh 5.4 work -test-work-55: - ./tests/test.sh 5.5 work -test-work-56: - ./tests/test.sh 5.6 work -test-work-70: - ./tests/test.sh 7.0 work -test-work-71: - ./tests/test.sh 7.1 work -test-work-72: - ./tests/test.sh 7.2 work -test-work-73: - ./tests/test.sh 7.3 work -test-work-74: - ./tests/test.sh 7.4 work -test-work-80: - ./tests/test.sh 8.0 work +test-base: _check-version +test-base: _EXIST_IMAGE=base +test-base: _check-image-exists +test-base: + ./tests/test.sh ${VERSION} base + + +test-mods: _check-version +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- 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)' is 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';) diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 12e2892..49d1a8a 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -35,14 +35,14 @@ get_modules() { tag="${1}" # 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 -it --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then + if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then ALL_MODULES="${ALL_MODULES},ioncube"; fi - if docker run -it --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then + if docker run --rm $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then ALL_MODULES="${ALL_MODULES},blackfire"; fi diff --git a/tests/.lib.sh b/tests/.lib.sh index 119ad42..4155f1e 100755 --- a/tests/.lib.sh +++ b/tests/.lib.sh @@ -28,7 +28,7 @@ function run() { printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2 fi - if sh -c "LANG=C LC_ALL=C ${cmd}"; then + if sh -c "${cmd}"; then if [ "${to_stderr}" -eq "0" ]; then printf "${green}[%s]${reset}\n" "OK" else @@ -67,7 +67,7 @@ function run_fail() { printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2 fi - if ! sh -c "LANG=C LC_ALL=C ${cmd}"; then + if ! sh -c "${cmd}"; then if [ "${to_stderr}" -eq "0" ]; then printf "${green}[%s]${reset}\n" "OK" else @@ -112,12 +112,12 @@ function docker_run() { local args="${*}" # Returns docker-id - did="$( run "docker run -d --name $( get_random_name ) ${args} ${image_name}" "1" )" - sleep 4 + did="$( run "docker run --rm -d --name $( get_random_name ) ${args} ${image_name}" "1" )" + sleep 10 # If it fails, start again in foreground to fail again, but show errors - if ! docker exec -it ${did} ls >/dev/null 2>&1; then - run "docker run --name $( get_random_name ) ${args} ${image_name}" "1" + if ! docker exec $(tty -s && echo "-it" || echo ) ${did} ls >/dev/null 2>&1; then + run "docker run --rm --name $( get_random_name ) ${args} ${image_name}" "1" return 1 fi @@ -146,7 +146,7 @@ function docker_exec() { shift local args="${*}" - run "docker exec ${args} -it ${did} ${cmd}" + run "docker exec ${args} $(tty -s && echo '-it' || echo) ${did} ${cmd}" } From 31864f8335081ea9d250648f865d2bd938819ec0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 2 Nov 2019 23:53:16 +0100 Subject: [PATCH 04/11] Fix mod images --- Dockerfiles/base/Dockerfile-5.2 | 20 +- Dockerfiles/base/Dockerfile-5.3 | 20 +- Dockerfiles/base/Dockerfile-5.4 | 20 +- Dockerfiles/base/Dockerfile-5.5 | 20 +- Dockerfiles/base/Dockerfile-5.6 | 20 +- Dockerfiles/base/Dockerfile-7.0 | 20 +- Dockerfiles/base/Dockerfile-7.1 | 20 +- Dockerfiles/base/Dockerfile-7.2 | 20 +- Dockerfiles/base/Dockerfile-7.3 | 20 +- Dockerfiles/base/Dockerfile-7.4 | 20 +- Dockerfiles/base/Dockerfile-8.0 | 20 +- Dockerfiles/mods/Dockerfile-5.2 | 913 ++++++++----- Dockerfiles/mods/Dockerfile-5.3 | 1092 ++++++++++------ Dockerfiles/mods/Dockerfile-5.4 | 1105 ++++++++++------ Dockerfiles/mods/Dockerfile-5.5 | 1087 ++++++++++------ Dockerfiles/mods/Dockerfile-5.6 | 1116 ++++++++++------ Dockerfiles/mods/Dockerfile-7.0 | 1201 +++++++++++------- Dockerfiles/mods/Dockerfile-7.1 | 1057 +++++++++------ Dockerfiles/mods/Dockerfile-7.2 | 1058 +++++++++------ Dockerfiles/mods/Dockerfile-7.3 | 1009 +++++++++------ Dockerfiles/mods/Dockerfile-7.4 | 943 ++++++++------ Dockerfiles/mods/Dockerfile-8.0 | 782 +++++++----- Dockerfiles/prod/Dockerfile-5.2 | 22 +- Dockerfiles/prod/Dockerfile-5.3 | 22 +- Dockerfiles/prod/Dockerfile-5.4 | 22 +- Dockerfiles/prod/Dockerfile-5.5 | 22 +- Dockerfiles/prod/Dockerfile-5.6 | 22 +- Dockerfiles/prod/Dockerfile-7.0 | 22 +- Dockerfiles/prod/Dockerfile-7.1 | 22 +- Dockerfiles/prod/Dockerfile-7.2 | 22 +- Dockerfiles/prod/Dockerfile-7.3 | 22 +- Dockerfiles/prod/Dockerfile-7.4 | 22 +- Dockerfiles/prod/Dockerfile-8.0 | 22 +- Dockerfiles/work/Dockerfile-5.2 | 21 +- Dockerfiles/work/Dockerfile-5.3 | 21 +- Dockerfiles/work/Dockerfile-5.4 | 21 +- Dockerfiles/work/Dockerfile-5.5 | 21 +- Dockerfiles/work/Dockerfile-5.6 | 21 +- Dockerfiles/work/Dockerfile-7.0 | 21 +- Dockerfiles/work/Dockerfile-7.1 | 21 +- Dockerfiles/work/Dockerfile-7.2 | 21 +- Dockerfiles/work/Dockerfile-7.3 | 21 +- Dockerfiles/work/Dockerfile-7.4 | 21 +- Dockerfiles/work/Dockerfile-8.0 | 21 +- Makefile | 128 +- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 22 +- build/ansible/DOCKERFILES/Dockerfile-mods.j2 | 494 ++++--- build/ansible/DOCKERFILES/Dockerfile-prod.j2 | 24 +- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 23 +- build/ansible/group_vars/all/all-ansible.yml | 10 +- build/ansible/group_vars/all/mods.yml | 94 +- 51 files changed, 8135 insertions(+), 4716 deletions(-) diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index bf313f4..2b84a61 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.2 Image" \ - image="devilbox/php-fpm" \ - tag="5.2-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index 8d269f6..f6358ea 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.3 Image" \ - image="devilbox/php-fpm" \ - tag="5.3-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 4b3aef5..d9ebc27 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.4 Image" \ - image="devilbox/php-fpm" \ - tag="5.4-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index 3c2c829..802a0fe 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.5 Image" \ - image="devilbox/php-fpm" \ - tag="5.5-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 6dd7569..46ee287 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.6 Image" \ - image="devilbox/php-fpm" \ - tag="5.6-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index e659a66..d2c48de 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.0 Image" \ - image="devilbox/php-fpm" \ - tag="7.0-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 131247a..49ccb98 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.1 Image" \ - image="devilbox/php-fpm" \ - tag="7.1-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index 934fc03..efadfc2 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.2 Image" \ - image="devilbox/php-fpm" \ - tag="7.2-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index ef741ae..44925ea 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.3 Image" \ - image="devilbox/php-fpm" \ - tag="7.3-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-7.4 b/Dockerfiles/base/Dockerfile-7.4 index 384e0e0..6088a1a 100644 --- a/Dockerfiles/base/Dockerfile-7.4 +++ b/Dockerfiles/base/Dockerfile-7.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.4 Image" \ - image="devilbox/php-fpm" \ - tag="7.4-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/base/Dockerfile-8.0 b/Dockerfiles/base/Dockerfile-8.0 index 9dcd88a..51c9a31 100644 --- a/Dockerfiles/base/Dockerfile-8.0 +++ b/Dockerfiles/base/Dockerfile-8.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 8.0 Image" \ - image="devilbox/php-fpm" \ - tag="8.0-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 0903f5d..c9d6669 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -1,60 +1,575 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:5.2-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:5.2-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + firebird-dev \ + freetds-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagic-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + snmp \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install amqp-1.4.0 \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Custom: Pecl command + && echo "/usr" | pecl install enchant \ + # Enabling + && docker-php-ext-enable enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: fileinfo -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install fileinfo \ + # Enabling + && docker-php-ext-enable fileinfo \ + && true + + +# -------------------- Installing PHP Extension: ftp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ftp --with-openssl-dir \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Version specific pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ +ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ +ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ +mkdir /usr/include/freetype2/freetype && \ +ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: igbinary -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary-2.0.7 \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install intl \ + # Enabling + && docker-php-ext-enable intl \ + && true + + +# -------------------- Installing PHP Extension: ldap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack-0.5.7 \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: 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 \ + # Enabling + && docker-php-ext-enable opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + && true + + +# -------------------- Installing PHP Extension: phar -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install phar \ + # Enabling + && docker-php-ext-enable phar \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: recode -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install redis-2.2.7 \ + # Enabling + && docker-php-ext-enable redis \ + && true + + +# -------------------- Installing PHP Extension: shmop -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ + && true + + +# -------------------- Installing PHP Extension: snmp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure snmp --with-openssl-dir \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + && true + + +# -------------------- Installing PHP Extension: sockets -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && true + + +# -------------------- Installing PHP Extension: uploadprogress -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install uploadprogress \ + # Enabling + && docker-php-ext-enable uploadprogress \ + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug-2.2.7 \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ + && true + + + + +# Fix php.ini settings for enabled extensions +RUN set -eux \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* + +# Fix oracle dir for images that don't have oci installed +RUN set -eux \ + && mkdir -p /usr/lib/oracle/ + +# Shrink everything down +RUN set -eux \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + + +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:5.2-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.2 Image" \ - image="devilbox/php-fpm" \ - tag="5.2-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="5.2-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 5.2-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - 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 +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaspell15 \ libc-client2007e \ libenchant1c2a \ @@ -75,313 +590,19 @@ ENV RUN_DEPS \ libxpm4 \ libxslt1.1 \ snmp \ - ca-certificates - - -### -### Install -### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_5.2.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && pecl install amqp-1.4.0 \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && echo "/usr" | pecl install enchant \ - && docker-php-ext-enable enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: fileinfo ---- - && pecl install fileinfo \ - && docker-php-ext-enable fileinfo \ - && (rm -rf /usr/local/lib/php/test/fileinfo || true) \ - && (rm -rf /usr/local/lib/php/doc/fileinfo || true) \ - \ -# ---- Installing PHP Extension: ftp ---- - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ - && (rm -rf /usr/local/lib/php/test/ftp || true) \ - && (rm -rf /usr/local/lib/php/doc/ftp || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ -ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ -ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ -mkdir /usr/include/freetype2/freetype && \ -ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ - \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary-2.0.7 \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && pecl install intl \ - && docker-php-ext-enable intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack-0.5.7 \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && pecl install memcache \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached-2.1.0 \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongo ---- - && yes | pecl install mongo-1.5.8 \ - && docker-php-ext-enable mongo \ - && (rm -rf /usr/local/lib/php/test/mongo || true) \ - && (rm -rf /usr/local/lib/php/doc/mongo || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth-1.2.3 \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && pecl install zendopcache \ - && docker-php-ext-enable opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phar ---- - && pecl install phar \ - && docker-php-ext-enable phar \ - && (rm -rf /usr/local/lib/php/test/phar || true) \ - && (rm -rf /usr/local/lib/php/doc/phar || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis-2.2.7 \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && pecl install uploadprogress \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug-2.2.7 \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* \ \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + && update-ca-certificates +### +### Post Install +### ### ### 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' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 6968ec6..c746398 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -1,64 +1,686 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:5.3-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:5.3-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + snmp \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.3.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install amqp-1.9.3 \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install apcu-4.0.11 \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: ftp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ftp --with-openssl-dir \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Version specific pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: 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: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary-2.0.8 \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick-3.3.0 \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: 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: mbstring -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack-0.5.7 \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: 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.2.0 \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mongodb -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb-0.6.3 \ + # Enabling + && docker-php-ext-enable mongodb \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install oauth-1.2.3 \ + # Enabling + && docker-php-ext-enable oauth \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: opcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Custom: Pecl command + && pecl install zendopcache \ + # Enabling + && docker-php-ext-enable opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_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_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: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout phalcon-v2.0.9 \ + # Custom: Install command + && cd build && ./install >/dev/null \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install redis-4.3.0 \ + # 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.0.5 \ + # 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: PECL extension + # Default: Pecl command + && pecl install swoole-1.9.23 \ + # 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: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install uploadprogress \ + # Enabling + && docker-php-ext-enable uploadprogress \ + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug-2.2.7 \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ + && true + + + + +# Fix php.ini settings for enabled extensions +RUN set -eux \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* + +# Fix oracle dir for images that don't have oci installed +RUN set -eux \ + && mkdir -p /usr/lib/oracle/ + +# Shrink everything down +RUN set -eux \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + + +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:5.3-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.3 Image" \ - image="devilbox/php-fpm" \ - tag="5.3-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 5.3-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - snmp \ - zlib1g-dev \ - ca-certificates \ - git +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libc-client2007e \ @@ -83,377 +705,29 @@ ENV RUN_DEPS \ libxpm4 \ libxslt1.1 \ snmp \ - ca-certificates + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && update-ca-certificates ### -### Install +### Post Install ### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_5.3.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && pecl install amqp-1.9.3 \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- - && pecl install apcu-4.0.11 \ - && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: ftp ---- - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ - && (rm -rf /usr/local/lib/php/test/ftp || true) \ - && (rm -rf /usr/local/lib/php/doc/ftp || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary-2.0.8 \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- - && pecl install imagick-3.3.0 \ - && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mbstring ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ - && (rm -rf /usr/local/lib/php/test/mbstring || true) \ - && (rm -rf /usr/local/lib/php/doc/mbstring || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack-0.5.7 \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && pecl install memcache \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached-2.2.0 \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongo ---- - && yes | pecl install mongo \ - && docker-php-ext-enable mongo \ - && (rm -rf /usr/local/lib/php/test/mongo || true) \ - && (rm -rf /usr/local/lib/php/doc/mongo || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb-0.6.3 \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth-1.2.3 \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- +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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && pecl install zendopcache \ - && docker-php-ext-enable opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - && git checkout phalcon-v2.0.9 \ - && cd build && ./install >/dev/null \ - && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka-3.0.5 \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && pecl install swoole-1.9.23 \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && pecl install uploadprogress \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug-2.2.7 \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index 92d38e3..95b418c 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -1,64 +1,694 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:5.4-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:5.4-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + snmp \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.4.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install amqp-1.9.3 \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install apcu-4.0.11 \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install bcmath \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install exif \ + && true + + +# -------------------- Installing PHP Extension: ftp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ftp --with-openssl-dir \ + && docker-php-ext-install ftp \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Version specific 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-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # Installation + && docker-php-ext-install gd \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install 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 gmp \ + && true + + +# -------------------- Installing PHP Extension: igbinary -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary-2.0.8 \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Installation + && docker-php-ext-install 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 ldap \ + && true + + +# -------------------- Installing PHP Extension: mbstring -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install mbstring \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack-0.5.7 \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: 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.2.0 \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mongodb -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb-1.2.11 \ + # Enabling + && docker-php-ext-enable mongodb \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install mysql \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install mysqli \ + && 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: 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 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: Version specific + # Type: PECL extension + # Custom: Pecl command + && pecl install zendopcache \ + # Enabling + && docker-php-ext-enable opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install 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 pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install 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 pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install pgsql \ + && true + + +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout phalcon-v2.0.13 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install pspell \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install redis-4.3.0 \ + # 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.0.5 \ + # Enabling + && docker-php-ext-enable rdkafka \ + && true + + +# -------------------- Installing PHP Extension: shmop -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install 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 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 soap \ + && true + + +# -------------------- Installing PHP Extension: sockets -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install sockets \ + && true + + +# -------------------- Installing PHP Extension: swoole -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install swoole-1.9.23 \ + # Enabling + && docker-php-ext-enable swoole \ + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Installation + && docker-php-ext-install tidy \ + && true + + +# -------------------- Installing PHP Extension: uploadprogress -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install uploadprogress \ + # Enabling + && docker-php-ext-enable uploadprogress \ + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug-2.4.1 \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-install xmlrpc \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + # Installation + && docker-php-ext-install 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.4-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.4 Image" \ - image="devilbox/php-fpm" \ - tag="5.4-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 5.4-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - snmp \ - zlib1g-dev \ - ca-certificates \ - git +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libc-client2007e \ @@ -83,382 +713,29 @@ ENV RUN_DEPS \ libxpm4 \ libxslt1.1 \ snmp \ - ca-certificates + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && update-ca-certificates ### -### Install +### Post Install ### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_5.4.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && pecl install amqp-1.9.3 \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- - && pecl install apcu-4.0.11 \ - && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: ftp ---- - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install ftp \ - && (rm -rf /usr/local/lib/php/test/ftp || true) \ - && (rm -rf /usr/local/lib/php/doc/ftp || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary-2.0.8 \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- - && pecl install imagick \ - && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mbstring ---- - && /usr/local/bin/docker-php-ext-install mbstring \ - && (rm -rf /usr/local/lib/php/test/mbstring || true) \ - && (rm -rf /usr/local/lib/php/doc/mbstring || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack-0.5.7 \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && pecl install memcache \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached-2.2.0 \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongo ---- - && yes | pecl install mongo \ - && docker-php-ext-enable mongo \ - && (rm -rf /usr/local/lib/php/test/mongo || true) \ - && (rm -rf /usr/local/lib/php/doc/mongo || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb-1.2.11 \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysql ---- - && /usr/local/bin/docker-php-ext-install mysql \ - && (rm -rf /usr/local/lib/php/test/mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/mysql || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth-1.2.3 \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- +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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && pecl install zendopcache \ - && docker-php-ext-enable opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - && git checkout phalcon-v2.0.13 \ - && cd build && ./install \ - && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka-3.0.5 \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && pecl install swoole-1.9.23 \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && pecl install uploadprogress \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug-2.4.1 \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ - && /usr/local/bin/docker-php-ext-install zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index 5f06378..1d95a64 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -1,65 +1,682 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:5.5-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:5.5-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + snmp \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.5.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install amqp-1.9.3 \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install apcu-4.0.11 \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Version specific 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-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # 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: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary-2.0.8 \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: 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: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack-0.5.7 \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: 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.2.0 \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mongodb -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb-1.5.5 \ + # Enabling + && docker-php-ext-enable mongodb \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install oauth-1.2.3 \ + # Enabling + && docker-php-ext-enable oauth \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: opcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_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: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout v3.4.2 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: 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-4.3.0 \ + # 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.0.5 \ + # 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: PECL extension + # Default: Pecl command + && pecl install swoole-1.9.23 \ + # 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: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install uploadprogress \ + # Enabling + && docker-php-ext-enable uploadprogress \ + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug-2.4.1 \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ + && true + + + + +# Fix php.ini settings for enabled extensions +RUN set -eux \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* + +# Fix oracle dir for images that don't have oci installed +RUN set -eux \ + && mkdir -p /usr/lib/oracle/ + +# Shrink everything down +RUN set -eux \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + + +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:5.5-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.5 Image" \ - image="devilbox/php-fpm" \ - tag="5.5-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 5.5-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-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 +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libc-client2007e \ @@ -84,375 +701,29 @@ ENV RUN_DEPS \ libxpm4 \ libxslt1.1 \ snmp \ - ca-certificates + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && update-ca-certificates ### -### Install +### Post Install ### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_5.5.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && pecl install amqp-1.9.3 \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- - && pecl install apcu-4.0.11 \ - && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary-2.0.8 \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- - && pecl install imagick \ - && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack-0.5.7 \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && pecl install memcache \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached-2.2.0 \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongo ---- - && yes | pecl install mongo \ - && docker-php-ext-enable mongo \ - && (rm -rf /usr/local/lib/php/test/mongo || true) \ - && (rm -rf /usr/local/lib/php/doc/mongo || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ - && (rm -rf /usr/local/lib/php/test/mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/mysql || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth-1.2.3 \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- +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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - && git checkout v3.4.2 \ - && cd build && ./install \ - && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka-3.0.5 \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && pecl install swoole-1.9.23 \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && pecl install uploadprogress \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug-2.4.1 \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 778e2f3..522e731 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -1,67 +1,698 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:5.6-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:5.6-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + librecode-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: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_5.6.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && echo "/usr" | pecl install amqp \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install apcu-4.0.11 \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ +&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ +&& mkdir -p /tmp/blackfire \ +&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ +&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ +&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Version specific 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-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # 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: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary-2.0.8 \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: 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: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack-0.5.7 \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: 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.2.0 \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && 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: mysql -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install oauth-1.2.3 \ + # Enabling + && docker-php-ext-enable oauth \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: opcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_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: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout v3.4.2 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: 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-4.3.0 \ + # 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: PECL extension + # Default: Pecl command + && pecl install swoole-1.9.23 \ + # 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: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install uploadprogress \ + # Enabling + && docker-php-ext-enable uploadprogress \ + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug-2.4.1 \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: 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:5.6-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.6 Image" \ - image="devilbox/php-fpm" \ - tag="5.6-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 5.6-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - librecode-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 +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libc-client2007e \ @@ -88,386 +719,29 @@ ENV RUN_DEPS \ libxslt1.1 \ libzip4 \ snmp \ - ca-certificates + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && update-ca-certificates ### -### Install +### Post Install ### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_5.6.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && echo "/usr" | pecl install amqp \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- - && pecl install apcu-4.0.11 \ - && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: blackfire ---- - && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ -&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ -&& mkdir -p /tmp/blackfire \ -&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ -&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ -&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/blackfire || true) \ - && (rm -rf /usr/local/lib/php/doc/blackfire || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary-2.0.8 \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- - && pecl install imagick \ - && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack-0.5.7 \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && pecl install memcache \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached-2.2.0 \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongo ---- - && yes | pecl install mongo \ - && docker-php-ext-enable mongo \ - && (rm -rf /usr/local/lib/php/test/mongo || true) \ - && (rm -rf /usr/local/lib/php/doc/mongo || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ - && (rm -rf /usr/local/lib/php/test/mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/mysql || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth-1.2.3 \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- +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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - && git checkout v3.4.2 \ - && cd build && ./install \ - && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && pecl install swoole-1.9.23 \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && pecl install uploadprogress \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug-2.4.1 \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 281fef7..fe16065 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -1,68 +1,739 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:7.0-base -MAINTAINER "cytopia" +FROM devilbox/php-fpm:7.0-base as builder +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libwebp-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + libzip-dev \ + snmp \ + unixodbc-dev \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ +&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ +&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ +&& tar xvfz ioncube.tar.gz \ +&& cd ioncube \ +&& cp "ioncube_loader_lin_7.0.so" "${EXTENSION_DIR}/ioncube.so" \ +&& cd ../ \ +&& rm -rf ioncube \ +&& rm -rf ioncube.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && echo "/usr" | pecl install amqp \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install apcu \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ +&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ +&& mkdir -p /tmp/blackfire \ +&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ +&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ +&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ + \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: 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 --enable-gd-native-ttf \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: gmp -------------------- +RUN set -eux \ + # Generic pre-command + && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ + && true + + +# -------------------- Installing PHP Extension: igbinary -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: 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: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ + && cd /tmp/memcache \ + # Custom: Branch + && git checkout origin/php7 \ + # Default: Install command + && phpize \ + && ./configure --with-zlib-dir=/usr \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + +# -------------------- Installing PHP Extension: memcached -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install memcached \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- Installing PHP Extension: mongodb -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb \ + # Enabling + && docker-php-ext-enable mongodb \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install oauth \ + # Enabling + && docker-php-ext-enable oauth \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: opcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_oci -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR} \ + && 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: pdo_sqlsrv -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install pdo_sqlsrv-5.3.0 \ + # Enabling + && docker-php-ext-enable pdo_sqlsrv \ + && 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: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout v3.4.2 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: 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: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install redis \ + # Enabling + && docker-php-ext-enable redis \ + && true + + +# -------------------- Installing PHP Extension: rdkafka -------------------- +RUN set -eux \ + # Installation: 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: sqlsrv -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install sqlsrv-5.3.0 \ + # Enabling + && docker-php-ext-enable sqlsrv \ + && true + + +# -------------------- Installing PHP Extension: swoole -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install swoole-4.2.13 \ + # 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: 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: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xmlrpc -------------------- +RUN set -eux \ + # Installation: 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.0-base as final +MAINTAINER "cytopia" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.0 Image" \ - image="devilbox/php-fpm" \ - tag="7.0-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 7.0-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-mods" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - librecode-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - libzip-dev \ - snmp \ - unixodbc-dev \ - zlib1g-dev \ - ca-certificates \ - git +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libc-client2007e \ @@ -89,419 +760,29 @@ ENV RUN_DEPS \ libzip4 \ snmp \ unixodbc \ - ca-certificates - - -### -### Install -### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- - && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ -&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ -&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ -&& tar xvfz ioncube.tar.gz \ -&& cd ioncube \ -&& cp "ioncube_loader_lin_7.0.so" "${EXTENSION_DIR}/ioncube.so" \ -&& cd ../ \ -&& rm -rf ioncube \ -&& rm -rf ioncube.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- - && echo "/usr" | pecl install amqp \ - && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- - && pecl install apcu \ - && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: blackfire ---- - && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ -&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ -&& mkdir -p /tmp/blackfire \ -&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ -&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ -&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ - \ - && (rm -rf /usr/local/lib/php/test/blackfire || true) \ - && (rm -rf /usr/local/lib/php/doc/blackfire || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- - && pecl install imagick \ - && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- - && pecl install msgpack \ - && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- - && git clone https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ - && cd /tmp/memcache \ - && git checkout origin/php7 \ - && phpize \ - && ./configure --with-zlib-dir=/usr \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ - && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && pecl install memcached \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- - && pecl install oauth \ - && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: 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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- - && 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) \ - \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pdo_sqlsrv ---- - && pecl install pdo_sqlsrv-5.3.0 \ - && docker-php-ext-enable pdo_sqlsrv \ - && (rm -rf /usr/local/lib/php/test/pdo_sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_sqlsrv || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- - && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ - && cd /tmp/phalcon \ - && git checkout v3.4.2 \ - && cd build && ./install \ - && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && pecl install redis \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sqlsrv ---- - && pecl install sqlsrv-5.3.0 \ - && docker-php-ext-enable sqlsrv \ - && (rm -rf /usr/local/lib/php/test/sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/sqlsrv || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && pecl install swoole \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ - && cd /tmp/uploadprogress \ - && phpize \ - && ./configure --enable-uploadprogress \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- - && pecl install xdebug \ - && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* \ \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + && 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 -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index b69aa6d..842c11b 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -1,108 +1,77 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:7.1-base -MAINTAINER "cytopia" - - -### -### Labels -### -LABEL \ - name="cytopia's PHP-FPM 7.1 Image" \ - image="devilbox/php-fpm" \ - tag="7.1-mods" \ - vendor="devilbox" \ - license="MIT" - - -### -### Envs -### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - librecode-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - libzip-dev \ - snmp \ - unixodbc-dev \ - zlib1g-dev \ - ca-certificates \ - git - -ENV RUN_DEPS \ - libaio1 \ - libaspell15 \ - libc-client2007e \ - libenchant1c2a \ - libfbclient2 \ - libfreetype6 \ - libicu57 \ - libjpeg62-turbo \ - libmagickwand-6.q16-3 \ - libmcrypt4 \ - libmemcachedutil2 \ - libnghttp2-14 \ - libpng16-16 \ - libpq5 \ - librabbitmq4 \ - librdkafka1 \ - librecode0 \ - libsybdb5 \ - libtidy5 \ - libvpx4 \ - libwebp6 \ - libxpm4 \ - libxslt1.1 \ - libzip4 \ - snmp \ - unixodbc \ - ca-certificates +FROM devilbox/php-fpm:7.1-base as builder ### ### Install ### -RUN set -x \ +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 \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libwebp-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + libzip-dev \ + snmp \ + unixodbc-dev \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ && if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ && curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ @@ -113,27 +82,43 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command && echo "/usr" | pecl install amqp \ + # Enabling && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install apcu \ + # Enabling && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: blackfire ---- + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ && mkdir -p /tmp/blackfire \ @@ -141,135 +126,223 @@ RUN set -x \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ \ - && (rm -rf /usr/local/lib/php/test/blackfire || true) \ - && (rm -rf /usr/local/lib/php/doc/blackfire || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- + # 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 \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install imagick \ + # Enabling && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ + && true + + +# -------------------- Installing PHP Extension: ldap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install msgpack \ + # Enabling && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ && cd /tmp/memcache \ + # Custom: Branch && git checkout origin/php7 \ + # Default: Install command && phpize \ && ./configure --with-zlib-dir=/usr \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + # Enabling && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- + && true + + +# -------------------- Installing PHP Extension: memcached -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install memcached \ + # Enabling && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- + && 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 \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install oauth \ + # Enabling && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ && ORACLE_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' )" \ @@ -283,41 +356,68 @@ RUN set -x \ && 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) \ \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- + # 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' )" \ @@ -333,175 +433,354 @@ RUN set -x \ && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pdo_sqlsrv ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR} \ + && 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: pdo_sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install pdo_sqlsrv \ + # Enabling && docker-php-ext-enable pdo_sqlsrv \ - && (rm -rf /usr/local/lib/php/test/pdo_sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_sqlsrv || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- + && 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: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ + # Custom: Branch && git checkout v3.4.2 \ + # Custom: Install command && cd build && ./install \ + # Enabling && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: recode -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install redis \ + # Enabling && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- + && true + + +# -------------------- Installing PHP Extension: rdkafka -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install rdkafka \ + # Enabling && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sqlsrv ---- + && 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: sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install sqlsrv \ + # Enabling && docker-php-ext-enable sqlsrv \ - && (rm -rf /usr/local/lib/php/test/sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/sqlsrv || true) \ - \ -# ---- Installing PHP Extension: swoole ---- + && true + + +# -------------------- Installing PHP Extension: swoole -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install swoole \ + # Enabling && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && true + + +# -------------------- Installing PHP Extension: uploadprogress -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ + # Default: Install command && phpize \ && ./configure --enable-uploadprogress \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + # Enabling && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install xdebug \ + # Enabling && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ + && 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) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -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.1-base as final +MAINTAINER "cytopia" + +### +### 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 " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 7.1-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-mods" + + +### +### Copy artifacts from builder +### +ARG EXT_DIR +COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/ +COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ +COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/ + + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libaio1 \ + libaspell15 \ + libc-client2007e \ + libenchant1c2a \ + libfbclient2 \ + libfreetype6 \ + libicu63 \ + libjpeg62-turbo \ + libmagickwand-6.q16-6 \ + libmcrypt4 \ + libmemcachedutil2 \ + libnghttp2-14 \ + libpng16-16 \ + libpq5 \ + librabbitmq4 \ + librdkafka1 \ + librecode0 \ + libsybdb5 \ + libtidy5deb1 \ + libvpx5 \ + libwebp6 \ + libxpm4 \ + libxslt1.1 \ + libzip4 \ + snmp \ + unixodbc \ + 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 -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 326d5ac..fbfb088 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -1,108 +1,77 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:7.2-base -MAINTAINER "cytopia" - - -### -### Labels -### -LABEL \ - name="cytopia's PHP-FPM 7.2 Image" \ - image="devilbox/php-fpm" \ - tag="7.2-mods" \ - vendor="devilbox" \ - license="MIT" - - -### -### Envs -### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librabbitmq-dev \ - librdkafka-dev \ - librecode-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - libzip-dev \ - snmp \ - unixodbc-dev \ - zlib1g-dev \ - ca-certificates \ - git - -ENV RUN_DEPS \ - libaio1 \ - libaspell15 \ - libc-client2007e \ - libenchant1c2a \ - libfbclient2 \ - libfreetype6 \ - libicu57 \ - libjpeg62-turbo \ - libmagickwand-6.q16-3 \ - libmcrypt4 \ - libmemcachedutil2 \ - libnghttp2-14 \ - libpng16-16 \ - libpq5 \ - librabbitmq4 \ - librdkafka1 \ - librecode0 \ - libsybdb5 \ - libtidy5 \ - libvpx4 \ - libwebp6 \ - libxpm4 \ - libxslt1.1 \ - libzip4 \ - snmp \ - unixodbc \ - ca-certificates +FROM devilbox/php-fpm:7.2-base as builder ### ### Install ### -RUN set -x \ +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 \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: ioncube ---- + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librabbitmq-dev \ + librdkafka-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libwebp-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + libzip-dev \ + snmp \ + unixodbc-dev \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: ioncube -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension && EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \ && if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \ && curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \ @@ -113,27 +82,43 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ - && (rm -rf /usr/local/lib/php/test/ioncube || true) \ - && (rm -rf /usr/local/lib/php/doc/ioncube || true) \ - \ -# ---- Installing PHP Extension: amqp ---- + && true + + +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command && echo "/usr" | pecl install amqp \ + # Enabling && docker-php-ext-enable amqp \ - && (rm -rf /usr/local/lib/php/test/amqp || true) \ - && (rm -rf /usr/local/lib/php/doc/amqp || true) \ - \ -# ---- Installing PHP Extension: apcu ---- + && true + + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install apcu \ + # Enabling && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: blackfire ---- + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ && mkdir -p /tmp/blackfire \ @@ -141,136 +126,226 @@ RUN set -x \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ \ - && (rm -rf /usr/local/lib/php/test/blackfire || true) \ - && (rm -rf /usr/local/lib/php/doc/blackfire || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- + # 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 \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install imagick \ + # Enabling && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ + && true + + +# -------------------- Installing PHP Extension: ldap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command && pecl install mcrypt-1.0.1 \ + # Enabling && docker-php-ext-enable mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install msgpack \ + # Enabling && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcache ---- + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ && cd /tmp/memcache \ + # Custom: Branch && git checkout origin/php7 \ + # Default: Install command && phpize \ && ./configure --with-zlib-dir=/usr \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + # Enabling && docker-php-ext-enable memcache \ - && (rm -rf /usr/local/lib/php/test/memcache || true) \ - && (rm -rf /usr/local/lib/php/doc/memcache || true) \ - \ -# ---- Installing PHP Extension: memcached ---- + && true + + +# -------------------- Installing PHP Extension: memcached -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install memcached \ + # Enabling && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- + && 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 \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install oauth \ + # Enabling && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ && ORACLE_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' )" \ @@ -284,41 +359,68 @@ RUN set -x \ && 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) \ \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- + # 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' )" \ @@ -334,175 +436,355 @@ RUN set -x \ && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pdo_sqlsrv ---- + # 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: pdo_sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install pdo_sqlsrv \ + # Enabling && docker-php-ext-enable pdo_sqlsrv \ - && (rm -rf /usr/local/lib/php/test/pdo_sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_sqlsrv || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: phalcon ---- + && 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: phalcon -------------------- +RUN set -eux \ + # Installation: Generic + # Type: GIT extension && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ + # Custom: Branch && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) \ + # Custom: Install command && cd build && ./install \ + # Enabling && docker-php-ext-enable phalcon \ - && (rm -rf /usr/local/lib/php/test/phalcon || true) \ - && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: recode -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install redis \ + # Enabling && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- + && true + + +# -------------------- Installing PHP Extension: rdkafka -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install rdkafka \ + # Enabling && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sqlsrv ---- + && 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: sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install sqlsrv \ + # Enabling && docker-php-ext-enable sqlsrv \ - && (rm -rf /usr/local/lib/php/test/sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/sqlsrv || true) \ - \ -# ---- Installing PHP Extension: swoole ---- + && true + + +# -------------------- Installing PHP Extension: swoole -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install swoole \ + # Enabling && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && true + + +# -------------------- Installing PHP Extension: uploadprogress -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ + # Default: Install command && phpize \ && ./configure --enable-uploadprogress \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + # Enabling && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install xdebug \ + # Enabling && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ + && 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) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -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.2-base as final +MAINTAINER "cytopia" + +### +### 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 " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 7.2-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 7.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 \ + libaio1 \ + libaspell15 \ + libc-client2007e \ + libenchant1c2a \ + libfbclient2 \ + libfreetype6 \ + libicu63 \ + libjpeg62-turbo \ + libmagickwand-6.q16-6 \ + libmcrypt4 \ + libmemcachedutil2 \ + libnghttp2-14 \ + libpng16-16 \ + libpq5 \ + librabbitmq4 \ + librdkafka1 \ + librecode0 \ + libsybdb5 \ + libtidy5deb1 \ + libvpx5 \ + libwebp6 \ + libxpm4 \ + libxslt1.1 \ + libzip4 \ + snmp \ + unixodbc \ + 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 -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 7478da5..703e17f 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -1,120 +1,97 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:7.3-base -MAINTAINER "cytopia" - - -### -### Labels -### -LABEL \ - name="cytopia's PHP-FPM 7.3 Image" \ - image="devilbox/php-fpm" \ - tag="7.3-mods" \ - vendor="devilbox" \ - license="MIT" - - -### -### Envs -### -ENV BUILD_DEPS \ - alien \ - cmake \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libc-client-dev \ - libcurl4-openssl-dev \ - libenchant-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libhiredis-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libnghttp2-dev \ - libpcre3-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librdkafka-dev \ - librecode-dev \ - libsasl2-dev \ - libsnmp-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - libzip-dev \ - snmp \ - unixodbc-dev \ - zlib1g-dev \ - ca-certificates \ - git - -ENV RUN_DEPS \ - libaio1 \ - libaspell15 \ - libc-client2007e \ - libenchant1c2a \ - libfbclient2 \ - libfreetype6 \ - libhiredis0.13 \ - libicu57 \ - libjpeg62-turbo \ - libmagickwand-6.q16-3 \ - libmcrypt4 \ - libmemcachedutil2 \ - libnghttp2-14 \ - libpng16-16 \ - libpq5 \ - librdkafka1 \ - librecode0 \ - libsybdb5 \ - libtidy5 \ - libvpx4 \ - libwebp6 \ - libxpm4 \ - libxslt1.1 \ - libzip4 \ - snmp \ - unixodbc \ - ca-certificates +FROM devilbox/php-fpm:7.3-base as builder ### ### Install ### -RUN set -x \ +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 \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: apcu ---- + alien \ + cmake \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libhiredis-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ + libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libnghttp2-dev \ + libpcre3-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + librdkafka-dev \ + librecode-dev \ + libsasl2-dev \ + libsnmp-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libwebp-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + libzip-dev \ + snmp \ + unixodbc-dev \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install apcu \ + # Enabling && docker-php-ext-enable apcu \ - && (rm -rf /usr/local/lib/php/test/apcu || true) \ - && (rm -rf /usr/local/lib/php/doc/apcu || true) \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: blackfire ---- + && true + + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ && mkdir -p /tmp/blackfire \ @@ -122,124 +99,208 @@ RUN set -x \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ \ - && (rm -rf /usr/local/lib/php/test/blackfire || true) \ - && (rm -rf /usr/local/lib/php/doc/blackfire || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: enchant ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ - && (rm -rf /usr/local/lib/php/test/enchant || true) \ - && (rm -rf /usr/local/lib/php/doc/enchant || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- + # 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 \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: imagick ---- + && true + + +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install imagick \ + # Enabling && docker-php-ext-enable imagick \ - && (rm -rf /usr/local/lib/php/test/imagick || true) \ - && (rm -rf /usr/local/lib/php/doc/imagick || true) \ - \ -# ---- Installing PHP Extension: imap ---- + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ - && (rm -rf /usr/local/lib/php/test/imap || true) \ - && (rm -rf /usr/local/lib/php/doc/imap || true) \ - \ -# ---- Installing PHP Extension: interbase ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ - && (rm -rf /usr/local/lib/php/test/interbase || true) \ - && (rm -rf /usr/local/lib/php/doc/interbase || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ + && true + + +# -------------------- Installing PHP Extension: ldap -------------------- +RUN set -eux \ + # Generic pre-command && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: mcrypt ---- + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && true + + +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command && pecl install mcrypt-1.0.2 \ + # Enabling && docker-php-ext-enable mcrypt \ - && (rm -rf /usr/local/lib/php/test/mcrypt || true) \ - && (rm -rf /usr/local/lib/php/doc/mcrypt || true) \ - \ -# ---- Installing PHP Extension: msgpack ---- + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install msgpack \ + # Enabling && docker-php-ext-enable msgpack \ - && (rm -rf /usr/local/lib/php/test/msgpack || true) \ - && (rm -rf /usr/local/lib/php/doc/msgpack || true) \ - \ -# ---- Installing PHP Extension: memcached ---- + && true + + +# -------------------- Installing PHP Extension: memcached -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install memcached \ + # Enabling && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- + && 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 \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oauth ---- + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install oauth \ + # Enabling && docker-php-ext-enable oauth \ - && (rm -rf /usr/local/lib/php/test/oauth || true) \ - && (rm -rf /usr/local/lib/php/doc/oauth || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ && ORACLE_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' )" \ @@ -253,41 +314,68 @@ RUN set -x \ && 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) \ \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- + # 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' )" \ @@ -303,81 +391,136 @@ RUN set -x \ && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pdo_sqlsrv ---- + # 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: pdo_sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install pdo_sqlsrv \ + # Enabling && docker-php-ext-enable pdo_sqlsrv \ - && (rm -rf /usr/local/lib/php/test/pdo_sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_sqlsrv || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- + && 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: 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: Generic + # Type: PECL extension + # Default: Pecl command && pecl install redis \ + # Enabling && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- + && true + + +# -------------------- Installing PHP Extension: rdkafka -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install rdkafka \ + # Enabling && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sqlsrv ---- + && 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: sqlsrv -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install sqlsrv \ + # Enabling && docker-php-ext-enable sqlsrv \ - && (rm -rf /usr/local/lib/php/test/sqlsrv || true) \ - && (rm -rf /usr/local/lib/php/doc/sqlsrv || true) \ - \ -# ---- Installing PHP Extension: swoole ---- + && 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 $(git describe --abbrev=0 --tags) \ + # Custom: Install command && phpize \ && ./configure \ --enable-openssl \ @@ -388,93 +531,213 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ \ + # Enabling && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && true + + +# -------------------- Installing PHP Extension: uploadprogress -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension && git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ + # Default: Install command && phpize \ && ./configure --enable-uploadprogress \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + # Enabling && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: wddx ---- - && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && (rm -rf /usr/local/lib/php/test/wddx || true) \ - && (rm -rf /usr/local/lib/php/doc/wddx || true) \ - \ -# ---- Installing PHP Extension: xdebug ---- + && true + + +# -------------------- Installing PHP Extension: wddx -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && true + + +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command && pecl install xdebug \ + # Enabling && docker-php-ext-enable xdebug \ - && (rm -rf /usr/local/lib/php/test/xdebug || true) \ - && (rm -rf /usr/local/lib/php/doc/xdebug || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ + && 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) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -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.3-base as final +MAINTAINER "cytopia" + +### +### 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 " +LABEL "org.opencontainers.image.authors"="cytopia " +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-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 7.3-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-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 \ + libc-client2007e \ + libenchant1c2a \ + libfbclient2 \ + libfreetype6 \ + libhiredis0.14 \ + libicu63 \ + libjpeg62-turbo \ + libmagickwand-6.q16-6 \ + libmcrypt4 \ + libmemcachedutil2 \ + libnghttp2-14 \ + libpng16-16 \ + libpq5 \ + librdkafka1 \ + librecode0 \ + libsybdb5 \ + libtidy5deb1 \ + libvpx5 \ + libwebp6 \ + libxpm4 \ + libxslt1.1 \ + libzip4 \ + snmp \ + unixodbc \ + 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 -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index cf51d0c..e0ada70 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -1,62 +1,570 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:7.4-base -MAINTAINER "cytopia" +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" + ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.4 Image" \ - image="devilbox/php-fpm" \ - tag="7.4-mods" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### -### Envs +### Copy artifacts from builder ### -ENV BUILD_DEPS \ - 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 \ - librecode-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 +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/ -ENV RUN_DEPS \ + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ libfbclient2 \ @@ -70,7 +578,6 @@ ENV RUN_DEPS \ libpng16-16 \ libpq5 \ librdkafka1 \ - librecode0 \ libsybdb5 \ libtidy5 \ libvpx4 \ @@ -79,333 +586,29 @@ ENV RUN_DEPS \ libxslt1.1 \ libzip4 \ snmp \ - ca-certificates - - -### -### Install -### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: ffi ---- - && git clone https://github.com/dstogov/php-ffi /tmp/ffi \ - && cd /tmp/ffi \ - && phpize \ -&& ./configure --with-ffi \ -&& make -j$(getconf _NPROCESSORS_ONLN) \ -&& make install \ - \ - && docker-php-ext-enable ffi \ - && (rm -rf /usr/local/lib/php/test/ffi || true) \ - && (rm -rf /usr/local/lib/php/doc/ffi || true) \ - \ -# ---- Installing PHP Extension: gd ---- - && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- - && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: igbinary ---- - && pecl install igbinary \ - && docker-php-ext-enable igbinary \ - && (rm -rf /usr/local/lib/php/test/igbinary || true) \ - && (rm -rf /usr/local/lib/php/doc/igbinary || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- - && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: memcached ---- - && git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \ - && cd /tmp/memcached \ - && git checkout master \ - && phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install \ - && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- - && pecl install mongodb \ - && docker-php-ext-enable mongodb \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: 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' )" \ -\ -&& 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) \ - \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- - && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- - && 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) \ - \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- - && git clone https://github.com/phpredis/phpredis /tmp/redis \ - && cd /tmp/redis \ - && 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 \ - \ - && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: rdkafka ---- - && pecl install rdkafka \ - && docker-php-ext-enable rdkafka \ - && (rm -rf /usr/local/lib/php/test/rdkafka || true) \ - && (rm -rf /usr/local/lib/php/doc/rdkafka || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: swoole ---- - && git clone https://github.com/swoole/swoole-src /tmp/swoole \ - && cd /tmp/swoole \ - && git checkout master \ - && phpize \ -&& ./configure \ - --enable-openssl \ - --enable-sockets \ - --enable-http2 \ - --enable-mysqlnd \ - --enable-coroutine-postgresql \ -&& make -j$(getconf _NPROCESSORS_ONLN) \ -&& make install \ - \ - && docker-php-ext-enable swoole \ - && (rm -rf /usr/local/lib/php/test/swoole || true) \ - && (rm -rf /usr/local/lib/php/doc/swoole || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- - && git clone https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ - && cd /tmp/uploadprogress \ - && phpize \ - && ./configure --enable-uploadprogress \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ - && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* \ \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + && 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 -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.4' \ && /usr/local/sbin/php-fpm --test \ @@ -508,8 +711,6 @@ RUN set -x \ && php -m | grep -oiE '^pspell$' \ && php-fpm -m | grep -oiE '^pspell$' \ && php -m | grep -oiE '^readline$' \ - && php -m | grep -oiE '^recode$' \ - && php-fpm -m | grep -oiE '^recode$' \ && php -m | grep -oiE '^redis$' \ && php-fpm -m | grep -oiE '^redis$' \ && php -m | grep -oiE '^reflection$' \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index dacf6d5..cc64da9 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -1,149 +1,163 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:8.0-base -MAINTAINER "cytopia" - - -### -### Labels -### -LABEL \ - name="cytopia's PHP-FPM 8.0 Image" \ - image="devilbox/php-fpm" \ - tag="8.0-mods" \ - vendor="devilbox" \ - license="MIT" - - -### -### Envs -### -ENV BUILD_DEPS \ - alien \ - firebird-dev \ - freetds-dev \ - libaio-dev \ - libbz2-dev \ - libevent-dev \ - libfbclient2 \ - libfreetype6-dev \ - libgmp-dev \ - libib-util \ - libicu-dev \ - libjpeg-dev \ - libldap2-dev \ - libmemcached-dev \ - libpng-dev \ - libpq-dev \ - libpspell-dev \ - librecode-dev \ - libsasl2-dev \ - libsnmp-dev \ - libsodium-dev \ - libssl-dev \ - libtidy-dev \ - libvpx-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libxslt-dev \ - libzip-dev \ - snmp \ - zlib1g-dev \ - ca-certificates \ - git - -ENV RUN_DEPS \ - libaio1 \ - libaspell15 \ - libfbclient2 \ - libffi6 \ - libfreetype6 \ - libicu57 \ - libjpeg62-turbo \ - libmemcachedutil2 \ - libpng16-16 \ - libpq5 \ - librecode0 \ - libsybdb5 \ - libtidy5 \ - libvpx4 \ - libwebp6 \ - libxpm4 \ - libxslt1.1 \ - libzip4 \ - snmp \ - ca-certificates +FROM devilbox/php-fpm:8.0-base as builder ### ### Install ### -RUN set -x \ +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 \ - ${BUILD_DEPS} \ - \ - \ -# ---- Installing PHP Extension: bcmath ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ - && (rm -rf /usr/local/lib/php/test/bcmath || true) \ - && (rm -rf /usr/local/lib/php/doc/bcmath || true) \ - \ -# ---- Installing PHP Extension: bz2 ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ - && (rm -rf /usr/local/lib/php/test/bz2 || true) \ - && (rm -rf /usr/local/lib/php/doc/bz2 || true) \ - \ -# ---- Installing PHP Extension: calendar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && (rm -rf /usr/local/lib/php/test/calendar || true) \ - && (rm -rf /usr/local/lib/php/doc/calendar || true) \ - \ -# ---- Installing PHP Extension: dba ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && (rm -rf /usr/local/lib/php/test/dba || true) \ - && (rm -rf /usr/local/lib/php/doc/dba || true) \ - \ -# ---- Installing PHP Extension: exif ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && (rm -rf /usr/local/lib/php/test/exif || true) \ - && (rm -rf /usr/local/lib/php/doc/exif || true) \ - \ -# ---- Installing PHP Extension: gd ---- + 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/ \ - && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ - && (rm -rf /usr/local/lib/php/test/gd || true) \ - && (rm -rf /usr/local/lib/php/doc/gd || true) \ - \ -# ---- Installing PHP Extension: gettext ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && (rm -rf /usr/local/lib/php/test/gettext || true) \ - && (rm -rf /usr/local/lib/php/doc/gettext || true) \ - \ -# ---- Installing PHP Extension: gmp ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && (rm -rf /usr/local/lib/php/test/gmp || true) \ - && (rm -rf /usr/local/lib/php/doc/gmp || true) \ - \ -# ---- Installing PHP Extension: intl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && (rm -rf /usr/local/lib/php/test/intl || true) \ - && (rm -rf /usr/local/lib/php/doc/intl || true) \ - \ -# ---- Installing PHP Extension: ldap ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && (rm -rf /usr/local/lib/php/test/ldap || true) \ - && (rm -rf /usr/local/lib/php/doc/ldap || true) \ - \ -# ---- Installing PHP Extension: memcached ---- + # 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 \ @@ -152,14 +166,20 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ \ + # Enabling && docker-php-ext-enable memcached \ - && (rm -rf /usr/local/lib/php/test/memcached || true) \ - && (rm -rf /usr/local/lib/php/doc/memcached || true) \ - \ -# ---- Installing PHP Extension: mongodb ---- + && 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 \ - && git submodule update --init \ + # Custom: Install command + && git checkout v1.6 \ +&& git submodule update --init \ # FIXME: This is a work-around to mitigate compile error with PHP 8.0 && 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' \ @@ -171,21 +191,39 @@ RUN set -x \ && 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 \ - && (rm -rf /usr/local/lib/php/test/mongodb || true) \ - && (rm -rf /usr/local/lib/php/doc/mongodb || true) \ - \ -# ---- Installing PHP Extension: mysqli ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ - && (rm -rf /usr/local/lib/php/test/mysqli || true) \ - && (rm -rf /usr/local/lib/php/doc/mysqli || true) \ - \ -# ---- Installing PHP Extension: oci8 ---- + && 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' )" \ @@ -199,41 +237,68 @@ RUN set -x \ && 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) \ \ - && /usr/local/bin/docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ - && (rm -rf /usr/local/lib/php/test/oci8 || true) \ - && (rm -rf /usr/local/lib/php/doc/oci8 || true) \ - \ -# ---- Installing PHP Extension: opcache ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ - && (rm -rf /usr/local/lib/php/test/opcache || true) \ - && (rm -rf /usr/local/lib/php/doc/opcache || true) \ - \ -# ---- Installing PHP Extension: pcntl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && (rm -rf /usr/local/lib/php/test/pcntl || true) \ - && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ - \ -# ---- Installing PHP Extension: pdo_dblib ---- + # 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/ \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ - && (rm -rf /usr/local/lib/php/test/pdo_dblib || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_dblib || true) \ - \ -# ---- Installing PHP Extension: pdo_firebird ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && (rm -rf /usr/local/lib/php/test/pdo_firebird || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_firebird || true) \ - \ -# ---- Installing PHP Extension: pdo_mysql ---- - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ - && (rm -rf /usr/local/lib/php/test/pdo_mysql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_mysql || true) \ - \ -# ---- Installing PHP Extension: pdo_oci ---- + # 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' )" \ @@ -249,34 +314,46 @@ RUN set -x \ && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ \ - && /usr/local/bin/docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ - && (rm -rf /usr/local/lib/php/test/pdo_oci || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_oci || true) \ - \ -# ---- Installing PHP Extension: pdo_pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && (rm -rf /usr/local/lib/php/test/pdo_pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pdo_pgsql || true) \ - \ -# ---- Installing PHP Extension: pgsql ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && (rm -rf /usr/local/lib/php/test/pgsql || true) \ - && (rm -rf /usr/local/lib/php/doc/pgsql || true) \ - \ -# ---- Installing PHP Extension: pspell ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && (rm -rf /usr/local/lib/php/test/pspell || true) \ - && (rm -rf /usr/local/lib/php/doc/pspell || true) \ - \ -# ---- Installing PHP Extension: recode ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ - && (rm -rf /usr/local/lib/php/test/recode || true) \ - && (rm -rf /usr/local/lib/php/doc/recode || true) \ - \ -# ---- Installing PHP Extension: redis ---- + # 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 \ @@ -292,60 +369,95 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ \ + # Enabling && docker-php-ext-enable redis \ - && (rm -rf /usr/local/lib/php/test/redis || true) \ - && (rm -rf /usr/local/lib/php/doc/redis || true) \ - \ -# ---- Installing PHP Extension: shmop ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && (rm -rf /usr/local/lib/php/test/shmop || true) \ - && (rm -rf /usr/local/lib/php/doc/shmop || true) \ - \ -# ---- Installing PHP Extension: snmp ---- - && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && (rm -rf /usr/local/lib/php/test/snmp || true) \ - && (rm -rf /usr/local/lib/php/doc/snmp || true) \ - \ -# ---- Installing PHP Extension: soap ---- - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ - && (rm -rf /usr/local/lib/php/test/soap || true) \ - && (rm -rf /usr/local/lib/php/doc/soap || true) \ - \ -# ---- Installing PHP Extension: sockets ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && (rm -rf /usr/local/lib/php/test/sockets || true) \ - && (rm -rf /usr/local/lib/php/doc/sockets || true) \ - \ -# ---- Installing PHP Extension: sodium ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ - && (rm -rf /usr/local/lib/php/test/sodium || true) \ - && (rm -rf /usr/local/lib/php/doc/sodium || true) \ - \ -# ---- Installing PHP Extension: sysvmsg ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ - && (rm -rf /usr/local/lib/php/test/sysvmsg || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvmsg || true) \ - \ -# ---- Installing PHP Extension: sysvsem ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ - && (rm -rf /usr/local/lib/php/test/sysvsem || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvsem || true) \ - \ -# ---- Installing PHP Extension: sysvshm ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ - && (rm -rf /usr/local/lib/php/test/sysvshm || true) \ - && (rm -rf /usr/local/lib/php/doc/sysvshm || true) \ - \ -# ---- Installing PHP Extension: tidy ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && (rm -rf /usr/local/lib/php/test/tidy || true) \ - && (rm -rf /usr/local/lib/php/doc/tidy || true) \ - \ -# ---- Installing PHP Extension: uploadprogress ---- + && 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 \ @@ -357,50 +469,136 @@ RUN set -x \ && make \ && make install \ \ + # Enabling && docker-php-ext-enable uploadprogress \ - && (rm -rf /usr/local/lib/php/test/uploadprogress || true) \ - && (rm -rf /usr/local/lib/php/doc/uploadprogress || true) \ - \ -# ---- Installing PHP Extension: xmlrpc ---- - && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && (rm -rf /usr/local/lib/php/test/xmlrpc || true) \ - && (rm -rf /usr/local/lib/php/doc/xmlrpc || true) \ - \ -# ---- Installing PHP Extension: xsl ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ - && (rm -rf /usr/local/lib/php/test/xsl || true) \ - && (rm -rf /usr/local/lib/php/doc/xsl || true) \ - \ -# ---- Installing PHP Extension: zip ---- - && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ - && (rm -rf /usr/local/lib/php/test/zip || true) \ - && (rm -rf /usr/local/lib/php/doc/zip || true) \ - \ - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ - && rm -rf /var/lib/apt/lists/* \ - \ - && update-ca-certificates \ - \ + && 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) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -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" + +### +### 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 " +LABEL "org.opencontainers.image.authors"="cytopia " +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 -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 '^8.0' \ && /usr/local/sbin/php-fpm --test \ @@ -501,8 +699,6 @@ RUN set -x \ && php -m | grep -oiE '^pspell$' \ && php-fpm -m | grep -oiE '^pspell$' \ && php -m | grep -oiE '^readline$' \ - && php -m | grep -oiE '^recode$' \ - && php-fpm -m | grep -oiE '^recode$' \ && php -m | grep -oiE '^redis$' \ && php-fpm -m | grep -oiE '^redis$' \ && php -m | grep -oiE '^reflection$' \ diff --git a/Dockerfiles/prod/Dockerfile-5.2 b/Dockerfiles/prod/Dockerfile-5.2 index 75b8953..100c187 100644 --- a/Dockerfiles/prod/Dockerfile-5.2 +++ b/Dockerfiles/prod/Dockerfile-5.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.2 Image" \ - image="devilbox/php-fpm" \ - tag="5.2-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 index a3fc49b..5183098 100644 --- a/Dockerfiles/prod/Dockerfile-5.3 +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.3 Image" \ - image="devilbox/php-fpm" \ - tag="5.3-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-5.4 b/Dockerfiles/prod/Dockerfile-5.4 index 6365cdc..d68544c 100644 --- a/Dockerfiles/prod/Dockerfile-5.4 +++ b/Dockerfiles/prod/Dockerfile-5.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.4 Image" \ - image="devilbox/php-fpm" \ - tag="5.4-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-5.5 b/Dockerfiles/prod/Dockerfile-5.5 index b97f687..2dd27b9 100644 --- a/Dockerfiles/prod/Dockerfile-5.5 +++ b/Dockerfiles/prod/Dockerfile-5.5 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.5 Image" \ - image="devilbox/php-fpm" \ - tag="5.5-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-5.6 b/Dockerfiles/prod/Dockerfile-5.6 index d4aa7c7..b2fb8b8 100644 --- a/Dockerfiles/prod/Dockerfile-5.6 +++ b/Dockerfiles/prod/Dockerfile-5.6 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.6 Image" \ - image="devilbox/php-fpm" \ - tag="5.6-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-7.0 b/Dockerfiles/prod/Dockerfile-7.0 index f2e1c97..3e70801 100644 --- a/Dockerfiles/prod/Dockerfile-7.0 +++ b/Dockerfiles/prod/Dockerfile-7.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.0 Image" \ - image="devilbox/php-fpm" \ - tag="7.0-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-7.1 b/Dockerfiles/prod/Dockerfile-7.1 index 723efc4..1374998 100644 --- a/Dockerfiles/prod/Dockerfile-7.1 +++ b/Dockerfiles/prod/Dockerfile-7.1 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.1 Image" \ - image="devilbox/php-fpm" \ - tag="7.1-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-7.2 b/Dockerfiles/prod/Dockerfile-7.2 index b51c04d..9f8f284 100644 --- a/Dockerfiles/prod/Dockerfile-7.2 +++ b/Dockerfiles/prod/Dockerfile-7.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.2 Image" \ - image="devilbox/php-fpm" \ - tag="7.2-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 index 6c7e4db..b5935c0 100644 --- a/Dockerfiles/prod/Dockerfile-7.3 +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.3 Image" \ - image="devilbox/php-fpm" \ - tag="7.3-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-7.4 b/Dockerfiles/prod/Dockerfile-7.4 index 0ec2dd3..f284731 100644 --- a/Dockerfiles/prod/Dockerfile-7.4 +++ b/Dockerfiles/prod/Dockerfile-7.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.4 Image" \ - image="devilbox/php-fpm" \ - tag="7.4-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/prod/Dockerfile-8.0 b/Dockerfiles/prod/Dockerfile-8.0 index 33ea901..50b3ba9 100644 --- a/Dockerfiles/prod/Dockerfile-8.0 +++ b/Dockerfiles/prod/Dockerfile-8.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 8.0 Image" \ - image="devilbox/php-fpm" \ - tag="8.0-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - ### ### Verify ### @@ -77,7 +84,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 84cea12..5bf8735 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.2 Image" \ - image="devilbox/php-fpm" \ - tag="5.2-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -451,7 +459,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 64ddb94..7596120 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.3 Image" \ - image="devilbox/php-fpm" \ - tag="5.3-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -500,7 +508,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 20b3026..4ecd146 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.4 Image" \ - image="devilbox/php-fpm" \ - tag="5.4-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -533,7 +541,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index edb81ab..41ec770 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.5 Image" \ - image="devilbox/php-fpm" \ - tag="5.5-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -549,7 +557,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 50f1544..adce75a 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 5.6 Image" \ - image="devilbox/php-fpm" \ - tag="5.6-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -562,7 +570,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index d68979a..0405bb9 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.0 Image" \ - image="devilbox/php-fpm" \ - tag="7.0-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -562,7 +570,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 44b23da..81acf3f 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.1 Image" \ - image="devilbox/php-fpm" \ - tag="7.1-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -562,7 +570,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 2d220a7..485a6bb 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.2 Image" \ - image="devilbox/php-fpm" \ - tag="7.2-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -562,7 +570,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index fc3c55a..d40e85b 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.3 Image" \ - image="devilbox/php-fpm" \ - tag="7.3-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -550,7 +558,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index bf36899..cac66d6 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 7.4 Image" \ - image="devilbox/php-fpm" \ - tag="7.4-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -545,7 +553,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index db3507b..39b8458 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM 8.0 Image" \ - image="devilbox/php-fpm" \ - tag="8.0-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -465,7 +473,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/Makefile b/Makefile index e1a3f55..524de56 100644 --- a/Makefile +++ b/Makefile @@ -7,38 +7,65 @@ endif # Docker configuration # ------------------------------------------------------------------------------------------------- -DIR = Dockerfiles/ +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 # ------------------------------------------------------------------------------------------------- help: - @echo "################################################################################" - @echo "# devilbox/php:XX-XX Makefile" - @echo "################################################################################" @echo - @echo "gen-readme [VERSION=] Update README.md with PHP modules from built images." - @echo "gen-dockerfiles Generate Dockerfiles from templates." + @echo " _ _ _ _ __ _ ___ " + @echo " _| |___ _ _<_| | |_ _____ / ___| |_ ___ ___| | ___._ _ _ " + @echo " / . / ._| | | | | . / . \ \// | . | . | . |___| || . | ' ' |" + @echo " \___\___|__/|_|_|___\___/\_/_/| _|_|_| _/ |_|| _|_|_|_|" + @echo " |_| |_| |_| " @echo - @echo "build-base VERSION= Build base image by specified version". - @echo "build-mods VERSION= Build mods image by specified version". - @echo "build-prod VERSION= Build prod image by specified version". - @echo "build-work VERSION= Build work image by specified version". @echo - @echo "rebuild-base VERSION= Rebuild base image by specified version". - @echo "rebuild-mods VERSION= Rebuild mods image by specified version". - @echo "rebuild-prod VERSION= Rebuild prod image by specified version". - @echo "rebuild-work VERSION= Rebuild work image by specified version". + @echo "Targets" + @echo "--------------------------------------------------------------------------------" @echo - @echo "test-base VERSION= Test base image by specified version". - @echo "test-mods VERSION= Test mods image by specified version". - @echo "test-prod VERSION= Test prod image by specified version". - @echo "test-work VERSION= Test work image by specified version". - + @echo "gen-readme [VERSION=] Update README with PHP modules from built images." + @echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates." + @echo + @echo "build-base VERSION= [ARGS=] Build base image by specified version" + @echo "build-mods VERSION= [ARGS=] Build mods image by specified version" + @echo "build-prod VERSION= [ARGS=] Build prod image by specified version" + @echo "build-work VERSION= [ARGS=] Build work image by specified version" + @echo + @echo "rebuild-base VERSION= [ARGS=] Rebuild base image by specified version" + @echo "rebuild-mods VERSION= [ARGS=] Rebuild mods image by specified version" + @echo "rebuild-prod VERSION= [ARGS=] Rebuild prod image by specified version" + @echo "rebuild-work VERSION= [ARGS=] Rebuild work image by specified version" + @echo + @echo "test-base VERSION= Test base image by specified version" + @echo "test-mods VERSION= Test mods image by specified version" + @echo "test-prod VERSION= Test prod image by specified version" + @echo "test-work VERSION= Test work image by specified version" + @echo + @echo + @echo "Variables" + @echo "--------------------------------------------------------------------------------" + @echo + @echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0'," + @echo " '7.1', '7.2', '7.3', '7.4', '8.0'." + @echo " For gen-readme target it is optional and if not" + @echo " specified, it will generate for all versions." + @echo + @echo "FAIL_FAST Either 'True' or 'False' (defaults to 'False')." + @echo " If set to 'True', each module install has an" + @echo " immediate check, which is very slow for CI, but" + @echo " yields errors immediately." + @echo " If set to 'False', checks are done at the end." + @echo + @echo "ARGS Can be added to all build-* and rebuild-* targets" + @echo " to supply additional docker build options." # ------------------------------------------------------------------------------------------------- # GENERATE TARGETS @@ -63,7 +90,10 @@ gen-dockerfiles: -e MY_GID=$$(id -g) \ -v ${PWD}:/data \ -w /data/build/ansible \ - cytopia/ansible:2.8 ansible-playbook generate.yml --diff + cytopia/ansible:2.8 ansible-playbook generate.yml \ + -e ansible_python_interpreter=/usr/bin/python3 \ + -e '{build_fail_fast: $(FAIL_FAST)}' \ + --diff $(ARGS) # ------------------------------------------------------------------------------------------------- @@ -72,36 +102,80 @@ gen-dockerfiles: build-base: _check-version build-base: - docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-base -f $(DIR)/base/Dockerfile-${VERSION} $(DIR)/base + docker build $(NO_CACHE) \ + --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \ + --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \ + --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD))" \ + $(ARGS) \ + -t $(IMAGE):${VERSION}-base \ + -f $(DIR)/base/Dockerfile-${VERSION} $(DIR)/base build-mods: _check-version build-mods: _EXIST_IMAGE=base build-mods: _check-image-exists build-mods: - docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-mods -f $(DIR)/mods/Dockerfile-${VERSION} $(DIR)/mods +ifeq ($(strip $(TARGET)),) + docker build $(NO_CACHE) \ + --target builder \ + -t $(IMAGE):$(VERSION)-mods \ + -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods; + @# $(NO_CACHE) is removed, as it would otherwise rebuild the 'builder' image again. + docker build \ + --target final \ + --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \ + --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \ + --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \ + --build-arg EXT_DIR="$$( docker run --rm --entrypoint=php $(IMAGE):$(VERSION)-mods -i \ + | grep ^extension_dir \ + | awk -F '=>' '{print $$2}' \ + | xargs \ + )" \ + $(ARGS) \ + -t $(IMAGE):$(VERSION)-mods \ + -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods; +else + docker build $(NO_CACHE) \ + --target $(TARGET) \ + --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \ + --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \ + --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \ + $(ARGS) \ + -t $(IMAGE):$(VERSION)-mods \ + -f $(DIR)/mods/Dockerfile-$(VERSION) $(DIR)/mods +endif build-prod: _check-version build-prod: _EXIST_IMAGE=mods build-prod: _check-image-exists build-prod: - docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-prod -f $(DIR)/prod/Dockerfile-${VERSION} $(DIR)/prod + docker build $(NO_CACHE) \ + --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \ + --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \ + --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \ + $(ARGS) \ + -t $(IMAGE):${VERSION}-prod \ + -f $(DIR)/prod/Dockerfile-${VERSION} $(DIR)/prod build-work: _check-version build-work: _EXIST_IMAGE=prod build-work: _check-image-exists build-work: - docker build $(NO_CACHE) -t $(IMAGE):${VERSION}-work -f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work + docker build $(NO_CACHE) \ + --label "org.opencontainers.image.created"="$$(date --rfc-3339=s)" \ + --label "org.opencontainers.image.version"="$$(git rev-parse --abbrev-ref HEAD)" \ + --label "org.opencontainers.image.revision"="$$(git rev-parse HEAD)" \ + $(ARGS) \ + -t $(IMAGE):${VERSION}-work \ + -f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work # ------------------------------------------------------------------------------------------------- # REBUILD TARGETS # ------------------------------------------------------------------------------------------------- -rebuild-base: _check-version -rebuild-base: _pull-root-image rebuild-base: NO_CACHE=--no-cache rebuild-base: build-base @@ -201,7 +275,7 @@ endif _check-image-exists: @if [ "$$(docker images -q $(IMAGE):$(VERSION)-$(_EXIST_IMAGE))" = "" ]; then \ - >&2 echo "Docker image '$(IMAGE):$(VERSION)-$(_EXIST_IMAGE)' is was not found locally."; \ + >&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; \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index ebe9fef..57db7bd 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -1,4 +1,4 @@ -# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +{{ edit_comment_base }} {% if php_version == 5.2 %} FROM devilbox/php-fpm-5.2 {% elif php_version == 5.3 %} @@ -16,12 +16,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM {{ php_version }} Image" \ - image="devilbox/php-fpm" \ - tag="{{ php_version }}-base" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### diff --git a/build/ansible/DOCKERFILES/Dockerfile-mods.j2 b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 index 72c775c..39d7459 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-mods.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 @@ -1,24 +1,12 @@ -# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. -FROM devilbox/php-fpm:{{ php_version }}-base -MAINTAINER "cytopia" +{{ edit_comment_mods }} +FROM devilbox/php-fpm:{{ php_version }}-base as builder -### -### Labels -### -LABEL \ - name="cytopia's PHP-FPM {{ php_version }} Image" \ - image="devilbox/php-fpm" \ - tag="{{ php_version }}-mods" \ - vendor="devilbox" \ - license="MIT" - - -### -### Envs -### -ENV BUILD_DEPS \ -{# Loop over enabled build dependencies -#} +{# +################################################################################################### + 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 -#} @@ -39,13 +27,312 @@ ENV BUILD_DEPS \ {%- 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 }} \ + {{ build_dep }} \ {% endfor %} - ca-certificates \ - git + ca-certificates \ + git -ENV RUN_DEPS \ + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +{# Loop over enabled extensions #} +{% for ext in extensions_enabled %} + {#- + ############################################################################################### + # Not disabled AND not already enabled + ############################################################################################### + -#} + {%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %} +# -------------------- Installing PHP Extension: {{ ext }} -------------------- +RUN set -eux \ + {#- + # -------------------------------------------------------------------------------- + # PRE COMMAND + # -------------------------------------------------------------------------------- + -#} + {#- Version specific pre-command available? -#} + {%- if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Version specific pre-command + {{- "\n\t" }}&& {{ extensions_available[ext][php_version]['pre'] }} \ + {#- Generic pre-command available? -#} + {%- elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %} + {{- "\n\t" }}# Generic pre-command + {{- "\n\t" }}&& {{ extensions_available[ext]['all']['pre'] }} \ + {%- endif -%} + {#- + # -------------------------------------------------------------------------------- + # INSTALLATION (VERSION SPECIFIC) + # -------------------------------------------------------------------------------- + #} + {%- if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Installation: Version specific + {#- + # -------------------- 1.) Builtin -------------------- + -#} + {%- if extensions_available[ext][php_version]['type'] == 'builtin' -%} + {{- "\n\t" }}# Type: Built-in extension + {%- if 'configure' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Custom: configure command + {{- "\n\t" }}&& docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \ + {%- endif -%} + {{- "\n\t" }}# Installation + {{- "\n\t" }}&& docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ + {#- + # -------------------- 2.) PECL -------------------- + -#} + {%- elif extensions_available[ext][php_version]['type'] == 'pecl' -%} + {{- "\n\t" }}# Type: PECL extension + {%- if 'command' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Custom: Pecl command + {{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \ + {%- else -%} + {{- "\n\t" }}# Default: Pecl command + {{- "\n\t" }}&& pecl install {{ ext }}{% if 'version' in extensions_available[ext][php_version] %}-{{ extensions_available[ext][php_version]['version'] }}{% endif %} \ + {%- endif -%} + {{- "\n\t" }}# Enabling + {{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \ + {#- + # -------------------- 3.) GIT -------------------- + -#} + {%- elif extensions_available[ext][php_version]['type'] == 'git' -%} + {{- "\n\t" }}# Type: GIT extension + {{- "\n\t" }}&& git clone {{ extensions_available[ext][php_version]['git_url'] }} /tmp/{{ ext }} \ + {{- "\n\t" }}&& cd /tmp/{{ ext }} \ + {%- if 'git_ref' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Custom: Branch + {{- "\n\t" }}&& git checkout {{ extensions_available[ext][php_version]['git_ref'] }} \ + {%- endif -%} + {%- if 'command' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Custom: Install command + {{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \ + {%- else -%} + {{- "\n\t" }}# Default: Install command + {{- "\n\t" }}&& phpize \ + {{- "\n\t" }}&& ./configure {% if 'configure' in extensions_available[ext][php_version] %} {{ extensions_available[ext][php_version]['configure'] }}{% endif %} \ + {{- "\n\t" }}&& make -j$(getconf _NPROCESSORS_ONLN) \ + {{- "\n\t" }}&& make install \ + {%- endif -%} + {{- "\n\t" }}# Enabling + {{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \ + {#- + # -------------------- 4.) CUSTOM -------------------- + -#} + {%- elif extensions_available[ext][php_version]['type'] == 'custom' -%} + {{- "\n\t" }}# Type: Custom extension + {{- "\n\t" }}&& {{ extensions_available[ext][php_version]['command'] }} \ + {%- endif -%} + {#- + # -------------------------------------------------------------------------------- + # INSTALLATION (GENERIC) + # -------------------------------------------------------------------------------- + #} + {%- elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Installation: Generic + {#- + # -------------------- 1.) Builtin -------------------- + -#} + {%- if extensions_available[ext]['all']['type'] == 'builtin' -%} + {{- "\n\t" }}# Type: Built-in extension + {%- if 'configure' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Custom: configure command + {{- "\n\t" }}&& docker-php-ext-configure {{ ext }} {{ extensions_available[ext]['all']['configure'] }} \ + {%- endif -%} + {{- "\n\t" }}&& docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ + {#- + # -------------------- 2.) PECL -------------------- + -#} + {%- elif extensions_available[ext]['all']['type'] == 'pecl' -%} + {{- "\n\t" }}# Type: PECL extension + {%- if 'command' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Custom: Pecl command + {{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \ + {%- else -%} + {{- "\n\t" }}# Default: Pecl command + {{- "\n\t" }}&& pecl install {{ ext }}{% if 'version' in extensions_available[ext]['all'] %}-{{ extensions_available[ext]['all']['version'] }}{% endif %} \ + {%- endif -%} + {{- "\n\t" }}# Enabling + {{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \ + {#- + # -------------------- 2.) GIT -------------------- + -#} + {%- elif extensions_available[ext]['all']['type'] == 'git' -%} + {{- "\n\t" }}# Type: GIT extension + {{- "\n\t" }}&& git clone {{ extensions_available[ext]['all']['git_url'] }} /tmp/{{ ext }} \ + {{- "\n\t" }}&& cd /tmp/{{ ext }} \ + {%- if 'git_ref' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Custom: Branch + {{- "\n\t" }}&& git checkout {{ extensions_available[ext]['all']['git_ref'] }} \ + {%- endif -%} + {%- if 'command' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Custom: Install command + {{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \ + {%- else -%} + {{- "\n\t" }}# Default: Install command + {{- "\n\t" }}&& phpize \ + {{- "\n\t" }}&& ./configure {% if 'configure' in extensions_available[ext]['all'] %} {{ extensions_available[ext]['all']['configure'] }}{% endif %} \ + {{- "\n\t" }}&& make -j$(getconf _NPROCESSORS_ONLN) \ + {{- "\n\t" }}&& make install \ + {%- endif -%} + {{- "\n\t" }}# Enabling + {{- "\n\t" }}&& docker-php-ext-enable {{ ext }} \ + {#- + # -------------------- 4.) CUSTOM -------------------- + -#} + {%- elif extensions_available[ext]['all']['type'] == 'custom' -%} + {{- "\n\t" }}# Type: Custom extension + {{- "\n\t" }}&& {{ extensions_available[ext]['all']['command'] }} \ + {%- endif -%} + {%- endif -%} + {#- + # -------------------------------------------------------------------------------- + # POST COMMAND + # -------------------------------------------------------------------------------- + -#} + {#- Version specific post-command available? -#} + {%- if php_version in extensions_available[ext] and 'post' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Version specific post-command + {{- "\n\t" }}&& {{ extensions_available[ext][php_version]['post'] }} \ + {#- Generic post-command available? -#} + {%- elif 'all' in extensions_available[ext] and 'post' in extensions_available[ext]['all'] %} + {{- "\n\t" }}# Generic post-command + {{- "\n\t" }}&& {{ extensions_available[ext]['all']['post'] }} \ + {%- endif -%} + {#- End of: Not disabled AND not already enabled -#} + {%- endif -%} + {#- + ############################################################################################### + # Ensure modules that are not disabled have an appropriate ini directive and are loaded + ############################################################################################### + -#} + {%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) -%} + {%- if php_version in extensions_available[ext] and 'load_ext' in extensions_available[ext][php_version] -%} + {{- "\n\t" }}# Activate: Version specific extension + {{- "\n\t" }}&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then \ + {{- "\n\t" }} echo "extension={{ extensions_available[ext][php_version]['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; \ + {{- "\n\t" }}fi \ + {%- elif 'all' in extensions_available[ext] and 'load_ext' in extensions_available[ext]['all'] -%} + {{- "\n\t" }}# Activate: Generic extension + {{- "\n\t" }}&& if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then \ + {{- "\n\t" }} echo "extenstion={{ extensions_available[ext]['all']['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; \ + {{- "\n\t" }}fi \ + {%- endif -%} + {%- endif %} + {#- + ############################################################################################### + # Test extensions + ############################################################################################### + -#} + {#- Not disabled #} + {%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %} + {%- if build_fail_fast -%} + {{- "\n\t" }}# ---- Test extension ---- + {{- "\n\t" }}&& /usr/local/sbin/php-fpm --test \ + {{- "\n\t" }}\ + {{- "\n\t" }}&& (php -v 2>&1 1>/dev/null || true) \ + {{- "\n\t" }}&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + {{- "\n\t" }}&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + {{- "\n\t" }}&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + {{- "\n\t" }}&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + {{- "\n\t" }}\ + {{- "\n\t" }}&& (php-fpm -v 2>&1 1>/dev/null || true) \ + {{- "\n\t" }}&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + {{- "\n\t" }}&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + {{- "\n\t" }}&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + {{- "\n\t" }}&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + {{- "\n\t" }}\ + {%- if ext == 'opcache' -%} + {{- "\n\t" }}&& php -m | grep -oiE '^Zend Opcache$' \ + {{- "\n\t" }}&& php-fpm -m | grep -oiE '^Zend Opcache$' + {%- elif ext == 'readline' -%} + {{- "\n\t" }}&& php -m | grep -oiE '^readline$' + {%- elif ext not in ['blackfire', 'ioncube'] -%} + {{- "\n\t" }}&& php -m | grep -oiE '^{{ ext }}$' \ + {{- "\n\t" }}&& php-fpm -m | grep -oiE '^{{ ext }}$' + {%- else %} + {{- "\n\t" }}&& true + {%- endif %} + {{- "\n\n\n" }} + {%- else -%} + {{- "\n\t" }}&& true{{ "\n\n\n" }} + {%- endif %} + {%- endif %} +{%- endfor %} + + +# Fix php.ini settings for enabled extensions +RUN set -eux \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* + +# Fix oracle dir for images that don't have oci installed +RUN set -eux \ + && mkdir -p /usr/lib/oracle/ + +# Shrink everything down +RUN set -eux \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + + +{{ edit_comment_mods }} +FROM devilbox/php-fpm:{{ php_version }}-base as final +MAINTAINER "cytopia" + +### +### 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 " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="{{ php_version }}-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM {{ php_version }}-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-mods" + + +### +### Copy artifacts from builder +### +ARG EXT_DIR +COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/ +COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ +COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/ + + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ {# Loop over enabled run-time dependencies -#} {%- set run_deps = [] -%} {%- for ext in extensions_enabled -%} @@ -69,145 +356,44 @@ ENV RUN_DEPS \ {% for run_dep in run_deps | unique | sort %} {{ run_dep }} \ {% endfor %} - ca-certificates - - -### -### Install -### -RUN set -x \ - && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ - ${BUILD_DEPS} \ - \ - \ -{# Loop over enabled extensions #} -{% for ext in extensions_enabled %} -{# Not disabled AND not already enabled #} -{% if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %} -# ---- Installing PHP Extension: {{ ext }} ---- -{# ---------- Pre Command ---------- #} -{# Version specific pre-command available? #} -{% if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] %} - && {{ extensions_available[ext][php_version]['pre'] }} \ -{# Generic pre-command available? #} -{% elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %} - && {{ extensions_available[ext]['all']['pre'] }} \ -{% endif %} -{# ---------- Installation (specific) ---------- #} -{% if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] %} -{# ---- 1.) Builtin ---- #} -{% if extensions_available[ext][php_version]['type'] == 'builtin' %} -{% if 'configure' in extensions_available[ext][php_version] %} - && /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \ -{% endif %} - && /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ -{# ---- 2.) PECL ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'pecl' %} -{% if 'command' in extensions_available[ext][php_version] %} - && {{ extensions_available[ext][php_version]['command'] }} \ -{% else %} - && pecl install {{ ext }}{% if 'version' in extensions_available[ext][php_version] %}-{{ extensions_available[ext][php_version]['version'] }}{% endif %} \ -{% endif %} - && docker-php-ext-enable {{ ext }} \ -{# ---- 3.) GIT ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'git' %} - && git clone {{ extensions_available[ext][php_version]['git_url'] }} /tmp/{{ ext }} \ - && cd /tmp/{{ ext }} \ -{% if 'git_ref' in extensions_available[ext][php_version] %} - && git checkout {{ extensions_available[ext][php_version]['git_ref'] }} \ -{% endif %} -{% if 'command' in extensions_available[ext][php_version] %} - && {{ extensions_available[ext][php_version]['command'] }} \ -{% else %} - && phpize \ - && ./configure {% if 'configure' in extensions_available[ext][php_version] %} {{ extensions_available[ext][php_version]['configure'] }}{% endif %} \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ -{% endif %} - && docker-php-ext-enable {{ ext }} \ -{# ---- 4.) CUSTOM ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'custom' %} - && {{ extensions_available[ext][php_version]['command'] }} \ -{% endif %} -{# ---------- Installation (generic) ---------- #} -{% elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] %} -{# ---- 1.) Builtin ---- #} -{% if extensions_available[ext]['all']['type'] == 'builtin' %} -{% if 'configure' in extensions_available[ext]['all'] %} - && /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext]['all']['configure'] }} \ -{% endif %} - && /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ -{# ---- 2.) PECL ---- #} -{% elif extensions_available[ext]['all']['type'] == 'pecl' %} -{% if 'command' in extensions_available[ext]['all'] %} - && {{ extensions_available[ext]['all']['command'] }} \ -{% else %} - && pecl install {{ ext }}{% if 'version' in extensions_available[ext]['all'] %}-{{ extensions_available[ext]['all']['version'] }}{% endif %} \ -{% endif %} - && docker-php-ext-enable {{ ext }} \ -{# ---- 3.) GIT ---- #} -{% elif extensions_available[ext]['all']['type'] == 'git' %} - && git clone {{ extensions_available[ext]['all']['git_url'] }} /tmp/{{ ext }} \ - && cd /tmp/{{ ext }} \ -{% if 'git_ref' in extensions_available[ext]['all'] %} - && git checkout {{ extensions_available[ext]['all']['git_ref'] }} \ -{% endif %} -{% if 'command' in extensions_available[ext]['all'] %} - && {{ extensions_available[ext]['all']['command'] }} \ -{% else %} - && phpize \ - && ./configure {% if 'configure' in extensions_available[ext]['all'] %} {{ extensions_available[ext]['all']['configure'] }}{% endif %} \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ -{% endif %} - && docker-php-ext-enable {{ ext }} \ -{# ---- 4.) CUSTOM ---- #} -{% elif extensions_available[ext]['all']['type'] == 'custom' %} - && {{ extensions_available[ext]['all']['command'] }} \ -{% endif %} -{% endif %} -{# Only delete files for extensions we've actually installed, not those that were already available by default #} - && (rm -rf /usr/local/lib/php/test/{{ ext }} || true) \ - && (rm -rf /usr/local/lib/php/doc/{{ ext }} || true) \ - \ -{% endif %} -{# Ensure modules that are not disabled have an appropriate ini directive and are loaded #} -{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} -{% if php_version in extensions_available[ext] and 'load_ext' in extensions_available[ext][php_version] %} - && if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extension={{ extensions_available[ext][php_version]['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \ -{% elif 'all' in extensions_available[ext] and 'load_ext' in extensions_available[ext]['all'] %} - && if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extenstion={{ extensions_available[ext]['all']['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \ -{% endif %} -{% endif %} -{% endfor %} -{# Fix php.ini settings for enabled extensions #} - && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ - echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ - fi \ -{# /Fix php.ini settings for enabled extensions #} - && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ - && rm -rf /tmp/* \ - \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ - && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* \ \ - && update-ca-certificates \ - \ - && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ - && (find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + && 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 %} ### ### 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 }}' \ && /usr/local/sbin/php-fpm --test \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 index 07b1e0a..4baac29 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 @@ -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 MAINTAINER "cytopia" @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM {{ php_version }} Image" \ - image="devilbox/php-fpm" \ - tag="{{ php_version }}-prod" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -40,7 +48,6 @@ RUN set -x \ && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) - {% if debug %} ### ### Verify @@ -79,7 +86,6 @@ VOLUME /var/log/php VOLUME /var/mail - ### ### Ports ### diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 6a19ec3..aed2d54 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -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 MAINTAINER "cytopia" @@ -6,12 +6,20 @@ MAINTAINER "cytopia" ### ### Labels ### -LABEL \ - name="cytopia's PHP-FPM {{ php_version }} Image" \ - image="devilbox/php-fpm" \ - tag="{{ php_version }}-work" \ - vendor="devilbox" \ - license="MIT" +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +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" ### @@ -415,7 +423,6 @@ COPY ./data/bash-devilbox /etc/bash-devilbox COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox - ### ### Volumes ### diff --git a/build/ansible/group_vars/all/all-ansible.yml b/build/ansible/group_vars/all/all-ansible.yml index fce9966..4f5225f 100644 --- a/build/ansible/group_vars/all/all-ansible.yml +++ b/build/ansible/group_vars/all/all-ansible.yml @@ -1,14 +1,22 @@ --- ################################################################################################### -# Ansible specifi definitions +# Ansible specific definitions ################################################################################################### +edit_comment_base: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead." +edit_comment_mods: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead." +edit_comment_prod: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead." +edit_comment_work: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead." + # ------------------------------------------------------------------------------------------------- # Adds version checks to Dockerfile # ------------------------------------------------------------------------------------------------- debug: True +# Also implement checks in builder images (slow, but fails faster) +build_fail_fast: True + # ------------------------------------------------------------------------------------------------- # Available PHP versions (see inventory) diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index b70e949..447d9b6 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -118,6 +118,7 @@ extensions_enabled: # # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: # pre: [optional] Run command before anything else +# post: [optional] Run command after anything else (builder and final image) # build_dep: [optional] Array of build dependencies # run_dep: [optional] Array of run-time dependencies # type: [required] One of 'builtin', 'pecl' or 'git' @@ -278,9 +279,11 @@ extensions_available: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] 7.0: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] 7.1: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf @@ -293,15 +296,17 @@ extensions_available: 7.4: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] 8.0: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] all: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ configure: --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] - run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx5, libfreetype6, libwebp6] gettext: all: type: builtin @@ -346,10 +351,16 @@ extensions_available: 5.5: type: pecl run_dep: [libmagickwand-6.q16-2] + 5.6: + type: pecl + run_dep: [libmagickwand-6.q16-3] + 7.0: + type: pecl + run_dep: [libmagickwand-6.q16-3] all: type: pecl build_dep: [libmagickwand-dev] - run_dep: [libmagickwand-6.q16-3] + run_dep: [libmagickwand-6.q16-6] imap: disabled: [7.4, 8.0] # TODO: re-enable. currently fails with: configure: error: OpenSSL libraries not found. all: @@ -377,10 +388,22 @@ extensions_available: 5.5: type: builtin run_dep: [libicu52] + 5.6: + type: builtin + run_dep: [libicu57] + 7.0: + type: builtin + run_dep: [libicu57] + 7.4: + type: builtin + run_dep: [libicu57] + 8.0: + type: builtin + run_dep: [libicu57] all: type: builtin build_dep: [libicu-dev] - run_dep: [libicu57] + run_dep: [libicu63] ioncube: disabled: [7.3, 7.4, 8.0] all: @@ -495,11 +518,15 @@ extensions_available: 5.4: type: pecl version: 1.2.11 + 5.5: + type: pecl + version: 1.5.5 8.0: type: git git_url: https://github.com/mongodb/mongo-php-driver command: | - git submodule update --init \ + git checkout v1.6 \ + && git submodule update --init \ # FIXME: This is a work-around to mitigate compile error with PHP 8.0 && 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' \ @@ -511,6 +538,18 @@ extensions_available: && 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 \ @@ -592,9 +631,13 @@ extensions_available: && 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) \ build_dep: [alien, libaio-dev] run_dep: [libaio1] + post: | + ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ + && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ + && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ + && (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ odbc: disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found! opcache: @@ -745,6 +788,7 @@ extensions_available: readline: already_avail: "{{ php_all_versions }}" recode: + disabled: [7.4, 8.0] already_avail: [5.3, 5.4] all: type: builtin @@ -754,6 +798,18 @@ extensions_available: 5.2: type: pecl version: 2.2.7 + 5.3: + type: pecl + version: 4.3.0 + 5.4: + type: pecl + version: 4.3.0 + 5.5: + type: pecl + version: 4.3.0 + 5.6: + type: pecl + version: 4.3.0 7.4: type: git git_url: https://github.com/phpredis/phpredis @@ -800,6 +856,15 @@ extensions_available: 5.5: type: pecl version: 3.0.5 + 5.6: + type: pecl + version: 3.1.2 + 7.0: + type: pecl + version: 3.1.2 + 7.4: + type: pecl + version: 3.1.2 all: type: pecl build_dep: [librdkafka-dev] @@ -862,6 +927,9 @@ extensions_available: 5.6: type: pecl version: 1.9.23 + 7.0: + type: pecl + version: 4.2.13 7.3: type: git git_url: https://github.com/swoole/swoole-src @@ -876,7 +944,7 @@ extensions_available: --enable-coroutine-postgresql \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ - run_dep: [libnghttp2-14, libhiredis0.13] + run_dep: [libnghttp2-14, libhiredis0.14] build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, libpq-dev, cmake] 7.4: type: git @@ -920,10 +988,22 @@ extensions_available: 5.5: type: builtin run_dep: [libtidy-0.99-0] + 5.6: + type: builtin + run_dep: [libtidy5] + 7.0: + type: builtin + run_dep: [libtidy5] + 7.4: + type: builtin + run_dep: [libtidy5] + 8.0: + type: builtin + run_dep: [libtidy5] all: type: builtin build_dep: [libtidy-dev] - run_dep: [libtidy5] + run_dep: [libtidy5deb1] tokenizer: already_avail: "{{ php_all_versions }}" uploadprogress: From 67017e494eb8479a2811506240bbafdc248d909d Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 3 Nov 2019 18:20:23 +0100 Subject: [PATCH 05/11] Make RUN commands more strict --- Dockerfiles/base/Dockerfile-5.2 | 10 +++++----- Dockerfiles/base/Dockerfile-5.3 | 10 +++++----- Dockerfiles/base/Dockerfile-5.4 | 10 +++++----- Dockerfiles/base/Dockerfile-5.5 | 10 +++++----- Dockerfiles/base/Dockerfile-5.6 | 8 ++++---- Dockerfiles/base/Dockerfile-7.0 | 8 ++++---- Dockerfiles/base/Dockerfile-7.1 | 8 ++++---- Dockerfiles/base/Dockerfile-7.2 | 8 ++++---- Dockerfiles/base/Dockerfile-7.3 | 8 ++++---- Dockerfiles/base/Dockerfile-7.4 | 8 ++++---- Dockerfiles/base/Dockerfile-8.0 | 8 ++++---- Dockerfiles/prod/Dockerfile-5.2 | 4 ++-- Dockerfiles/prod/Dockerfile-5.3 | 4 ++-- Dockerfiles/prod/Dockerfile-5.4 | 4 ++-- Dockerfiles/prod/Dockerfile-5.5 | 4 ++-- Dockerfiles/prod/Dockerfile-5.6 | 4 ++-- Dockerfiles/prod/Dockerfile-7.0 | 4 ++-- Dockerfiles/prod/Dockerfile-7.1 | 4 ++-- Dockerfiles/prod/Dockerfile-7.2 | 4 ++-- Dockerfiles/prod/Dockerfile-7.3 | 4 ++-- Dockerfiles/prod/Dockerfile-7.4 | 4 ++-- Dockerfiles/prod/Dockerfile-8.0 | 4 ++-- Dockerfiles/work/Dockerfile-5.2 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-5.3 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-5.4 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-5.5 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-5.6 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-7.0 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-7.1 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-7.2 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-7.3 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-7.4 | 16 ++++++++-------- Dockerfiles/work/Dockerfile-8.0 | 16 ++++++++-------- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 10 +++++----- build/ansible/DOCKERFILES/Dockerfile-prod.j2 | 4 ++-- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 16 ++++++++-------- 36 files changed, 173 insertions(+), 173 deletions(-) diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index 2b84a61..6a98e1e 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,14 +43,14 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +RUN set -eux \ && rm -f /etc/apt/sources.list \ && { \ echo "deb http://ftp.debian.org/debian jessie main"; \ echo "#deb http://ftp.debian.org/debian jessie-updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \ } | tee /etc/apt/sources.list -RUN set -x \ +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/* @@ -59,7 +59,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -81,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index f6358ea..4879379 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,14 +43,14 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +RUN set -eux \ && rm -f /etc/apt/sources.list \ && { \ echo "deb http://ftp.debian.org/debian jessie main"; \ echo "#deb http://ftp.debian.org/debian jessie-updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \ } | tee /etc/apt/sources.list -RUN set -x \ +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/* @@ -59,7 +59,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -81,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index d9ebc27..ba31901 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,14 +43,14 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +RUN set -eux \ && rm -f /etc/apt/sources.list \ && { \ echo "deb http://ftp.debian.org/debian jessie main"; \ echo "#deb http://ftp.debian.org/debian jessie-updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \ } | tee /etc/apt/sources.list -RUN set -x \ +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/* @@ -59,7 +59,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -81,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index 802a0fe..e27214d 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,14 +43,14 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +RUN set -eux \ && rm -f /etc/apt/sources.list \ && { \ echo "deb http://ftp.debian.org/debian jessie main"; \ echo "#deb http://ftp.debian.org/debian jessie-updates main"; \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \ } | tee /etc/apt/sources.list -RUN set -x \ +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/* @@ -59,7 +59,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -81,7 +81,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 46ee287..1ce652d 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index d2c48de..3428159 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 49ccb98..8bb3a79 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index efadfc2..abe8209 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 44925ea..df549d3 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-7.4 b/Dockerfiles/base/Dockerfile-7.4 index 6088a1a..bd82377 100644 --- a/Dockerfiles/base/Dockerfile-7.4 +++ b/Dockerfiles/base/Dockerfile-7.4 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/base/Dockerfile-8.0 b/Dockerfiles/base/Dockerfile-8.0 index 51c9a31..21256be 100644 --- a/Dockerfiles/base/Dockerfile-8.0 +++ b/Dockerfiles/base/Dockerfile-8.0 @@ -35,7 +35,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -43,7 +43,7 @@ RUN set -x \ ### ### Upgrade (install ps) ### -RUN set -x \ +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/* @@ -52,7 +52,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -74,7 +74,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-5.2 b/Dockerfiles/prod/Dockerfile-5.2 index 100c187..ff231bb 100644 --- a/Dockerfiles/prod/Dockerfile-5.2 +++ b/Dockerfiles/prod/Dockerfile-5.2 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### 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' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 index 5183098..0774b65 100644 --- a/Dockerfiles/prod/Dockerfile-5.3 +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-5.4 b/Dockerfiles/prod/Dockerfile-5.4 index d68544c..3c8b5ef 100644 --- a/Dockerfiles/prod/Dockerfile-5.4 +++ b/Dockerfiles/prod/Dockerfile-5.4 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-5.5 b/Dockerfiles/prod/Dockerfile-5.5 index 2dd27b9..14e56a5 100644 --- a/Dockerfiles/prod/Dockerfile-5.5 +++ b/Dockerfiles/prod/Dockerfile-5.5 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-5.6 b/Dockerfiles/prod/Dockerfile-5.6 index b2fb8b8..e2e0e61 100644 --- a/Dockerfiles/prod/Dockerfile-5.6 +++ b/Dockerfiles/prod/Dockerfile-5.6 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-7.0 b/Dockerfiles/prod/Dockerfile-7.0 index 3e70801..7f48df2 100644 --- a/Dockerfiles/prod/Dockerfile-7.0 +++ b/Dockerfiles/prod/Dockerfile-7.0 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-7.1 b/Dockerfiles/prod/Dockerfile-7.1 index 1374998..b9ec3d5 100644 --- a/Dockerfiles/prod/Dockerfile-7.1 +++ b/Dockerfiles/prod/Dockerfile-7.1 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-7.2 b/Dockerfiles/prod/Dockerfile-7.2 index 9f8f284..80aad21 100644 --- a/Dockerfiles/prod/Dockerfile-7.2 +++ b/Dockerfiles/prod/Dockerfile-7.2 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 index b5935c0..edd03d8 100644 --- a/Dockerfiles/prod/Dockerfile-7.3 +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-7.4 b/Dockerfiles/prod/Dockerfile-7.4 index f284731..ee8e04f 100644 --- a/Dockerfiles/prod/Dockerfile-7.4 +++ b/Dockerfiles/prod/Dockerfile-7.4 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### 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.4' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/prod/Dockerfile-8.0 b/Dockerfiles/prod/Dockerfile-8.0 index 50b3ba9..ebd4745 100644 --- a/Dockerfiles/prod/Dockerfile-8.0 +++ b/Dockerfiles/prod/Dockerfile-8.0 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -51,7 +51,7 @@ RUN set -x \ ### ### 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 '^8.0' \ && /usr/local/sbin/php-fpm --test \ diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 5bf8735..c88c389 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -124,7 +124,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +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 \ @@ -268,7 +268,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +RUN set -eux \ \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -281,7 +281,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -322,7 +322,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -346,7 +346,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -386,7 +386,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ @@ -402,7 +402,7 @@ RUN set -x \ && 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 \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ && scss-lint --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 7596120..de45ed4 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -124,7 +124,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -305,7 +305,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -323,7 +323,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -364,7 +364,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -388,7 +388,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -428,7 +428,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ @@ -444,7 +444,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 4ecd146..c236a17 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -124,7 +124,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -334,7 +334,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -352,7 +352,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -393,7 +393,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -417,7 +417,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -457,7 +457,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ @@ -473,7 +473,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 41ec770..15932da 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -124,7 +124,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -337,7 +337,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -364,7 +364,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -405,7 +405,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -429,7 +429,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -469,7 +469,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ @@ -485,7 +485,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index adce75a..3dbbe01 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -349,7 +349,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -376,7 +376,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -417,7 +417,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -441,7 +441,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -481,7 +481,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ @@ -497,7 +497,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 0405bb9..a02eb86 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -349,7 +349,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -376,7 +376,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -417,7 +417,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -441,7 +441,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -481,7 +481,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ @@ -497,7 +497,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 81acf3f..dad585d 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -349,7 +349,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -376,7 +376,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -417,7 +417,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -441,7 +441,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -481,7 +481,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ @@ -497,7 +497,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 485a6bb..812bc31 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -349,7 +349,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -376,7 +376,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -417,7 +417,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -441,7 +441,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -481,7 +481,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ @@ -497,7 +497,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index d40e85b..8b1e1a9 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -338,7 +338,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -365,7 +365,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -406,7 +406,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -430,7 +430,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -470,7 +470,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ @@ -486,7 +486,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index cac66d6..e5e90cf 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -334,7 +334,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +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/ \ @@ -361,7 +361,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -402,7 +402,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -426,7 +426,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -466,7 +466,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.4' \ && /usr/local/sbin/php-fpm --test \ @@ -482,7 +482,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 39b8458..92af085 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -123,7 +123,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # pip @@ -278,7 +278,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +RUN set -eux \ \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -291,7 +291,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ # angular_cli && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ # eslint @@ -332,7 +332,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ # mixlib_config && gem install mixlib-config -v 2.2.4 \ # rb_inotify @@ -356,7 +356,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ # ansible && pip install --no-cache-dir --force-reinstall ansible \ # yamllint @@ -396,7 +396,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.0' \ && /usr/local/sbin/php-fpm --test \ @@ -412,7 +412,7 @@ RUN set -x \ && 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 \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ && mdl --version | grep -E '[.0-9]+' \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 57db7bd..6980cf1 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -45,7 +45,7 @@ ENV MY_USER="devilbox" \ ### ### User/Group ### -RUN set -x \ +RUN set -eux \ && groupadd -g ${MY_GID} -r ${MY_GROUP} \ && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} @@ -54,7 +54,7 @@ RUN set -x \ ### Upgrade (install ps) ### {% if php_version in [5.2, 5.3, 5.4, 5.5] %} -RUN set -x \ +RUN set -eux \ && rm -f /etc/apt/sources.list \ && { \ echo "deb http://ftp.debian.org/debian jessie main"; \ @@ -62,7 +62,7 @@ RUN set -x \ echo "deb http://security.debian.org/debian-security jessie/updates main"; \ } | tee /etc/apt/sources.list {% endif %} -RUN set -x \ +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/* @@ -71,7 +71,7 @@ RUN set -x \ ### ### Configure ### -RUN set -x \ +RUN set -eux \ && rm -rf /usr/local/etc/php-fpm.d \ && mkdir -p /usr/local/etc/php-fpm.d \ && mkdir -p /var/lib/php/session \ @@ -94,7 +94,7 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 index 4baac29..b394972 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 @@ -25,7 +25,7 @@ LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-prod" ### ### Install ### -RUN set -x \ +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 \ @@ -52,7 +52,7 @@ RUN set -x \ ### ### 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 }}' \ && /usr/local/sbin/php-fpm --test \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index aed2d54..3c76423 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -31,7 +31,7 @@ ENV BASH_PROFILE=".bashrc" ### ### Install Tools ### -RUN set -x \ +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 \ @@ -144,7 +144,7 @@ RUN set -x \ ### ### Install custom software ### -RUN set -x \ +RUN set -eux \ {% for tool in software_enabled %} {# Not disabled #} {% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %} @@ -192,7 +192,7 @@ RUN set -x \ ### ### Install Composer (PHP) ### -RUN set -x \ +RUN set -eux \ {% for tool in composer_enabled %} {# Not disabled #} {% if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) %} @@ -224,7 +224,7 @@ RUN set -x \ ### ### Install npm (Node) ### -RUN set -x \ +RUN set -eux \ {% for tool in npm_enabled %} {# Not disabled #} {% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %} @@ -257,7 +257,7 @@ RUN set -x \ ### ### Install gem (Ruby) ### -RUN set -x \ +RUN set -eux \ {% for tool in gem_enabled %} {# Not disabled #} {% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %} @@ -287,7 +287,7 @@ RUN set -x \ ### ### Install pip (Python) packages ### -RUN set -x \ +RUN set -eux \ {% for tool in pip_enabled %} {# Not disabled #} {% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %} @@ -338,7 +338,7 @@ RUN \ ### ### Verify ### -RUN set -x \ +RUN set -eux \ && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ @@ -354,7 +354,7 @@ RUN set -x \ && 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 ---- #} {% for tool in software_enabled %} {# Not disabled #} From a6236b19c7e825e4e96bbb1819c80dfc4db65a12 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 3 Nov 2019 21:46:15 +0100 Subject: [PATCH 06/11] Fix work images --- Dockerfiles/work/Dockerfile-5.2 | 124 ++++-- Dockerfiles/work/Dockerfile-5.3 | 148 ++++--- Dockerfiles/work/Dockerfile-5.4 | 160 ++++--- Dockerfiles/work/Dockerfile-5.5 | 172 +++++--- Dockerfiles/work/Dockerfile-5.6 | 175 +++++--- Dockerfiles/work/Dockerfile-7.0 | 175 +++++--- Dockerfiles/work/Dockerfile-7.1 | 177 +++++--- Dockerfiles/work/Dockerfile-7.2 | 177 +++++--- Dockerfiles/work/Dockerfile-7.3 | 174 +++++--- Dockerfiles/work/Dockerfile-7.4 | 169 +++++--- Dockerfiles/work/Dockerfile-8.0 | 136 +++--- build/ansible/DOCKERFILES/Dockerfile-work.j2 | 427 ++++++++++++------- build/ansible/group_vars/all/all-ansible.yml | 2 +- build/ansible/group_vars/all/work.yml | 48 ++- 14 files changed, 1456 insertions(+), 808 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index c88c389..49d6473 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -38,6 +38,7 @@ RUN set -eux \ curl \ dirmngr \ gnupg \ + \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ @@ -50,6 +51,7 @@ RUN set -eux \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ @@ -125,7 +127,7 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# pip +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -134,7 +136,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -151,7 +154,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -160,17 +164,20 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -181,12 +188,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -208,15 +217,18 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -228,7 +240,8 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -248,6 +261,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -282,31 +296,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -323,17 +349,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -347,13 +378,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -403,14 +437,9 @@ RUN set -eux \ && rm -f /usr/local/etc/php/php.ini RUN set -eux \ +# -------------------- Software -------------------- && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[.0-9]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && regex-grep --version | grep -E '[.0-9]+' \ && git-flow version | grep -E '[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ @@ -418,12 +447,15 @@ RUN set -eux \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ - \ - \ + \ +# -------------------- Composer -------------------- + \ +# -------------------- PIP -------------------- && ansible --version | grep -E '^ansible [.0-9]+$' \ && yamllint --version 2>&1 | grep -E '[.0-9]+' \ && yq --version 2>&1 | grep -E '^yq\s+[.0-9]+$' \ - \ + \ +# -------------------- NPM -------------------- && ng version 2>&1 | grep -iE 'Angular CLI:\s*[.0-9]+' \ && eslint -v | grep -E '[.0-9]+' \ && grunt --version | grep -E '[.0-9]+' \ @@ -433,10 +465,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index de45ed4..ec41c53 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -38,6 +38,7 @@ RUN set -eux \ curl \ dirmngr \ gnupg \ + \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ @@ -50,6 +51,7 @@ RUN set -eux \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ @@ -125,9 +127,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -136,7 +139,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -153,7 +157,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -162,7 +167,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# drush7 + \ +# -------------------- drush7 -------------------- && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -175,17 +181,20 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -196,12 +205,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -223,7 +234,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout v2.0.7 \ @@ -234,23 +246,28 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -262,10 +279,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -285,6 +304,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -306,12 +326,14 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# codeception +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -324,31 +346,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -365,17 +399,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -389,13 +428,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -445,15 +487,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && regex-grep --version | grep -E '[.0-9]+' \ && drush7 --version | grep -E '7[.0-9]+\s*$' \ && git-flow version | grep -E '[.0-9]+' \ && linkcheck --version | grep -E '^linkcheck\sv[.0-9]+' \ @@ -466,13 +503,16 @@ RUN set -eux \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && wkhtmltopdf --version | grep -E "^wkhtmltopdf [.0-9]+\s+\(.+patched.+\)" \ && wp --allow-root --version | grep -E '[.0-9]+' \ - \ + \ +# -------------------- Composer -------------------- && codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \ - \ + \ +# -------------------- PIP -------------------- && ansible --version | grep -E '^ansible [.0-9]+$' \ && yamllint --version 2>&1 | grep -E '[.0-9]+' \ && 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]+' \ @@ -482,10 +522,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index c236a17..f9b6edb 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -38,6 +38,7 @@ RUN set -eux \ curl \ dirmngr \ gnupg \ + \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ @@ -50,6 +51,7 @@ RUN set -eux \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ @@ -125,9 +127,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -136,7 +139,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -153,7 +157,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -162,10 +167,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/releases/v3.3.0/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush7 + \ +# -------------------- drush7 -------------------- && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -178,7 +185,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -191,13 +199,15 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v1.3.7 \ @@ -207,11 +217,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -222,12 +234,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -249,7 +263,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout v2.0.9 \ @@ -260,26 +275,32 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -291,10 +312,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -314,6 +337,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -335,12 +359,14 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# codeception +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -353,31 +379,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -394,17 +432,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -418,13 +461,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -474,15 +520,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -499,13 +540,16 @@ RUN set -eux \ && 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 -------------------- && 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]+' \ && 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]+' \ @@ -515,10 +559,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 15932da..d75f615 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -38,6 +38,7 @@ RUN set -eux \ curl \ dirmngr \ gnupg \ + \ && echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until \ && echo "deb http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ && curl -sS "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ @@ -50,6 +51,7 @@ RUN set -eux \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ @@ -125,9 +127,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -136,7 +139,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -153,7 +157,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -162,10 +167,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush7 + \ +# -------------------- drush7 -------------------- && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -178,7 +185,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -191,16 +199,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v2.0.0 \ @@ -210,11 +221,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -225,12 +238,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -252,7 +267,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -263,26 +279,32 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -294,10 +316,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -317,6 +341,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -338,21 +363,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -365,31 +395,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -406,17 +448,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -430,13 +477,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -486,15 +536,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -512,16 +557,19 @@ RUN set -eux \ && 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]+' \ @@ -531,10 +579,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 3dbbe01..ff2da43 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/releases/v4.3.4/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# drush7 + \ +# -------------------- drush7 -------------------- && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush7 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v2.0.0 \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,7 +280,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -275,26 +292,32 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -306,10 +329,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -329,6 +354,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -350,21 +376,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -377,31 +408,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -418,17 +461,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -442,13 +490,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -498,15 +549,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -525,16 +571,19 @@ RUN set -eux \ && 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]+' \ @@ -544,10 +593,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index a02eb86..1c8ee18 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /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 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v2.0.0 \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,7 +280,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -275,26 +292,32 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -306,10 +329,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -329,6 +354,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -350,21 +376,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -377,31 +408,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -418,17 +461,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -442,13 +490,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -498,15 +549,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -525,16 +571,19 @@ RUN set -eux \ && 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]+' \ @@ -544,10 +593,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index dad585d..4efc3bb 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -84,7 +86,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ - mysql-client \ + mariadb-client \ nano \ net-tools \ netcat \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /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 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,7 +280,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -275,30 +292,36 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 \ + 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 \ @@ -306,10 +329,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -329,6 +354,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -350,21 +376,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -377,31 +408,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -418,17 +461,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl + \ +# -------------------- mdl -------------------- && gem install mdl \ -# scss_lint + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -442,13 +490,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -498,15 +549,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -525,16 +571,19 @@ RUN set -eux \ && 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]+' \ @@ -544,10 +593,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 812bc31..18307fa 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -84,7 +86,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ - mysql-client \ + mariadb-client \ nano \ net-tools \ netcat \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /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 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,7 +280,8 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phalcon + \ +# -------------------- phalcon -------------------- && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ && cd /usr/local/src/phalcon-devtools \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -275,30 +292,36 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 \ + 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 \ @@ -306,10 +329,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -329,6 +354,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -350,21 +376,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -377,31 +408,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -418,17 +461,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl + \ +# -------------------- mdl -------------------- && gem install mdl \ -# scss_lint + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -442,13 +490,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -498,15 +549,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -525,16 +571,19 @@ RUN set -eux \ && 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]+' \ @@ -544,10 +593,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 8b1e1a9..ea1c105 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -84,7 +86,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ - mysql-client \ + mariadb-client \ nano \ net-tools \ netcat \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /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 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,30 +280,36 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# php-cs-fixer + \ +# -------------------- php-cs-fixer -------------------- && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ && chmod +x /usr/local/bin/php-cs-fixer \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && 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 \ + 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 \ @@ -295,10 +317,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -318,6 +342,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -339,21 +364,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -366,31 +396,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -407,17 +449,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl + \ +# -------------------- mdl -------------------- && gem install mdl \ -# scss_lint + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -431,13 +478,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -487,15 +537,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -513,16 +558,19 @@ RUN set -eux \ && 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]+' \ @@ -532,10 +580,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index e5e90cf..f43179e 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,10 +166,12 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /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 \ && cd /usr/local/src/drush7 \ && git checkout 7.4.0 \ @@ -177,7 +184,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ \ -# drush8 + \ +# -------------------- 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' ) \ @@ -190,7 +198,8 @@ RUN set -eux \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ \ -# drush9 + \ +# -------------------- 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' ) \ @@ -203,16 +212,19 @@ RUN set -eux \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ \ -# drupalconsole + \ +# -------------------- drupalconsole -------------------- && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ && chmod +x /usr/local/bin/drupal \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# laravel + \ +# -------------------- laravel -------------------- && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -222,11 +234,13 @@ RUN set -eux \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -237,12 +251,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -264,22 +280,27 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# phpunit + \ +# -------------------- phpunit -------------------- && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -291,10 +312,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -314,6 +337,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -335,21 +359,26 @@ RUN set -eux \ ### Install Composer (PHP) ### RUN set -eux \ -# asgardcms +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- 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 + \ +# -------------------- prestissimo -------------------- && COMPOSER_HOME="/usr/local/src/composer" composer global require hirak/prestissimo \ \ + \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -362,31 +391,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -403,17 +444,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -427,13 +473,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -483,15 +532,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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*$' \ @@ -508,16 +552,19 @@ RUN set -eux \ && 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]+' \ @@ -527,10 +574,12 @@ RUN set -eux \ && 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 \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 92af085..9ab5c24 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -38,6 +38,7 @@ RUN set -eux \ 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 \ @@ -49,6 +50,7 @@ RUN set -eux \ && 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 \ @@ -124,9 +126,10 @@ RUN set -eux \ ### Install custom software ### RUN set -eux \ -# composer +# -------------------- composer -------------------- && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ -# pip + \ +# -------------------- pip -------------------- && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libpython-dev \ @@ -135,7 +138,8 @@ RUN set -eux \ \ && curl -sS https://bootstrap.pypa.io/get-pip.py | python \ \ -# nvm + \ +# -------------------- 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))" \ @@ -152,7 +156,8 @@ RUN set -eux \ && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ \ -# awesomeci + \ +# -------------------- awesomeci -------------------- && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ && cd /usr/local/src/awesome-ci \ && git checkout $(git describe --abbrev=0 --tags) \ @@ -161,20 +166,24 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/awesome-ci \ \ -# deployer + \ +# -------------------- deployer -------------------- && curl -sS https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ && chmod +x /usr/local/bin/dep \ -# gitflow + \ +# -------------------- gitflow -------------------- && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ && cd /tmp/gitflow \ && make install \ && cd / && rm -rf /tmp/gitflow \ \ -# linkcheck + \ +# -------------------- linkcheck -------------------- && curl https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ && chmod +x /usr/local/bin/linkcheck \ \ -# linuxbrew + \ +# -------------------- 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 \ @@ -185,12 +194,14 @@ RUN set -eux \ '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 + \ +# -------------------- 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 + \ +# -------------------- 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) \ @@ -212,18 +223,22 @@ RUN set -eux \ && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ \ -# phpcs + \ +# -------------------- phpcs -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ -# phpcbf + \ +# -------------------- phpcbf -------------------- && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ -# symfony + \ +# -------------------- symfony -------------------- && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ && chmod +x /usr/local/bin/symfony \ -# wkhtmltopdf + \ +# -------------------- wkhtmltopdf -------------------- && VERSION="$( curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ @@ -235,10 +250,12 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ -# wpcli + \ +# -------------------- wpcli -------------------- && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ -# cleanup + \ +# -------------------- cleanup -------------------- && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ && rm -rf /home/${MY_USER}/.composer \ @@ -258,6 +275,7 @@ RUN set -eux \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ + \ \ && (rm -rf /root/.gem || true ) \ && (rm -rf /root/.cache || true) \ @@ -292,31 +310,43 @@ RUN set -eux \ ### Install npm (Node) ### RUN set -eux \ -# angular_cli +# -------------------- angular_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @angular/cli' devilbox \ -# eslint + \ +# -------------------- eslint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g eslint' devilbox \ -# grunt + \ +# -------------------- grunt -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt' devilbox \ -# grunt_cli + \ +# -------------------- grunt_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g grunt-cli' devilbox \ -# gulp + \ +# -------------------- gulp -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g gulp' devilbox \ -# jsonlint + \ +# -------------------- jsonlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g jsonlint' devilbox \ -# pm2 + \ +# -------------------- pm2 -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g pm2' devilbox \ -# mdlint + \ +# -------------------- mdlint -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g mdlint' devilbox \ -# vue_cli + \ +# -------------------- vue_cli -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli' devilbox \ -# vue_cli_service_global + \ +# -------------------- vue_cli_service_global -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g @vue/cli-service-global' devilbox \ -# webpack + \ +# -------------------- webpack -------------------- && su -c '. /opt/nvm/nvm.sh; npm install -g webpack' devilbox \ -# webpack_cli + \ +# -------------------- 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 \ @@ -333,17 +363,22 @@ RUN set -eux \ ### Install gem (Ruby) ### RUN set -eux \ -# mixlib_config +# -------------------- mixlib_config -------------------- && gem install mixlib-config -v 2.2.4 \ -# rb_inotify + \ +# -------------------- rb_inotify -------------------- && gem install rb-inotify -v 0.9.10 \ -# mdl - && gem install mdl \ -# scss_lint + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ +# -------------------- scss_lint -------------------- && gem install scss_lint -v 0.57.1 \ -# sass + \ +# -------------------- sass -------------------- && gem install sass \ \ + \ && rm -rf /root/.gem \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -357,13 +392,16 @@ RUN set -eux \ ### Install pip (Python) packages ### RUN set -eux \ -# ansible +# -------------------- ansible -------------------- && pip install --no-cache-dir --force-reinstall ansible \ -# yamllint + \ +# -------------------- yamllint -------------------- && pip install --no-cache-dir --force-reinstall yamllint \ -# yq + \ +# -------------------- yq -------------------- && pip install --no-cache-dir --force-reinstall yq \ \ + \ && rm -rf /root/.cache/pip \ && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ @@ -413,15 +451,10 @@ RUN set -eux \ && 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]+' \ - && mdl --version | grep -E '[.0-9]+' \ -&& scss-lint --version | grep -E '[.0-9]+' \ -&& eslint -v | grep -E '[.0-9]+' \ -&& jsonlint --version | grep -E '[.0-9]+' \ -&& mdlint --version | grep -E '[.0-9]+' \ -&& gulp --version | grep -E '[.0-9]+' \ - \ + && 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]+' \ @@ -432,12 +465,15 @@ RUN set -eux \ && 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]+' \ @@ -447,10 +483,12 @@ RUN set -eux \ && 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 \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 3c76423..edfb174 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -38,38 +38,33 @@ RUN set -eux \ curl \ dirmngr \ gnupg \ -{% for repo in apt_repositories_enabled -%} + \ +{%- for repo in apt_repositories_enabled -%} {#- Not disabled -#} {%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%} {#- Version specific pre-command available? -#} - {%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %} - && {{ apt_repositories_available[repo][php_version]['pre'] }} \ -{# #} + {%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] -%} + {{ "\n\t" }}&& {{ apt_repositories_available[repo][php_version]['pre'] }} \ {#- Generic pre-command available? -#} - {%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %} - && {{ apt_repositories_available[repo]['all']['pre'] }} \ -{# #} + {%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] -%} + {{ "\n\t" }}&& {{ apt_repositories_available[repo]['all']['pre'] }} \ {%- endif -%} {#- Version specific key available? -#} - {%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %} - && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \ -{# #} + {%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] -%} + {{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \ {#- Generic key available? -#} - {%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %} - && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \ -{# #} + {%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] -%} + {{ "\n\t" }}&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \ {%- endif -%} {#- Version specific repository available? -#} - {%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %} - && echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ -{# #} + {%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] -%} + {{ "\n\t" }}&& echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ {#- Generic repository available? -#} - {%- else %} - && 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'] -%} + {{ "\n\t" }}&& echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ {%- endif -%} {%- endif -%} -{%- endfor %} +{%- endfor -%}{{ "\n\t" }}\ && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ @@ -105,7 +100,11 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ +{% if php_version in [7.1, 7.2, 7.3] %} + mariadb-client \ +{% else %} mysql-client \ +{% endif %} nano \ net-tools \ netcat \ @@ -144,35 +143,55 @@ RUN set -eux \ ### ### Install custom software ### +{% if not build_fail_fast %} RUN set -eux \ -{% for tool in software_enabled %} -{# Not disabled #} -{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %} -# {{ tool }} -{# Version specific pre-command available? #} -{% if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] %} - && {{ software_available[tool][php_version]['pre'] }} \ -{# Generic pre-command available? #} -{% elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] %} - && {{ software_available[tool]['all']['pre'] }} \ -{% endif %} -{# Version specific command available? #} -{% if php_version in software_available[tool] and 'command' in software_available[tool][php_version] %} - && {{ software_available[tool][php_version]['command'] }} \ -{# Generic command available? #} -{% else %} - && {{ software_available[tool]['all']['command'] }} \ -{% endif %} -{# Version specific post-command available? #} -{% if php_version in software_available[tool] and 'post' in software_available[tool][php_version] %} - && {{ software_available[tool][php_version]['post'] }} \ -{# Generic post-command available? #} -{% elif 'all' in software_available[tool] and 'post' in software_available[tool]['all'] %} - && {{ software_available[tool]['all']['post'] }} \ -{% endif %} -{% endif %} -{% endfor %} - \ +{%- endif -%} +{%- for tool in software_enabled -%} + {# Not disabled #} + {%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%} + {{ "\n" }}# -------------------- {{ tool }} -------------------- + {%- if build_fail_fast -%} + {{ "\n" }}RUN set -eux \ + {%- endif -%} + {#- Version specific pre-command available? -#} + {%- if php_version in software_available[tool] and 'pre' in software_available[tool][php_version] -%} + {{ "\n\t" }}&& {{ software_available[tool][php_version]['pre'] }} \ + {#- Generic pre-command available? -#} + {%- elif 'all' in software_available[tool] and 'pre' in software_available[tool]['all'] -%} + {{ "\n\t" }}&& {{ software_available[tool]['all']['pre'] }} \ + {%- endif -%} + {#- Version specific command available? -#} + {%- if php_version in software_available[tool] and 'command' in software_available[tool][php_version] -%} + {{ "\n\t" }}&& {{ software_available[tool][php_version]['command'] }} \ + {#- Generic command available? -#} + {%- else -%} + {{ "\n\t" }}&& {{ software_available[tool]['all']['command'] }} \ + {%- 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) \ @@ -192,27 +211,48 @@ RUN set -eux \ ### ### Install Composer (PHP) ### +{% if not build_fail_fast %} RUN set -eux \ -{% for tool in composer_enabled %} -{# Not disabled #} -{% if ('disabled' not in composer_available[tool]) or (php_version not in composer_available[tool]['disabled']) %} -# {{ tool }} -{# Version specific gem version available? #} -{% if php_version in composer_available[tool] and 'version' in composer_available[tool][php_version] %} - && 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'] %} - && COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }}:{{ composer_available[tool]['all']['version'] }} \ -{# No version info available #} -{% else %} - && COMPOSER_HOME="{{ composer_home }}" composer global require {{ composer_available[tool]['name'] }} \ -{% endif %} -{% if 'link' in composer_available[tool] %} - && ln -s {{ composer_home }}/vendor/{{ composer_available[tool]['name'] }}/{{ composer_available[tool]['link'] }} /usr/local/bin/ \ -{% endif %} -{% endif %} +{%- 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 %} - \ +{% if build_fail_fast -%} + RUN set -eux \{{ "\n" }} +{%- else -%} + {{ "\n\t" }}\{{ "\n" }} +{%- endif %} && rm -rf /tmp/* \ && (rm -rf /tmp/.* || true) \ \ @@ -224,24 +264,44 @@ RUN set -eux \ ### ### Install npm (Node) ### +{% if not build_fail_fast %} RUN set -eux \ -{% for tool in npm_enabled %} -{# Not disabled #} -{% if ('disabled' not in npm_available[tool]) or (php_version not in npm_available[tool]['disabled']) %} -# {{ tool }} -{# Version specific gem version available? #} -{% if php_version in npm_available[tool] and 'version' in npm_available[tool][php_version] %} - && 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'] %} - && su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }} {{ npm_available[tool]['all']['version'] }}' devilbox \ -{# No version info available #} -{% else %} - && su -c '. /opt/nvm/nvm.sh; npm install -g {{ npm_available[tool]['name'] }}' devilbox \ -{% endif %} -{% endif %} -{% endfor %} - \ +{%- 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 \ @@ -257,24 +317,44 @@ RUN set -eux \ ### ### Install gem (Ruby) ### +{% if not build_fail_fast %} RUN set -eux \ -{% for tool in gem_enabled %} -{# Not disabled #} -{% if ('disabled' not in gem_available[tool]) or (php_version not in gem_available[tool]['disabled']) %} -# {{ tool }} -{# Version specific gem version available? #} -{% if php_version in gem_available[tool] and 'version' in gem_available[tool][php_version] %} - && 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'] %} - && gem install {{ gem_available[tool]['name'] }} -v {{ gem_available[tool]['all']['version'] }} \ -{# No version info available #} -{% else %} - && gem install {{ gem_available[tool]['name'] }} \ -{% endif %} -{% endif %} -{% endfor %} - \ +{%- 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) \ @@ -287,24 +367,44 @@ RUN set -eux \ ### ### Install pip (Python) packages ### +{% if not build_fail_fast %} RUN set -eux \ -{% for tool in pip_enabled %} -{# Not disabled #} -{% if ('disabled' not in pip_available[tool]) or (php_version not in pip_available[tool]['disabled']) %} -# {{ tool }} -{# Version specific gem version available? #} -{% if php_version in pip_available[tool] and 'version' in pip_available[tool][php_version] %} - && pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool][php_version]['version'] }} \ -{# Generic gem version available? #} -{% elif 'all' in pip_available[tool] and 'version' in pip_available[tool]['all'] %} - && pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }}=={{ pip_available[tool]['all']['version'] }} \ -{# No version info available #} -{% else %} - && pip install --no-cache-dir --force-reinstall {{ pip_available[tool]['name'] }} \ -{% endif %} -{% endif %} -{% endfor %} - \ +{%- 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) \ @@ -355,51 +455,52 @@ RUN set -eux \ && rm -f /usr/local/etc/php/php.ini RUN set -eux \ -{# ---- SOFTWARE ---- #} -{% for tool in software_enabled %} -{# Not disabled #} -{% if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) %} -{% if 'check' in software_available[tool] %} - && {{ software_available[tool]['check'] }} \ -{% endif %} -{% endif %} -{% endfor %} \ -{# ---- 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] %} - && {{ composer_available[tool]['check'] }} \ -{% endif %} -{% endif %} -{% endfor %} \ -{# ---- 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] %} - && {{ pip_available[tool]['check'] }} \ -{% endif %} -{% endif %} -{% endfor %} \ -{# ---- 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] %} - && {{ npm_available[tool]['check'] }} \ -{% endif %} -{% endif %} -{% endfor %} \ -{# ---- 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] %} - && {{ gem_available[tool]['check'] }} \ -{% endif %} -{% endif %} -{% endfor %} \ +# -------------------- Software -------------------- +{%- for tool in software_enabled -%} + {#- Not disabled -#} + {%- if ('disabled' not in software_available[tool]) or (php_version not in software_available[tool]['disabled']) -%} + {%- if 'check' in software_available[tool] -%} + {{ "\n\t" }}&& {{ software_available[tool]['check'] }} \ + {%- endif -%} + {%- endif -%} +{%- 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 \ diff --git a/build/ansible/group_vars/all/all-ansible.yml b/build/ansible/group_vars/all/all-ansible.yml index 4f5225f..e1cd6c6 100644 --- a/build/ansible/group_vars/all/all-ansible.yml +++ b/build/ansible/group_vars/all/all-ansible.yml @@ -15,7 +15,7 @@ edit_comment_work: "# Auto-generated via Ansible: edit build/ansible/DOCKERFILES debug: True # Also implement checks in builder images (slow, but fails faster) -build_fail_fast: True +build_fail_fast: False # ------------------------------------------------------------------------------------------------- diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 619e2b5..6615be4 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -254,6 +254,22 @@ gem_available: 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: @@ -391,13 +407,7 @@ software_available: && su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ && su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ awesomeci: - check: | - mdl --version | grep -E '[.0-9]+' \ - && scss-lint --version | grep -E '[.0-9]+' \ - && eslint -v | grep -E '[.0-9]+' \ - && jsonlint --version | grep -E '[.0-9]+' \ - && mdlint --version | grep -E '[.0-9]+' \ - && gulp --version | grep -E '[.0-9]+' \ + check: regex-grep --version | grep -E '[.0-9]+' all: command: | git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ @@ -680,6 +690,30 @@ software_available: 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: | From 87234a6f4644cf01573275d411d42c9c0a4c00c0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 3 Nov 2019 22:54:27 +0100 Subject: [PATCH 07/11] Simplify GitHub Action workflow --- .github/workflows/images.yml | 71 ++++-------------------------------- .travis.yml | 8 ++-- 2 files changed, 11 insertions(+), 68 deletions(-) diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index bcfad70..478d29a 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -77,14 +77,9 @@ jobs: uses: actions/checkout@v1 # ------------------------------------------------------------ - # Build Base + # Base # ------------------------------------------------------------ - name: Build Base - run: make rebuild-base VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Build Base (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -100,17 +95,8 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() - # ------------------------------------------------------------ - # Test Base - # ------------------------------------------------------------ - name: Test Base - run: make test-base VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Test Base (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -126,18 +112,12 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() # ------------------------------------------------------------ - # Build Mods + # Mods # ------------------------------------------------------------ - name: Build Mods - run: make rebuild-mods VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Build Mods (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -153,17 +133,8 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() - # ------------------------------------------------------------ - # Test Mods - # ------------------------------------------------------------ - name: Test Mods - run: make test-mods VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Test Mods (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -179,18 +150,12 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() # ------------------------------------------------------------ - # Build Prod + # Prod # ------------------------------------------------------------ - name: Build Prod - run: make rebuild-prod VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Build Prod (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -206,17 +171,8 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() - # ------------------------------------------------------------ - # Test Prod - # ------------------------------------------------------------ - name: Test Prod - run: make test-prod VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Test Prod (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -232,18 +188,12 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() # ------------------------------------------------------------ - # Build Work + # Work # ------------------------------------------------------------ - name: Build Work - run: make rebuild-work VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Build Work (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -259,17 +209,8 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() - # ------------------------------------------------------------ - # Test Work - # ------------------------------------------------------------ - name: Test Work - run: make test-work VERSION=${VERSION} - env: - VERSION: ${{ matrix.version }} - - - name: Test Work (Retry) run: | retry() { for ((n=0; n<${RETRIES}; n++)); do @@ -285,7 +226,7 @@ jobs: env: VERSION: ${{ matrix.version }} RETRIES: 5 - if: failure() + # ------------------------------------------------------------ # Diff README.md @@ -293,9 +234,11 @@ jobs: - 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 # ------------------------------------------------------------ diff --git a/.travis.yml b/.travis.yml index 2b63ad4..381f587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,16 +82,16 @@ before_script: # Build (multiple tries due to network outages) - retry make build-base VERSION=${PHP} - - retry make test-base VERSION=${PHP} + - retry make test-base VERSION=${PHP} - retry make build-mods VERSION=${PHP} - - retry make test-mods VERSION=${PHP} + - retry make test-mods VERSION=${PHP} - retry make build-prod VERSION=${PHP} - - retry make test-prod VERSION=${PHP} + - retry make test-prod VERSION=${PHP} - retry make build-work VERSION=${PHP} - - retry make test-work VERSION=${PHP} + - retry make test-work VERSION=${PHP} # Test if PHP modules have changed - make gen-readme VERSION=${PHP} From 91741aaf7fcdbb84c2b72ff310ff48cd8be4c390 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 4 Nov 2019 00:53:24 +0100 Subject: [PATCH 08/11] Fix phalcon install --- Dockerfiles/work/Dockerfile-5.4 | 2 +- Dockerfiles/work/Dockerfile-5.5 | 3 ++- Dockerfiles/work/Dockerfile-5.6 | 3 ++- Dockerfiles/work/Dockerfile-7.0 | 3 ++- Dockerfiles/work/Dockerfile-7.1 | 3 ++- Dockerfiles/work/Dockerfile-7.2 | 3 ++- build/ansible/group_vars/all/work.yml | 15 ++++++++++++++- 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index f9b6edb..4e87843 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -271,7 +271,7 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index d75f615..37deb03 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -275,7 +275,8 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \ +&& chmod +x phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index ff2da43..5d83f7e 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -288,7 +288,8 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \ +&& chmod +x phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 1c8ee18..918e8ed 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -288,7 +288,8 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \ +&& chmod +x phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 4efc3bb..7265524 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -288,7 +288,8 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \ +&& chmod +x phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 18307fa..23ab5ba 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -288,7 +288,8 @@ RUN set -eux \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ && su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ -&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& ln -sf /usr/local/src/phalcon-devtools/phalcon /usr/local/bin/phalcon \ +&& chmod +x phalcon \ && cd / \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index 6615be4..836b4ca 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -584,11 +584,23 @@ software_available: 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 \ @@ -597,7 +609,8 @@ software_available: 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 \ + && 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: From ec7e1cb622c1c816a1abdea31cba469aece93f2c Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 4 Nov 2019 01:09:10 +0100 Subject: [PATCH 09/11] Speed up Dockerfile generation --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 524de56..a8139b1 100644 --- a/Makefile +++ b/Makefile @@ -90,9 +90,11 @@ gen-dockerfiles: -e MY_GID=$$(id -g) \ -v ${PWD}:/data \ -w /data/build/ansible \ - cytopia/ansible:2.8 ansible-playbook generate.yml \ + 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)}' \ + -e \"{build_fail_fast: $(FAIL_FAST)}\" \ --diff $(ARGS) From dd78ed0b71b25eb1b034098bdf54e6775dbcf21b Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 4 Nov 2019 03:18:25 +0100 Subject: [PATCH 10/11] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6aba0c..338406b 100644 --- a/README.md +++ b/README.md @@ -643,12 +643,12 @@ Check out this table to see which Docker image provides what PHP modules. 7.4 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 - 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, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + 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 8.0 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 - 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, recode, 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 + 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 From bc01b396a1cda9723cd0dcd69a1e42fbc95bae91 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 4 Nov 2019 10:24:26 +0100 Subject: [PATCH 11/11] Shorten build time on Travis to be within limits --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 381f587..43070bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,13 +82,13 @@ before_script: # Build (multiple tries due to network outages) - retry make build-base VERSION=${PHP} - - retry make test-base VERSION=${PHP} + #- retry make test-base VERSION=${PHP} - retry make build-mods VERSION=${PHP} - - retry make test-mods VERSION=${PHP} + #- retry make test-mods VERSION=${PHP} - retry make build-prod VERSION=${PHP} - - retry make test-prod VERSION=${PHP} + #- retry make test-prod VERSION=${PHP} - retry make build-work VERSION=${PHP} - retry make test-work VERSION=${PHP}