mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-12 03:51:15 +00:00
Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52c1a907f9 | ||
|
|
e19d955965 | ||
|
|
c0af9f91a6 | ||
|
|
5f8551e742 | ||
|
|
b774432a7a | ||
|
|
e856fe1da4 | ||
|
|
1ed1c7eb81 | ||
|
|
756b6bc0fe | ||
|
|
4e9969ef75 | ||
|
|
1b67f7b02d | ||
|
|
9fda4fd0a2 | ||
|
|
4858303a1b | ||
|
|
2e3115ef04 | ||
|
|
8989b52602 | ||
|
|
ee6b735f17 | ||
|
|
20b45a0b79 | ||
|
|
687969b59b | ||
|
|
111c8a412f | ||
|
|
1d27f22e3f | ||
|
|
4b8668623b | ||
|
|
7b7a680e0b | ||
|
|
49d9459df8 | ||
|
|
efad9eaa48 | ||
|
|
22231fc61c | ||
|
|
f971d8d4b8 | ||
|
|
5498275047 | ||
|
|
a6f9bd8219 | ||
|
|
ea47aa2ba5 | ||
|
|
5094da0ae6 | ||
|
|
38d4f0c222 | ||
|
|
853962c4e9 | ||
|
|
8d50798d54 | ||
|
|
b50a688add | ||
|
|
99bd1d2cdb | ||
|
|
ac368b8725 | ||
|
|
c815e9040c | ||
|
|
61ccae6fc1 | ||
|
|
f7699f9c84 | ||
|
|
1cab69c0ab | ||
|
|
2158817a05 | ||
|
|
29d34dcdb2 | ||
|
|
ff04507e50 | ||
|
|
a448549b82 | ||
|
|
e808575164 | ||
|
|
643e1a7478 | ||
|
|
f3758cec56 | ||
|
|
ec5d6734fa | ||
|
|
ab91e0794b | ||
|
|
b6f926cf8a | ||
|
|
1609e8ea61 | ||
|
|
389e0bad20 | ||
|
|
e48ceef4a6 | ||
|
|
b659089ff9 | ||
|
|
e8e92eceb7 | ||
|
|
14c25cf670 | ||
|
|
8679dbee6a | ||
|
|
6ccf44b5a9 | ||
|
|
2826053fc0 | ||
|
|
1eb30660a6 | ||
|
|
81ef92f91e | ||
|
|
663f716031 | ||
|
|
ea52cc0969 | ||
|
|
ee14a4d46e | ||
|
|
d894a2bff7 | ||
|
|
cdfca15613 | ||
|
|
d1061273b0 | ||
|
|
1c31dbe3bf | ||
|
|
7975126bdf | ||
|
|
ffaee357fd | ||
|
|
a0e7ae7131 | ||
|
|
7041e6ef0a | ||
|
|
176f48d063 | ||
|
|
dc15215156 | ||
|
|
7693a4ea3f | ||
|
|
4ac5a7ab10 | ||
|
|
2b60cd648d | ||
|
|
492d23b9f8 | ||
|
|
b852001495 | ||
|
|
5eb8ce8187 | ||
|
|
d1fd0addaa | ||
|
|
0aceceabda | ||
|
|
42933391b6 |
172
.github/workflows/action_branch.yml
vendored
Normal file
172
.github/workflows/action_branch.yml
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: build
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
push:
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (1/8) Determine parameter settings
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
params:
|
||||
uses: ./.github/workflows/params.yml
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (2/8) Configure Build and Deploy Matrices
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
configure:
|
||||
needs: [params]
|
||||
uses: ./.github/workflows/zzz-reuse-configure.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
matrix: ${{ needs.params.outputs.matrix }}
|
||||
refs: ${{ needs.params.outputs.refs }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (3/8) Build & Test base
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
base:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: base
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (4/8) Build & Test mods
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
mods:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: mods
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (5/8) Build & Test prod
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
prod:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: prod
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (6/8) Build & Test work
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
work:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: work
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (7/8) Push images
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-image:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (8/8) Push Manifests
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-manifest:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
- push-image
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}
|
||||
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
|
||||
params_matrix: ${{ needs.params.outputs.matrix }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
174
.github/workflows/action_pull_request.yml
vendored
Normal file
174
.github/workflows/action_pull_request.yml
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: build
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (1/8) Determine parameter settings
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
params:
|
||||
uses: ./.github/workflows/params.yml
|
||||
# Only run for forks (contributor)
|
||||
if: github.event.pull_request.head.repo.fork
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (2/8) Configure Build and Deploy Matrices
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
configure:
|
||||
needs: [params]
|
||||
uses: ./.github/workflows/zzz-reuse-configure.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
matrix: ${{ needs.params.outputs.matrix }}
|
||||
refs: ${{ needs.params.outputs.refs }}
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (3/8) Build & Test base
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
base:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: base
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (4/8) Build & Test mods
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
mods:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: mods
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (5/8) Build & Test prod
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
prod:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: prod
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (6/8) Build & Test work
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
work:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: work
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (7/8) Push images
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-image:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (8/8) Push Manifests
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-manifest:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
- push-image
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: false
|
||||
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
|
||||
params_matrix: ${{ needs.params.outputs.matrix }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ""
|
||||
dockerhub_password: ""
|
||||
174
.github/workflows/action_schedule.yml
vendored
Normal file
174
.github/workflows/action_schedule.yml
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: nightly
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
# Runs daily
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (1/8) Determine parameter settings
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
params:
|
||||
uses: ./.github/workflows/params.yml
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (2/8) Configure Build and Deploy Matrices
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
configure:
|
||||
needs: [params]
|
||||
uses: ./.github/workflows/zzz-reuse-configure.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
matrix: ${{ needs.params.outputs.matrix }}
|
||||
refs: ${{ needs.params.outputs.refs }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (3/8) Build & Test base
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
base:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: base
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (4/8) Build & Test mods
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
mods:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: mods
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (5/8) Build & Test prod
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
prod:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: prod
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (6/8) Build & Test work
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
work:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
uses: ./.github/workflows/zzz-reuse-build.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
flavour: work
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (7/8) Push images
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-image:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-images.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
build_matrix: ${{ needs.configure.outputs.matrix_build }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# (8/8) Push Manifests
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
push-manifest:
|
||||
needs:
|
||||
- params
|
||||
- configure
|
||||
- base
|
||||
- mods
|
||||
- prod
|
||||
- work
|
||||
- push-image
|
||||
uses: ./.github/workflows/zzz-reuse-deploy-manifests.yml
|
||||
with:
|
||||
enabled: true
|
||||
can_deploy: true
|
||||
deploy_matrix: ${{ needs.configure.outputs.matrix_deploy }}
|
||||
params_matrix: ${{ needs.params.outputs.matrix }}
|
||||
has_refs: ${{ needs.configure.outputs.has_refs }}
|
||||
artifact_prefix: ${{ needs.configure.outputs.artifact_prefix }}
|
||||
secrets:
|
||||
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
348
.github/workflows/build.yml
vendored
348
.github/workflows/build.yml
vendored
@@ -1,348 +0,0 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: build
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
# Runs on Pull Requests
|
||||
pull_request:
|
||||
# Runs on Push
|
||||
push:
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# What to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
jobs:
|
||||
build:
|
||||
name: "[ PHP-${{ matrix.version }} ]"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
version:
|
||||
- '5.2'
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
steps:
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Setup repository
|
||||
# ------------------------------------------------------------
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set variables
|
||||
id: vars
|
||||
run: |
|
||||
|
||||
# Retrieve git info (tags, etc)
|
||||
git fetch --all
|
||||
|
||||
# Branch, Tag or Commit
|
||||
GIT_TYPE="$( \
|
||||
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||
| sh \
|
||||
| grep '^GIT_TYPE' \
|
||||
| sed 's|.*=||g' \
|
||||
)"
|
||||
# Branch name, Tag name or Commit Hash
|
||||
GIT_SLUG="$( \
|
||||
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||
| sh \
|
||||
| grep '^GIT_NAME' \
|
||||
| sed 's|.*=||g' \
|
||||
)"
|
||||
# Docker Tag
|
||||
if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then
|
||||
DOCKER_TAG_BASE="${VERSION}-base"
|
||||
DOCKER_TAG_MODS="${VERSION}-mods"
|
||||
DOCKER_TAG_PROD="${VERSION}-prod"
|
||||
DOCKER_TAG_WORK="${VERSION}-work"
|
||||
else
|
||||
DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}"
|
||||
DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}"
|
||||
DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}"
|
||||
DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}"
|
||||
fi
|
||||
|
||||
# Output
|
||||
echo "GIT_TYPE=${GIT_TYPE}"
|
||||
echo "GIT_SLUG=${GIT_SLUG}"
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
|
||||
|
||||
# Export variable
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
||||
echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV}
|
||||
echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Base
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Base
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make _pull-base-image VERSION=${VERSION}
|
||||
retry make build-base VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Base
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-base VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Mods
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Mods
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-mods VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Mods
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-mods VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Prod
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Prod
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-prod VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Prod
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-prod VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Work
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Work
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-work VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Work
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-work VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Diff README.md
|
||||
# ------------------------------------------------------------
|
||||
- name: Diff README.md
|
||||
run: |
|
||||
make gen-readme VERSION=${VERSION}
|
||||
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Deploy
|
||||
# ------------------------------------------------------------
|
||||
- name: Publish images (only repo owner)
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Output
|
||||
echo "GIT_TYPE=${GIT_TYPE}"
|
||||
echo "GIT_SLUG=${GIT_SLUG}"
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
|
||||
|
||||
# Tag image
|
||||
retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}"
|
||||
retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}"
|
||||
retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}"
|
||||
retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}"
|
||||
docker images
|
||||
|
||||
# Login
|
||||
retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
# Push
|
||||
retry make push TAG=${DOCKER_TAG_BASE}
|
||||
retry make push TAG=${DOCKER_TAG_MODS}
|
||||
retry make push TAG=${DOCKER_TAG_PROD}
|
||||
retry make push TAG=${DOCKER_TAG_WORK}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions
|
||||
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
|
||||
&& (
|
||||
(github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
|
||||
||
|
||||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
|
||||
||
|
||||
(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-'))
|
||||
)
|
||||
4
.github/workflows/linting.yml
vendored
4
.github/workflows/linting.yml
vendored
@@ -41,10 +41,6 @@ jobs:
|
||||
run: |
|
||||
make lint-yaml
|
||||
|
||||
- name: Lint workflow
|
||||
run: |
|
||||
make lint-workflow
|
||||
|
||||
- name: Lint Changelog
|
||||
run: |
|
||||
make lint-changelog
|
||||
|
||||
351
.github/workflows/nightly.yml
vendored
351
.github/workflows/nightly.yml
vendored
@@ -1,351 +0,0 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: nightly
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
# Runs daily
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# What to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
jobs:
|
||||
nightly:
|
||||
name: "[ PHP-${{ matrix.version }} ] (ref: ${{ matrix.refs }})"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: False
|
||||
matrix:
|
||||
version:
|
||||
- '5.2'
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
- '8.0'
|
||||
- '8.1'
|
||||
- '8.2'
|
||||
refs:
|
||||
- 'master'
|
||||
- '0.136'
|
||||
steps:
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Setup repository
|
||||
# ------------------------------------------------------------
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ matrix.refs }}
|
||||
|
||||
- name: Set variables
|
||||
id: vars
|
||||
run: |
|
||||
|
||||
# Retrieve git info (tags, etc)
|
||||
git fetch --all
|
||||
|
||||
# Branch, Tag or Commit
|
||||
GIT_TYPE="$( \
|
||||
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||
| sh \
|
||||
| grep '^GIT_TYPE' \
|
||||
| sed 's|.*=||g' \
|
||||
)"
|
||||
# Branch name, Tag name or Commit Hash
|
||||
GIT_SLUG="$( \
|
||||
curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \
|
||||
| sh \
|
||||
| grep '^GIT_NAME' \
|
||||
| sed 's|.*=||g' \
|
||||
)"
|
||||
# Docker Tag
|
||||
if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then
|
||||
DOCKER_TAG_BASE="${VERSION}-base"
|
||||
DOCKER_TAG_MODS="${VERSION}-mods"
|
||||
DOCKER_TAG_PROD="${VERSION}-prod"
|
||||
DOCKER_TAG_WORK="${VERSION}-work"
|
||||
else
|
||||
DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}"
|
||||
DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}"
|
||||
DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}"
|
||||
DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}"
|
||||
fi
|
||||
|
||||
# Output
|
||||
echo "GIT_TYPE=${GIT_TYPE}"
|
||||
echo "GIT_SLUG=${GIT_SLUG}"
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
|
||||
|
||||
# Export variable
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
|
||||
echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV}
|
||||
echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Base
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Base
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make _pull-base-image VERSION=${VERSION}
|
||||
retry make build-base VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Base
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-base VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Mods
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Mods
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-mods VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Mods
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-mods VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Prod
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Prod
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-prod VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Prod
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-prod VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Work
|
||||
# ------------------------------------------------------------
|
||||
- name: Build Work
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make build-work VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
- name: Test Work
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
retry make test-work VERSION=${VERSION}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Diff README.md
|
||||
# ------------------------------------------------------------
|
||||
- name: Diff README.md
|
||||
run: |
|
||||
make gen-readme VERSION=${VERSION}
|
||||
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Deploy
|
||||
# ------------------------------------------------------------
|
||||
- name: Publish images (only repo owner)
|
||||
run: |
|
||||
retry() {
|
||||
for n in $(seq ${RETRIES}); do
|
||||
echo "[${n}/${RETRIES}] ${*}";
|
||||
if eval "${*}"; then
|
||||
echo "[SUCC] ${n}/${RETRIES}";
|
||||
return 0;
|
||||
fi;
|
||||
sleep ${PAUSE};
|
||||
echo "[FAIL] ${n}/${RETRIES}";
|
||||
done;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Output
|
||||
echo "GIT_TYPE=${GIT_TYPE}"
|
||||
echo "GIT_SLUG=${GIT_SLUG}"
|
||||
echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}"
|
||||
echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}"
|
||||
echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}"
|
||||
echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}"
|
||||
|
||||
# Tag image
|
||||
retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}"
|
||||
retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}"
|
||||
retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}"
|
||||
retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}"
|
||||
docker images
|
||||
|
||||
# Login
|
||||
retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
# Push
|
||||
retry make push TAG=${DOCKER_TAG_BASE}
|
||||
retry make push TAG=${DOCKER_TAG_MODS}
|
||||
retry make push TAG=${DOCKER_TAG_PROD}
|
||||
retry make push TAG=${DOCKER_TAG_WORK}
|
||||
env:
|
||||
VERSION: ${{ matrix.version }}
|
||||
RETRIES: 20
|
||||
PAUSE: 10
|
||||
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions
|
||||
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
|
||||
&& (
|
||||
(github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
|
||||
||
|
||||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
|
||||
||
|
||||
(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-'))
|
||||
)
|
||||
76
.github/workflows/params.yml
vendored
Normal file
76
.github/workflows/params.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Job Name
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
name: params
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Custom Variables
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
env:
|
||||
MATRIX: >-
|
||||
[
|
||||
{
|
||||
"NAME": "PHP",
|
||||
"VERSION": ["5.2"],
|
||||
"FLAVOUR": ["default"],
|
||||
"ARCH": ["linux/amd64"]
|
||||
},
|
||||
{
|
||||
"NAME": "PHP",
|
||||
"VERSION": ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"],
|
||||
"FLAVOUR": ["default"],
|
||||
"ARCH": ["linux/amd64"]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# When to run
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
matrix:
|
||||
description: "The determined version matrix"
|
||||
value: ${{ jobs.params.outputs.matrix }}
|
||||
refs:
|
||||
description: "The determined git ref matrix (only during scheduled run)"
|
||||
value: ${{ jobs.params.outputs.refs }}
|
||||
|
||||
jobs:
|
||||
params:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
refs: ${{ steps.set-refs.outputs.matrix }}
|
||||
|
||||
steps:
|
||||
- name: "[Set-Output] Matrix"
|
||||
id: set-matrix
|
||||
run: |
|
||||
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
|
||||
|
||||
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
|
||||
id: set-refs
|
||||
uses: cytopia/git-ref-matrix-action@v0.1.4
|
||||
with:
|
||||
repository_default_branch: master
|
||||
branches: master
|
||||
num_latest_tags: 1
|
||||
if: github.event_name == 'schedule'
|
||||
|
||||
- name: "[DEBUG] Show settings'"
|
||||
run: |
|
||||
echo 'Matrix'
|
||||
echo '--------------------'
|
||||
echo '${{ steps.set-matrix.outputs.matrix }}'
|
||||
echo
|
||||
|
||||
echo 'Matrix: Refs'
|
||||
echo '--------------------'
|
||||
echo '${{ steps.set-matrix-refs.outputs.matrix }}'
|
||||
echo
|
||||
423
.github/workflows/zzz-reuse-build.yml
vendored
Normal file
423
.github/workflows/zzz-reuse-build.yml
vendored
Normal file
@@ -0,0 +1,423 @@
|
||||
---
|
||||
name: Build multi-arch images
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
###
|
||||
### Variables
|
||||
###
|
||||
inputs:
|
||||
enabled:
|
||||
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
|
||||
required: true
|
||||
type: boolean
|
||||
can_deploy:
|
||||
description: 'Determines wheather this workflow will also deploy (login and push).'
|
||||
required: true
|
||||
type: boolean
|
||||
build_matrix:
|
||||
description: 'The build matrix'
|
||||
required: true
|
||||
type: string
|
||||
has_refs:
|
||||
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
|
||||
required: true
|
||||
type: string
|
||||
artifact_prefix:
|
||||
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
|
||||
required: true
|
||||
type: string
|
||||
flavour:
|
||||
description: 'The flavour to build (base, mods, prod or work).'
|
||||
required: true
|
||||
type: string
|
||||
###
|
||||
### Secrets
|
||||
###
|
||||
secrets:
|
||||
dockerhub_username:
|
||||
description: 'The username for Dockerhub.'
|
||||
required: false
|
||||
dockerhub_password:
|
||||
description: 'The password for Dockerhub.'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# JOB: BUILD
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
build:
|
||||
name: ${{ matrix.name }}-${{ matrix.version }}-${{ inputs.flavour }} (${{ matrix.arch }}) ${{ matrix.refs }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJson(inputs.build_matrix) }}
|
||||
if: inputs.enabled
|
||||
steps:
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Setup repository
|
||||
# ------------------------------------------------------------
|
||||
- name: "[SETUP] Checkout repository (current)"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
if: inputs.has_refs == 0
|
||||
|
||||
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ matrix.refs }}
|
||||
if: inputs.has_refs != 0
|
||||
|
||||
- name: "[SETUP] Setup QEMU environment"
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
image: tonistiigi/binfmt:latest
|
||||
platforms: all
|
||||
|
||||
- name: "[SETUP] Set artifact names"
|
||||
id: set-artifact-name
|
||||
run: |
|
||||
PRE_HASH="$( git rev-parse HEAD | head -c 10 )"
|
||||
VERSION="${{ matrix.version }}"
|
||||
ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )"
|
||||
|
||||
NAME_BASE="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-base"
|
||||
NAME_MODS="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-mods"
|
||||
NAME_PROD="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-prod"
|
||||
NAME_WORK="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-work"
|
||||
|
||||
echo "::set-output name=base::${NAME_BASE}"
|
||||
echo "::set-output name=mods::${NAME_MODS}"
|
||||
echo "::set-output name=prod::${NAME_PROD}"
|
||||
echo "::set-output name=work::${NAME_WORK}"
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Import
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Download and import base
|
||||
###
|
||||
- name: "[Artifact Load] Download base"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'mods' }}
|
||||
|
||||
- name: "[Artifact Load] Import base"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.base }}
|
||||
if: ${{ inputs.flavour == 'mods' }}
|
||||
|
||||
###
|
||||
### Download and import mods
|
||||
###
|
||||
- name: "[Artifact Load] Download mods"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'prod' }}
|
||||
|
||||
- name: "[Artifact Load] Import mods"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.mods }}
|
||||
if: ${{ inputs.flavour == 'prod' }}
|
||||
|
||||
###
|
||||
### Download and import prod
|
||||
###
|
||||
- name: "[Artifact Load] Download prod"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'work' }}
|
||||
|
||||
- name: "[Artifact Load] Import prod"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.prod }}
|
||||
if: ${{ inputs.flavour == 'work' }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Build
|
||||
# ------------------------------------------------------------
|
||||
- name: Build
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make build VERSION=${{ matrix.version }} FLAVOUR=${{ inputs.flavour }} ARCH=${{ matrix.arch }}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Test
|
||||
# ------------------------------------------------------------
|
||||
- name: Test
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make test VERSION=${{ matrix.version }} FLAVOUR=${{ inputs.flavour }} ARCH=${{ matrix.arch }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Expot (base)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Export and Upload base
|
||||
###
|
||||
- name: "[Artifact Save] Export base"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make save-verify VERSION=${{ matrix.version }} FLAVOUR=base ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.base }} INFILE=${{ steps.set-artifact-name.outputs.base }}
|
||||
if: ${{ inputs.flavour == 'base' }}
|
||||
|
||||
###
|
||||
### Try 1
|
||||
###
|
||||
- name: "[Artifact Save] Upload base"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
path: ${{ steps.set-artifact-name.outputs.base }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'base' }}
|
||||
|
||||
- name: "[Artifact Save] Download base (verify)"
|
||||
continue-on-error: true
|
||||
id: download-base-1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
|
||||
if: ${{ inputs.flavour == 'base' }}
|
||||
|
||||
###
|
||||
### Try 2
|
||||
###
|
||||
- name: "[Artifact Save] Upload base (retry)"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
path: ${{ steps.set-artifact-name.outputs.base }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
|
||||
|
||||
- name: "[Artifact Save] Download base (verify 2)"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
path: ${{ steps.set-artifact-name.outputs.base }}.tmp
|
||||
if: ${{ inputs.flavour == 'base' && steps.download-base-1.outcome == 'failure'}}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Expot (mods)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Export and Upload mods
|
||||
###
|
||||
- name: "[Artifact Save] Export mods"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make save-verify VERSION=${{ matrix.version }} FLAVOUR=mods ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.mods }} INFILE=${{ steps.set-artifact-name.outputs.mods }}
|
||||
if: ${{ inputs.flavour == 'mods' }}
|
||||
|
||||
###
|
||||
### Try 1
|
||||
###
|
||||
- name: "[Artifact Save] Upload mods"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
path: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'mods' }}
|
||||
|
||||
- name: "[Artifact Save] Download mods (verify)"
|
||||
continue-on-error: true
|
||||
id: download-mods-1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
|
||||
if: ${{ inputs.flavour == 'mods' }}
|
||||
|
||||
###
|
||||
### Try 2
|
||||
###
|
||||
- name: "[Artifact Save] Upload mods (retry)"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
path: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
|
||||
|
||||
- name: "[Artifact Save] Download mods (verify 2)"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
path: ${{ steps.set-artifact-name.outputs.mods }}.tmp
|
||||
if: ${{ inputs.flavour == 'mods' && steps.download-mods-1.outcome == 'failure'}}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Expot (prod)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Export and Upload prod
|
||||
###
|
||||
- name: "[Artifact Save] Export prod"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make save-verify VERSION=${{ matrix.version }} FLAVOUR=prod ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.prod }} INFILE=${{ steps.set-artifact-name.outputs.prod }}
|
||||
if: ${{ inputs.flavour == 'prod' }}
|
||||
|
||||
###
|
||||
### Try 1
|
||||
###
|
||||
- name: "[Artifact Save] Upload prod"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
path: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'prod' }}
|
||||
|
||||
- name: "[Artifact Save] Download prod (verify)"
|
||||
continue-on-error: true
|
||||
id: download-prod-1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
|
||||
if: ${{ inputs.flavour == 'prod' }}
|
||||
|
||||
###
|
||||
### Try 2
|
||||
###
|
||||
- name: "[Artifact Save] Upload prod (retry)"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
path: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
|
||||
|
||||
- name: "[Artifact Save] Download prod (verify 2)"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
path: ${{ steps.set-artifact-name.outputs.prod }}.tmp
|
||||
if: ${{ inputs.flavour == 'prod' && steps.download-prod-1.outcome == 'failure'}}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Expot (work)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Export and Upload work
|
||||
###
|
||||
- name: "[Artifact Save] Export work"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make save-verify VERSION=${{ matrix.version }} FLAVOUR=work ARCH=${{ matrix.arch }} OUTFILE=${{ steps.set-artifact-name.outputs.work }} INFILE=${{ steps.set-artifact-name.outputs.work }}
|
||||
if: ${{ inputs.flavour == 'work' }}
|
||||
|
||||
###
|
||||
### Try 1
|
||||
###
|
||||
- name: "[Artifact Save] Upload work"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.work }}
|
||||
path: ${{ steps.set-artifact-name.outputs.work }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'work' }}
|
||||
|
||||
- name: "[Artifact Save] Download work (verify)"
|
||||
continue-on-error: true
|
||||
id: download-work-1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.work }}
|
||||
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
|
||||
if: ${{ inputs.flavour == 'work' }}
|
||||
|
||||
###
|
||||
### Try 2
|
||||
###
|
||||
- name: "[Artifact Save] Upload work (retry)"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/upload-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.work }}
|
||||
path: ${{ steps.set-artifact-name.outputs.work }}
|
||||
if-no-files-found: error
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}
|
||||
|
||||
- name: "[Artifact Save] Download work (verify 2)"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.set-artifact-name.outputs.work }}
|
||||
path: ${{ steps.set-artifact-name.outputs.work }}.tmp
|
||||
if: ${{ inputs.flavour == 'work' && steps.download-work-1.outcome == 'failure'}}
|
||||
148
.github/workflows/zzz-reuse-configure.yml
vendored
Normal file
148
.github/workflows/zzz-reuse-configure.yml
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
---
|
||||
name: Configure Pipeline for multi-arch image build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
###
|
||||
### Variables
|
||||
###
|
||||
inputs:
|
||||
enabled:
|
||||
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
|
||||
required: true
|
||||
type: boolean
|
||||
can_deploy:
|
||||
description: 'Determines wheather this workflow will also deploy (login and push).'
|
||||
required: true
|
||||
type: boolean
|
||||
matrix:
|
||||
description: 'The version build matrix as JSON string ( list of objects: [{NAME, VERSION[], ARCH[]}] ).'
|
||||
required: true
|
||||
type: string
|
||||
refs:
|
||||
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
|
||||
required: false
|
||||
type: string
|
||||
###
|
||||
### Secrets
|
||||
###
|
||||
secrets:
|
||||
dockerhub_username:
|
||||
description: 'The username for Dockerhub.'
|
||||
required: false
|
||||
dockerhub_password:
|
||||
description: 'The password for Dockerhub.'
|
||||
required: false
|
||||
###
|
||||
### Outouts
|
||||
###
|
||||
outputs:
|
||||
can_login:
|
||||
description: "Can we login"
|
||||
value: ${{ jobs.configure.outputs.can_login }}
|
||||
has_refs:
|
||||
description: "Do we have refs"
|
||||
value: ${{ jobs.configure.outputs.has_refs }}
|
||||
matrix_build:
|
||||
description: "The determined build matrix"
|
||||
value: ${{ jobs.configure.outputs.matrix_build }}
|
||||
matrix_deploy:
|
||||
description: "The determined deploy matrix"
|
||||
value: ${{ jobs.configure.outputs.matrix_deploy }}
|
||||
artifact_prefix:
|
||||
description: "The determined unique artifact prefix"
|
||||
value: ${{ jobs.configure.outputs.artifact_prefix }}
|
||||
|
||||
jobs:
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# JOB (1/3): CONFIGURE
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
configure:
|
||||
name: Configure
|
||||
if: inputs.enabled
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
###
|
||||
### Outputs
|
||||
###
|
||||
outputs:
|
||||
can_login: ${{ steps.set-login.outputs.can_login }}
|
||||
has_refs: ${{ steps.set-matrix.outputs.has_refs }}
|
||||
matrix_build: ${{ steps.set-matrix.outputs.matrix_build }}
|
||||
matrix_deploy: ${{ steps.set-matrix.outputs.matrix_deploy }}
|
||||
artifact_prefix: ${{ steps.set-artifact-prefix.outputs.prefix }}
|
||||
|
||||
###
|
||||
### Steps
|
||||
###
|
||||
steps:
|
||||
- name: "[Set-Output] Set Docker login capabilities"
|
||||
id: set-login
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then
|
||||
echo "::set-output name=can_login::0"
|
||||
else
|
||||
echo "::set-output name=can_login::1"
|
||||
fi
|
||||
env:
|
||||
ENV_USER: ${{ secrets.dockerhub_username }}
|
||||
ENV_PASS: ${{ secrets.dockerhub_password }}
|
||||
|
||||
- name: "[Set-Output] Set Build Matrix & Deploy Matrix"
|
||||
id: set-matrix
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ inputs.refs }}" != "" ]; then
|
||||
MATRIX_BUILD="$( \
|
||||
jq -M -c \
|
||||
--argjson refs '${{ inputs.refs }}' \
|
||||
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \
|
||||
)"
|
||||
MATRIX_DEPLOY="$( \
|
||||
jq -M -c \
|
||||
--argjson refs '${{ inputs.refs }}' \
|
||||
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], refs:$refs[]})' <<<'${{ inputs.matrix }}' \
|
||||
)"
|
||||
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
|
||||
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
|
||||
echo "::set-output name=has_refs::1"
|
||||
else
|
||||
MATRIX_BUILD="$( \
|
||||
jq -M -c \
|
||||
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[], arch:.ARCH[]})' <<<'${{ inputs.matrix }}' \
|
||||
)"
|
||||
MATRIX_DEPLOY="$( \
|
||||
jq -M -c \
|
||||
'map({name:.NAME, version:.VERSION[], flavour:.FLAVOUR[]})' <<<'${{ inputs.matrix }}' \
|
||||
)"
|
||||
echo "::set-output name=matrix_build::${MATRIX_BUILD}"
|
||||
echo "::set-output name=matrix_deploy::${MATRIX_DEPLOY}"
|
||||
echo "::set-output name=has_refs::0"
|
||||
fi
|
||||
|
||||
- name: "[Set-Output] Set unique Artifact prefix"
|
||||
id: set-artifact-prefix
|
||||
shell: bash
|
||||
run: |
|
||||
PRE_DATE="$( date +"%s" )"
|
||||
PRE_RAND="$( echo $RANDOM | md5sum | head -c 10 )"
|
||||
echo "::set-output name=prefix::${PRE_DATE}-${PRE_RAND}"
|
||||
|
||||
- name: "[DEBUG] Show Workflow Inputs"
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'enabled: ${{ inputs.enabled }}'
|
||||
echo 'can_deploy: ${{ inputs.can_deploy }}'
|
||||
echo 'matrix: ${{ inputs.matrix }}'
|
||||
echo 'refs: ${{ inputs.refs }}'
|
||||
|
||||
- name: "[DEBUG] Show Determined Settings"
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'can_login=${{ steps.set-login.outputs.can_login }}'
|
||||
echo 'has_refs=${{ steps.set-matrix.outputs.has_refs }}'
|
||||
echo 'matrix_build=${{ steps.set-matrix.outputs.matrix_build }}'
|
||||
echo 'matrix_deploy=${{ steps.set-matrix.outputs.matrix_deploy }}'
|
||||
echo 'artifact_prefix=${{ steps.set-artifact-prefix.outputs.prefix }}'
|
||||
242
.github/workflows/zzz-reuse-deploy-images.yml
vendored
Normal file
242
.github/workflows/zzz-reuse-deploy-images.yml
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
name: Deploy multi-arch images
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
###
|
||||
### Variables
|
||||
###
|
||||
inputs:
|
||||
enabled:
|
||||
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
|
||||
required: true
|
||||
type: boolean
|
||||
can_deploy:
|
||||
description: 'Determines wheather this workflow will also deploy (login and push).'
|
||||
required: true
|
||||
type: boolean
|
||||
build_matrix:
|
||||
description: 'The build matrix'
|
||||
required: true
|
||||
type: string
|
||||
has_refs:
|
||||
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
|
||||
required: true
|
||||
type: string
|
||||
artifact_prefix:
|
||||
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
|
||||
required: true
|
||||
type: string
|
||||
###
|
||||
### Secrets
|
||||
###
|
||||
secrets:
|
||||
dockerhub_username:
|
||||
description: 'The username for Dockerhub.'
|
||||
required: false
|
||||
dockerhub_password:
|
||||
description: 'The password for Dockerhub.'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: ${{ matrix.name }}-${{ matrix.version }} (${{ matrix.arch }}) ${{ matrix.refs }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJson(inputs.build_matrix) }}
|
||||
if: inputs.enabled
|
||||
steps:
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Setup repository
|
||||
# ------------------------------------------------------------
|
||||
- name: "[SETUP] Checkout repository (current)"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
if: inputs.has_refs == 0
|
||||
|
||||
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ matrix.refs }}
|
||||
if: inputs.has_refs != 0
|
||||
|
||||
- name: "[SETUP] Setup QEMU environment"
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
image: tonistiigi/binfmt:latest
|
||||
platforms: all
|
||||
|
||||
- name: "[SETUP] Determine Docker tag"
|
||||
id: tag
|
||||
uses: cytopia/docker-tag-action@v0.4.15
|
||||
|
||||
- name: "[SETUP] Set artifact names"
|
||||
id: set-artifact-name
|
||||
run: |
|
||||
PRE_HASH="$( git rev-parse HEAD | head -c 10 )"
|
||||
VERSION="${{ matrix.version }}"
|
||||
ARCH="$( echo "${{ matrix.arch }}" | sed 's|/|-|g' )"
|
||||
|
||||
NAME_BASE="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-base"
|
||||
NAME_MODS="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-mods"
|
||||
NAME_PROD="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-prod"
|
||||
NAME_WORK="${{ inputs.artifact_prefix }}-${PRE_HASH}-${VERSION}-${ARCH}-work"
|
||||
|
||||
echo "::set-output name=base::${NAME_BASE}"
|
||||
echo "::set-output name=mods::${NAME_MODS}"
|
||||
echo "::set-output name=prod::${NAME_PROD}"
|
||||
echo "::set-output name=work::${NAME_WORK}"
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Artifact Import
|
||||
# ------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Download and import base
|
||||
###
|
||||
- name: "[Artifact Load] Download base"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.base }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
|
||||
- name: "[Artifact Load] Import base"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.base }}
|
||||
|
||||
###
|
||||
### Download and import mods
|
||||
###
|
||||
- name: "[Artifact Load] Download mods"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.mods }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
|
||||
- name: "[Artifact Load] Import mods"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.mods }}
|
||||
|
||||
###
|
||||
### Download and import prod
|
||||
###
|
||||
- name: "[Artifact Load] Download prod"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.prod }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
|
||||
- name: "[Artifact Load] Import prod"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.prod }}
|
||||
|
||||
###
|
||||
### Download and import prod
|
||||
###
|
||||
- name: "[Artifact Load] Download work"
|
||||
uses: Wandalen/wretry.action@v1.0.11
|
||||
with:
|
||||
action: actions/download-artifact@v3
|
||||
with: |
|
||||
name: ${{ steps.set-artifact-name.outputs.work }}
|
||||
attempt_limit: 20
|
||||
attempt_delay: 10000
|
||||
|
||||
- name: "[Artifact Load] Import work"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make load INFILE=${{ steps.set-artifact-name.outputs.work }}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Re-tag images
|
||||
# ------------------------------------------------------------
|
||||
- name: "[Docker Tag] base"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make tag VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Docker Tag] mods"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make tag VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Docker Tag] prod"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make tag VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Docker Tag] work"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make tag VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Docker Tag] Show images"
|
||||
run: |
|
||||
docker images
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Login
|
||||
# ------------------------------------------------------------
|
||||
- name: "Login"
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
if: ${{ inputs.can_deploy }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Push images
|
||||
# ------------------------------------------------------------
|
||||
- name: "[Push Image] base"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make push VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
if: ${{ inputs.can_deploy }}
|
||||
|
||||
- name: "[Push Image] mods"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make push VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
if: ${{ inputs.can_deploy }}
|
||||
|
||||
- name: "[Push Image] prod"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make push VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
if: ${{ inputs.can_deploy }}
|
||||
|
||||
- name: "[Push Image] work"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make push VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
if: ${{ inputs.can_deploy }}
|
||||
162
.github/workflows/zzz-reuse-deploy-manifests.yml
vendored
Normal file
162
.github/workflows/zzz-reuse-deploy-manifests.yml
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
name: Deploy multi-arch image manifests
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
###
|
||||
### Variables
|
||||
###
|
||||
inputs:
|
||||
enabled:
|
||||
description: 'Determines wheather this workflow is enabled at all (will run or skip).'
|
||||
required: true
|
||||
type: boolean
|
||||
can_deploy:
|
||||
description: 'Determines wheather this workflow will also deploy (login and push).'
|
||||
required: true
|
||||
type: boolean
|
||||
deploy_matrix:
|
||||
description: 'The version deploy matrix as JSON string ( list of objects: [{NAME, VERSION[], ARCH[]}] ).'
|
||||
required: true
|
||||
type: string
|
||||
params_matrix:
|
||||
description: 'The build matrix set via params.yml.'
|
||||
required: true
|
||||
type: string
|
||||
artifact_prefix:
|
||||
description: 'Unique artifact name prefix (to avoid overriding existing artifcats during parallel runs).'
|
||||
required: true
|
||||
type: string
|
||||
has_refs:
|
||||
description: 'The ref build matrix as JSON string (list of git refs to build/deploy).'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
###
|
||||
### Secrets
|
||||
###
|
||||
secrets:
|
||||
dockerhub_username:
|
||||
description: 'The username for Dockerhub.'
|
||||
required: false
|
||||
dockerhub_password:
|
||||
description: 'The password for Dockerhub.'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# JOB (3/3): DEPLOY
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
deploy:
|
||||
name: ${{ matrix.name }}-${{ matrix.version }} (${{ matrix.flavour }}) ${{ matrix.refs }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJson(inputs.deploy_matrix) }}
|
||||
if: inputs.enabled && inputs.can_deploy
|
||||
steps:
|
||||
# ------------------------------------------------------------
|
||||
# Setup repository
|
||||
# ------------------------------------------------------------
|
||||
- name: "[SETUP] Checkout repository (current)"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
if: ${{ inputs.has_refs == 0 }}
|
||||
|
||||
- name: "[SETUP] Checkout repository (ref: ${{ matrix.refs }})"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ matrix.refs }}
|
||||
if: ${{ inputs.has_refs != 0 }}
|
||||
|
||||
- name: "[SETUP] Setup QEMU environment"
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
image: tonistiigi/binfmt:latest
|
||||
platforms: all
|
||||
|
||||
- name: "[SETUP] Determine Docker tag"
|
||||
id: tag
|
||||
uses: cytopia/docker-tag-action@v0.4.15
|
||||
|
||||
- name: "[SETUP] Determine manifest arches"
|
||||
id: manifest
|
||||
run: |
|
||||
ARCHES="$( echo '${{ inputs.params_matrix }}' \
|
||||
| jq 'group_by(.NAME, .VERSION, .ARCH)' \
|
||||
| jq 'map({NAME: .[].NAME, VERSION: .[].VERSION[], FLAVOUR: .[].FLAVOUR[], ARCHES: .[].ARCH|join(",")})' \
|
||||
| jq '.[] | select(.NAME=="${{ matrix.name }}" and .VERSION=="${{ matrix.version }}" and .FLAVOUR=="${{ matrix.flavour }}") | .ARCHES' \
|
||||
| jq -c -M \
|
||||
)"
|
||||
echo "::set-output name=arches::${ARCHES}"
|
||||
echo "ARCHES: ${ARCHES}"
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Login
|
||||
# ------------------------------------------------------------
|
||||
- name: "Login"
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Create Manifest
|
||||
# ------------------------------------------------------------
|
||||
|
||||
- name: "[Create Manifest] base (${{ steps.manifest.outputs.arches }})"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=base ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Create Manifest] mods (${{ steps.manifest.outputs.arches }})"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=mods ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Create Manifest] prod (${{ steps.manifest.outputs.arches }})"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=prod ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Create Manifest] work (${{ steps.manifest.outputs.arches }})"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-create VERSION=${{ matrix.version }} FLAVOUR=work ARCHES=${{ steps.manifest.outputs.arches }} TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Deploy Manifest
|
||||
# ------------------------------------------------------------
|
||||
|
||||
- name: "[Push Manifest] base: ${{ steps.tag.outputs.docker-tag }}"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=base TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Push Manifest] mods: ${{ steps.tag.outputs.docker-tag }}"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=mods TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Push Manifest] prod: ${{ steps.tag.outputs.docker-tag }}"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=prod TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
|
||||
- name: "[Push Manifest] work: ${{ steps.tag.outputs.docker-tag }}"
|
||||
uses: cytopia/shell-command-retry-action@v0.1.2
|
||||
with:
|
||||
command: |
|
||||
make manifest-push VERSION=${{ matrix.version }} FLAVOUR=work TAG=${{ steps.tag.outputs.docker-tag }}
|
||||
75
.gitignore
vendored
75
.gitignore
vendored
@@ -1,74 +1,3 @@
|
||||
######################################
|
||||
# CUSTOM
|
||||
######################################
|
||||
|
||||
build/ansible/*.retry
|
||||
|
||||
|
||||
|
||||
######################################
|
||||
# GENERIC
|
||||
######################################
|
||||
|
||||
###### std ######
|
||||
.lock
|
||||
*.log
|
||||
|
||||
###### patches/diffs ######
|
||||
*.patch
|
||||
*.diff
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
|
||||
######################################
|
||||
# Operating Systems
|
||||
######################################
|
||||
|
||||
###### OSX ######
|
||||
._*
|
||||
.DS*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
###### Windows ######
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
$RECYCLE.BIN/
|
||||
*.lnk
|
||||
|
||||
|
||||
######################################
|
||||
# Editors
|
||||
######################################
|
||||
|
||||
###### Sublime ######
|
||||
*.sublime-workspace
|
||||
*.sublime-project
|
||||
|
||||
###### Eclipse ######
|
||||
.classpath
|
||||
.buildpath
|
||||
.project
|
||||
.settings/
|
||||
|
||||
###### Netbeans ######
|
||||
nbproject/private/
|
||||
|
||||
###### Intellij IDE ######
|
||||
.idea/
|
||||
.idea_modules/
|
||||
|
||||
###### vim ######
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
###### TextMate ######
|
||||
.tm_properties
|
||||
*.tmproj
|
||||
|
||||
###### BBEdit ######
|
||||
*.bbprojectd
|
||||
*.bbproject
|
||||
Makefile.docker
|
||||
Makefile.lint
|
||||
|
||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -4,6 +4,22 @@
|
||||
## Unreleased
|
||||
|
||||
|
||||
## Release 0.137
|
||||
|
||||
#### Fixed
|
||||
- Fixed imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
|
||||
#### Changed
|
||||
- Ensured CI tests are platform agnostic (amd64 vs arm64)
|
||||
- Ensured CI pipeline will work for long-running jobs
|
||||
|
||||
#### Removed
|
||||
- Removed homebrew due to arm64 issues
|
||||
- Removed postgres cmd client and apt repositories due to arm64 issues
|
||||
- Removed mongodb cmd client and apt repositories due to arm64 issues
|
||||
- Removed Ansible due to arm64 issues
|
||||
|
||||
|
||||
## Release 0.136
|
||||
|
||||
#### Fixed
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -44,8 +44,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.2-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
libbz2-dev \
|
||||
@@ -64,7 +63,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -597,8 +597,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
libaspell15 \
|
||||
libc-client2007e \
|
||||
libenchant1c2a \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.3-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -70,7 +69,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -706,8 +706,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
libc-client2007e \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.4-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -70,7 +69,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -717,8 +717,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
libc-client2007e \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.5-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -72,7 +71,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -755,8 +755,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ghostscript \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:5.6-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -74,7 +73,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -774,8 +774,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ghostscript \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:7.0-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
fftw-dev \
|
||||
firebird-dev \
|
||||
@@ -91,7 +90,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -882,8 +882,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
fftw2 \
|
||||
ghostscript \
|
||||
gir1.2-poppler-0.18 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:7.1-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
fftw-dev \
|
||||
firebird-dev \
|
||||
@@ -92,7 +91,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -891,8 +891,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
fftw2 \
|
||||
ghostscript \
|
||||
gir1.2-poppler-0.18 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:7.2-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
fftw-dev \
|
||||
firebird-dev \
|
||||
@@ -92,7 +91,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -894,8 +894,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
fftw2 \
|
||||
ghostscript \
|
||||
gir1.2-poppler-0.18 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:7.3-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
fftw-dev \
|
||||
firebird-dev \
|
||||
@@ -91,7 +90,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -884,8 +884,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
fftw2 \
|
||||
ghostscript \
|
||||
gir1.2-poppler-0.18 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:7.4-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
fftw-dev \
|
||||
firebird-dev \
|
||||
@@ -91,7 +90,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -874,8 +874,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
fftw2 \
|
||||
ghostscript \
|
||||
gir1.2-poppler-0.18 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:8.0-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -75,7 +74,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -800,8 +800,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ghostscript \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:8.1-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -74,7 +73,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -775,8 +775,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ghostscript \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
|
||||
@@ -6,9 +6,8 @@ FROM devilbox/php-fpm:8.2-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
alien \
|
||||
firebird-dev \
|
||||
freetds-dev \
|
||||
@@ -74,7 +73,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -764,8 +764,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ghostscript \
|
||||
libaio1 \
|
||||
libaspell15 \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.2-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.5-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.6-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.0-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.1-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.2-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.3-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 8.2-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -113,7 +108,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -135,7 +130,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -146,15 +140,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -206,27 +200,17 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -264,15 +248,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- cleanup --------------------
|
||||
@@ -416,9 +404,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -486,12 +471,11 @@ RUN set -eux \
|
||||
&& mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \
|
||||
&& phpcs --version | grep -E 'version [0-9][.0-9]+' \
|
||||
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -113,7 +108,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -135,7 +130,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -146,15 +140,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -228,27 +222,17 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -314,15 +298,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -473,9 +461,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -549,13 +534,12 @@ RUN set -eux \
|
||||
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -113,7 +108,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -135,7 +130,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -146,15 +140,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -246,18 +240,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -275,9 +257,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -348,15 +332,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -511,9 +499,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -591,14 +576,13 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb https://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -113,7 +108,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -135,7 +130,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -146,15 +140,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -251,18 +245,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -280,9 +262,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -354,15 +338,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -525,9 +513,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -606,7 +591,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -615,7 +600,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -137,7 +132,6 @@ RUN set -eux \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
zsh-common \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -148,15 +142,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -267,18 +261,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -296,9 +278,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -370,15 +354,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -538,9 +526,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -620,7 +605,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -629,7 +614,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -137,7 +132,6 @@ RUN set -eux \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
zsh-common \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -148,15 +142,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -248,18 +242,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -277,9 +259,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -351,15 +335,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -519,9 +507,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -599,7 +584,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -608,7 +593,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -247,18 +241,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -276,9 +258,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -350,15 +334,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -518,9 +506,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -598,7 +583,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -607,7 +592,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -266,18 +260,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -295,9 +277,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -370,15 +354,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -538,9 +526,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -620,7 +605,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -629,7 +614,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -267,18 +261,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -296,9 +278,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -371,15 +355,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -539,9 +527,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -621,7 +606,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -630,7 +615,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -267,18 +261,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -296,9 +278,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -371,15 +355,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -539,9 +527,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -621,7 +606,7 @@ RUN set -eux \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
@@ -630,7 +615,6 @@ RUN set -eux \
|
||||
&& lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' \
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -220,18 +214,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -249,9 +231,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -305,15 +289,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -458,9 +446,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -534,13 +519,12 @@ RUN set -eux \
|
||||
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -220,18 +214,6 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- laravel --------------------
|
||||
&& git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
|
||||
&& cd /usr/local/src/laravel-installer \
|
||||
@@ -249,9 +231,11 @@ RUN set -eux \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -305,15 +289,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -458,9 +446,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -534,13 +519,12 @@ RUN set -eux \
|
||||
&& php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -61,15 +60,11 @@ RUN set -eux \
|
||||
&& echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \
|
||||
&& echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \
|
||||
&& APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
|
||||
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \
|
||||
&& curl -sS -k -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" > /etc/apt/sources.list.d/pgsql.list \
|
||||
&& curl -sS -k -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg | 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 -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -114,7 +109,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -136,7 +131,6 @@ RUN set -eux \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -147,15 +141,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
@@ -220,27 +214,17 @@ RUN set -eux \
|
||||
&& cd / && rm -rf /tmp/gitflow \
|
||||
\
|
||||
\
|
||||
# -------------------- homebrew --------------------
|
||||
&& git clone https://github.com/Homebrew/brew.git /usr/local/src/brew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/brew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/brew/bin:/usr/local/src/brew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/brew/manpages:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/brew/manpages:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/brew/bin/brew config' \
|
||||
\
|
||||
\
|
||||
# -------------------- linkcheck --------------------
|
||||
&& curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
\
|
||||
\
|
||||
# -------------------- mhsendmail --------------------
|
||||
&& curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- mysqldumpsecure --------------------
|
||||
@@ -289,15 +273,19 @@ RUN set -eux \
|
||||
\
|
||||
# -------------------- wkhtmltopdf --------------------
|
||||
&& VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
\
|
||||
\
|
||||
# -------------------- wpcli --------------------
|
||||
@@ -442,9 +430,6 @@ RUN set -eux \
|
||||
### Install pip (Python) packages
|
||||
###
|
||||
RUN set -eux \
|
||||
# -------------------- ansible --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall ansible==3.4.0 || true \
|
||||
\
|
||||
# -------------------- yamllint --------------------
|
||||
&& pip install --no-cache-dir --force-reinstall yamllint || true \
|
||||
\
|
||||
@@ -516,13 +501,12 @@ RUN set -eux \
|
||||
&& phpcbf --version | grep -E 'version [0-9][.0-9]+' \
|
||||
&& phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \
|
||||
&& symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \
|
||||
&& wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \
|
||||
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi \
|
||||
&& wp --allow-root --version | grep -E '[0-9][.0-9]+' \
|
||||
\
|
||||
# -------------------- Composer --------------------
|
||||
\
|
||||
# -------------------- PIP --------------------
|
||||
&& ansible --version | grep -E '^ansible [0-9][.0-9]+$' \
|
||||
&& yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \
|
||||
&& yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \
|
||||
\
|
||||
|
||||
655
Makefile
655
Makefile
@@ -2,109 +2,86 @@ ifneq (,)
|
||||
.error This Makefile requires GNU Make.
|
||||
endif
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Docker configuration
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
DIR = Dockerfiles
|
||||
IMAGE = devilbox/php-fpm
|
||||
ARCH = linux/amd64
|
||||
|
||||
NO_CACHE =
|
||||
PHP_EXT_DIR =
|
||||
|
||||
# Run checks after each module has been installed (slow, but yields errors faster)
|
||||
FAIL_FAST = False
|
||||
|
||||
# File lint
|
||||
FL_VERSION = 0.3
|
||||
FL_IGNORES = .git/,.github/
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# DEFAULT TARGET
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo " _ _ _ _ __ _ ___ "
|
||||
@echo " _| |___ _ _<_| | |_ _____ / ___| |_ ___ ___| | ___._ _ _ "
|
||||
@echo " / . / ._| | | | | . / . \ \// | . | . | . |___| || . | ' ' |"
|
||||
@echo " \___\___|__/|_|_|___\___/\_/_/| _|_|_| _/ |_|| _|_|_|_|"
|
||||
@echo " |_| |_| |_| "
|
||||
@echo
|
||||
@echo
|
||||
@echo "Targets"
|
||||
@echo "--------------------------------------------------------------------------------"
|
||||
@echo
|
||||
@echo "lint Lint project files and repository"
|
||||
@echo
|
||||
@echo "gen-readme [VERSION=] Update README with PHP modules from built images."
|
||||
@echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates."
|
||||
@echo
|
||||
@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', '8.1', '8.2'."
|
||||
@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."
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Lint Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
lint: lint-files
|
||||
lint: lint-yaml
|
||||
lint: lint-changelog
|
||||
lint: lint-workflow
|
||||
|
||||
lint-workflow:
|
||||
@echo "################################################################################"
|
||||
@echo "# Lint Workflow"
|
||||
@echo "################################################################################"
|
||||
@\
|
||||
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
|
||||
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
|
||||
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
|
||||
if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \
|
||||
| grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \
|
||||
echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
|
||||
# Ensure additional Makefiles are present
|
||||
MAKEFILES = Makefile.docker Makefile.lint
|
||||
$(MAKEFILES): URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@)
|
||||
$(MAKEFILES):
|
||||
@if ! (curl --fail -sS -o $(@) $(URL) || wget -O $(@) $(URL)); then \
|
||||
echo "Error, curl or wget required."; \
|
||||
echo "Exiting."; \
|
||||
false; \
|
||||
fi
|
||||
include $(MAKEFILES)
|
||||
|
||||
# Set default Target
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Default configuration
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Own vars
|
||||
TAG = latest
|
||||
|
||||
# Makefile.docker overwrites
|
||||
NAME = PHP
|
||||
#VERSION = 5.5
|
||||
IMAGE = devilbox/php-fpm
|
||||
#FLAVOUR = base
|
||||
FILE = Dockerfile-$(VERSION)
|
||||
DIR = Dockerfiles/$(FLAVOUR)
|
||||
|
||||
ifeq ($(strip $(TAG)),latest)
|
||||
DOCKER_TAG = $(VERSION)-$(FLAVOUR)
|
||||
BASE_TAG = $(VERSION)-base
|
||||
MODS_TAG = $(VERSION)-mods
|
||||
PROD_TAG = $(VERSION)-prod
|
||||
WORK_TAG = $(VERSION)-work
|
||||
else
|
||||
DOCKER_TAG = $(VERSION)-$(FLAVOUR)-$(TAG)
|
||||
BASE_TAG = $(VERSION)-base-$(TAG)
|
||||
MODS_TAG = $(VERSION)-mods-$(TAG)
|
||||
PROD_TAG = $(VERSION)-prod-$(TAG)
|
||||
WORK_TAG = $(VERSION)-work-$(TAG)
|
||||
endif
|
||||
ARCH = linux/amd64
|
||||
|
||||
|
||||
# Makefile.lint overwrites
|
||||
FL_IGNORES = .git/,.github/,tests/
|
||||
SC_IGNORES = .git/,.github/,tests/
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Default Target
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "lint Lint project files and repository"
|
||||
@echo
|
||||
@echo "build [ARCH=...] [TAG=...] Build Docker image"
|
||||
@echo "rebuild [ARCH=...] [TAG=...] Build Docker image without cache"
|
||||
@echo "push [ARCH=...] [TAG=...] Push Docker image to Docker hub"
|
||||
@echo
|
||||
@echo "manifest-create [ARCHES=...] [TAG=...] Create multi-arch manifest"
|
||||
@echo "manifest-push [TAG=...] Push multi-arch manifest"
|
||||
@echo
|
||||
@echo "test [ARCH=...] Test built Docker image"
|
||||
@echo
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Overwrite Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
# Append additional target to lint
|
||||
lint: lint-changelog
|
||||
lint: lint-ansible
|
||||
|
||||
###
|
||||
### Ensures CHANGELOG has an entry
|
||||
###
|
||||
.PHONY: lint-changelog
|
||||
lint-changelog:
|
||||
@echo "################################################################################"
|
||||
@echo "# Lint Changelog"
|
||||
@@ -121,46 +98,116 @@ lint-changelog:
|
||||
fi
|
||||
@echo
|
||||
|
||||
lint-files:
|
||||
@echo "################################################################################"
|
||||
@echo "# Lint Files"
|
||||
@echo "################################################################################"
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-cr --text --ignore '$(FL_IGNORES)' --path .
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-crlf --text --ignore '$(FL_IGNORES)' --path .
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-single-newline --text --ignore '$(FL_IGNORES)' --path .
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-space --text --ignore '$(FL_IGNORES)' --path .
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8 --text --ignore '$(FL_IGNORES)' --path .
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8-bom --text --ignore '$(FL_IGNORES)' --path .
|
||||
@echo
|
||||
|
||||
lint-yaml:
|
||||
@# Lint all files
|
||||
@echo "################################################################################"
|
||||
@echo "# Lint Yaml"
|
||||
@echo "################################################################################"
|
||||
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/yamllint .
|
||||
@echo
|
||||
###
|
||||
### Ensures Ansible Dockerfile generation is current
|
||||
###
|
||||
.PHONY: lint-ansible
|
||||
lint-ansible: gen-dockerfiles
|
||||
@git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# GENERATE TARGETS
|
||||
# Docker Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
gen-readme:
|
||||
ifeq ($(strip $(VERSION)),)
|
||||
@echo "Generate README.md for all PHP versions"
|
||||
cd build; ./gen-readme.sh $(ARCH)
|
||||
else
|
||||
@echo "Generate README.md for PHP $(VERSION)"
|
||||
@$(MAKE) --no-print-directory _check-version
|
||||
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=base
|
||||
@$(MAKE) --no-print-directory _check-image-exists _EXIST_IMAGE=mods
|
||||
cd build; ./gen-readme.sh $(ARCH) $(VERSION)
|
||||
# ---- ONLY FOR "mods" images ----
|
||||
# When builds mods, we have a builder image and then copy everything to the final
|
||||
# target image. In order to do so, we pass a build-arg EXT_DIR, which contains
|
||||
# the variable directory of extensions to copy.
|
||||
# The only way to "LAZY" fetch it, is by doing a call to the base image and populate
|
||||
# a Makefile variable with its value upon call.
|
||||
ifeq ($(strip $(FLAVOUR)),mods)
|
||||
EXT_DIR=$$( docker run --rm --platform $(ARCH) --entrypoint=php $(IMAGE):$(BASE_TAG) -r \
|
||||
'echo ini_get("extension_dir");'\
|
||||
)
|
||||
endif
|
||||
|
||||
.PHONY: build
|
||||
build: check-flavour-is-set
|
||||
build: check-parent-image-exists
|
||||
build: ARGS+=--build-arg EXT_DIR=$(EXT_DIR)
|
||||
build: docker-arch-build
|
||||
|
||||
.PHONY: rebuild
|
||||
rebuild: check-flavour-is-set
|
||||
rebuild: check-parent-image-exists
|
||||
rebuild: ARGS+=--build-arg EXT_DIR=$(EXT_DIR)
|
||||
rebuild: docker-arch-rebuild
|
||||
|
||||
.PHONY: push
|
||||
push: check-flavour-is-set
|
||||
push: check-version-is-set
|
||||
push: docker-arch-push
|
||||
|
||||
.PHONY: tag
|
||||
tag: check-flavour-is-set
|
||||
tag: check-version-is-set
|
||||
tag:
|
||||
docker tag $(IMAGE):$(VERSION)-$(FLAVOUR) $(IMAGE):$(DOCKER_TAG)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Save / Load Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
.PHONY: save
|
||||
save: check-flavour-is-set
|
||||
save: check-version-is-set
|
||||
save: check-current-image-exists
|
||||
save: docker-save
|
||||
|
||||
.PHONY: load
|
||||
load: docker-load
|
||||
|
||||
.PHONY: save-verify
|
||||
save-verify: save
|
||||
save-verify: load
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Manifest Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
.PHONY: manifest-create
|
||||
manifest-create: docker-manifest-create
|
||||
|
||||
.PHONY: manifest-push
|
||||
manifest-push: docker-manifest-push
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Test Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
.PHONY: test
|
||||
test: check-flavour-is-set
|
||||
test: check-current-image-exists
|
||||
test: test-integration
|
||||
|
||||
.PHONY: test-integration
|
||||
test-integration:
|
||||
./tests/test.sh $(IMAGE) $(ARCH) $(VERSION) $(FLAVOUR) $(DOCKER_TAG)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Generate Targets
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
###
|
||||
### Generate README (requires images to be built)
|
||||
###
|
||||
.PHONY: gen-readme
|
||||
gen-readme: check-version-is-set
|
||||
gen-readme:
|
||||
@echo "################################################################################"
|
||||
@echo "# Generate README.md for PHP $(VERSION) ($(IMAGE):$(DOCKER_TAG)) on $(ARCH)"
|
||||
@echo "################################################################################"
|
||||
./build/gen-readme.sh $(IMAGE) $(ARCH) $(BASE_TAG) $(MODS_TAG) $(VERSION)
|
||||
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
|
||||
|
||||
###
|
||||
### Generate Dockerfiles
|
||||
###
|
||||
.PHONY: gen-dockerfiles
|
||||
gen-dockerfiles:
|
||||
docker run --rm \
|
||||
--platform $(ARCH) \
|
||||
$$(tty -s && echo "-it" || echo) \
|
||||
-e USER=ansible \
|
||||
-e MY_UID=$$(id -u) \
|
||||
@@ -175,254 +222,118 @@ gen-dockerfiles:
|
||||
--diff $(ARGS)
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# BUILD TARGETS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
build-base: _check-version
|
||||
build-base:
|
||||
docker build $(NO_CACHE) \
|
||||
--platform $(ARCH) \
|
||||
--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:
|
||||
ifeq ($(strip $(TARGET)),)
|
||||
docker build $(NO_CACHE) \
|
||||
--platform $(ARCH) \
|
||||
--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 \
|
||||
--platform $(ARCH) \
|
||||
--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 --platform $(ARCH) --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) \
|
||||
--platform $(ARCH) \
|
||||
--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) \
|
||||
--platform $(ARCH) \
|
||||
--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) \
|
||||
--platform $(ARCH) \
|
||||
--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 ARCH=$(ARCH) \
|
||||
$(ARGS) \
|
||||
-t $(IMAGE):${VERSION}-work \
|
||||
-f $(DIR)/work/Dockerfile-${VERSION} $(DIR)/work
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# REBUILD TARGETS
|
||||
# HELPER TARGETS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
rebuild-base: _pull-base-image
|
||||
rebuild-base: NO_CACHE=--no-cache
|
||||
rebuild-base: build-base
|
||||
###
|
||||
### Ensures the VERSION variable is set
|
||||
###
|
||||
.PHONY: check-version-is-set
|
||||
check-version-is-set:
|
||||
@if [ "$(VERSION)" = "" ]; then \
|
||||
echo "This make target requires the VERSION variable to be set."; \
|
||||
echo "make <target> VERSION="; \
|
||||
echo "Exiting."; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
###
|
||||
### Ensures the FLAVOUR variable is set
|
||||
###
|
||||
.PHONY: check-flavour-is-set
|
||||
check-flavour-is-set:
|
||||
@if [ "$(FLAVOUR)" = "" ]; then \
|
||||
echo "This make target requires the FLAVOUR variable to be set."; \
|
||||
echo "make <target> FLAVOUR="; \
|
||||
echo "Exiting."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if [ "$(FLAVOUR)" != "base" ] && [ "$(FLAVOUR)" != "mods" ] && [ "$(FLAVOUR)" != "prod" ] && [ "$(FLAVOUR)" != "work" ]; then \
|
||||
echo "Error, Flavour can only be one of 'base', 'mods', 'prod', or 'work'."; \
|
||||
echo "Exiting."; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
rebuild-mods: NO_CACHE=--no-cache
|
||||
rebuild-mods: build-mods
|
||||
|
||||
|
||||
rebuild-prod: NO_CACHE=--no-cache
|
||||
rebuild-prod: build-prod
|
||||
|
||||
|
||||
rebuild-work: NO_CACHE=--no-cache
|
||||
rebuild-work: build-work
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# TEST TARGETS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
test-base: _check-version
|
||||
test-base: _EXIST_IMAGE=base
|
||||
test-base: _check-image-exists
|
||||
test-base:
|
||||
./tests/test.sh $(IMAGE) $(ARCH) $(VERSION) base
|
||||
|
||||
|
||||
test-mods: _check-version
|
||||
test-mods: _EXIST_IMAGE=mods
|
||||
test-mods: _check-image-exists
|
||||
test-mods: _check-version
|
||||
./tests/test.sh $(IMAGE) $(ARCH) $(VERSION) mods
|
||||
|
||||
|
||||
test-prod: _check-version
|
||||
test-prod: _EXIST_IMAGE=prod
|
||||
test-prod: _check-image-exists
|
||||
test-prod: _check-version
|
||||
./tests/test.sh $(IMAGE) $(ARCH) $(VERSION) prod
|
||||
|
||||
|
||||
test-work: _check-version
|
||||
test-work: _EXIST_IMAGE=work
|
||||
test-work: _check-image-exists
|
||||
test-work: _check-version
|
||||
./tests/test.sh $(IMAGE) $(ARCH) $(VERSION) work
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# DOCKERHUB TARGETS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
login:
|
||||
ifeq ($(strip $(USERNAME)),)
|
||||
@$(info This make target requires the USERNAME variable to be set.)
|
||||
@$(info make login USERNAME= PASSWORD=)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
ifeq ($(strip $(PASSWORD)),)
|
||||
@$(info This make target requires the PASSWORD variable to be set.)
|
||||
@$(info make login USERNAME= PASSWORD=)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
@yes | docker login --username $(USERNAME) --password $(PASSWORD)
|
||||
|
||||
|
||||
push:
|
||||
ifeq ($(strip $(TAG)),)
|
||||
@$(info This make target requires the TAG variable to be set.)
|
||||
@$(info make push TAG=)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
docker push $(IMAGE):$(TAG)
|
||||
|
||||
|
||||
tag:
|
||||
ifeq ($(strip $(OLD_TAG)),)
|
||||
@$(info This make target requires the OLD_TAG variable to be set.)
|
||||
@$(info make tag OLD_TAG= NEW_TAG=)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
ifeq ($(strip $(NEW_TAG)),)
|
||||
@$(info This make target requires the NEW_TAG variable to be set.)
|
||||
@$(info make tag OLD_TAG= NEW_TAG=)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
docker tag $(IMAGE):$(OLD_TAG) $(IMAGE):$(NEW_TAG)
|
||||
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# HELPER TARGETS
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
|
||||
_check-version:
|
||||
ifeq ($(strip $(VERSION)),)
|
||||
@$(info This make target requires the VERSION variable to be set.)
|
||||
@$(info make build-<flavour> VERSION=7.3)
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
ifeq ($(VERSION),5.2)
|
||||
else
|
||||
ifeq ($(VERSION),5.3)
|
||||
else
|
||||
ifeq ($(VERSION),5.4)
|
||||
else
|
||||
ifeq ($(VERSION),5.5)
|
||||
else
|
||||
ifeq ($(VERSION),5.6)
|
||||
else
|
||||
ifeq ($(VERSION),7.0)
|
||||
else
|
||||
ifeq ($(VERSION),7.1)
|
||||
else
|
||||
ifeq ($(VERSION),7.2)
|
||||
else
|
||||
ifeq ($(VERSION),7.3)
|
||||
else
|
||||
ifeq ($(VERSION),7.4)
|
||||
else
|
||||
ifeq ($(VERSION),8.0)
|
||||
else
|
||||
ifeq ($(VERSION),8.1)
|
||||
else
|
||||
ifeq ($(VERSION),8.2)
|
||||
else
|
||||
@$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' or '8.2')
|
||||
@$(info )
|
||||
@$(error Exiting)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@echo "Version $(VERSION) is valid"
|
||||
|
||||
|
||||
_check-image-exists:
|
||||
@if [ "$$(docker images -q $(IMAGE):$(VERSION)-$(_EXIST_IMAGE))" = "" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(VERSION)-$(_EXIST_IMAGE)' was not found locally."; \
|
||||
###
|
||||
### Checks if current image exists and is of correct architecture
|
||||
###
|
||||
.PHONY: check-current-image-exists
|
||||
check-current-image-exists: check-flavour-is-set
|
||||
check-current-image-exists:
|
||||
@if [ "$$( docker images -q $(IMAGE):$(DOCKER_TAG) )" = "" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(DOCKER_TAG)' 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; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo "OK: Image $(IMAGE):$(DOCKER_TAG) exists"; \
|
||||
fi; \
|
||||
OS="$$( docker image inspect $(IMAGE):$(DOCKER_TAG) --format '{{.Os}}' )"; \
|
||||
ARCH="$$( docker image inspect $(IMAGE):$(DOCKER_TAG) --format '{{.Architecture}}' )"; \
|
||||
if [ "$${OS}/$${ARCH}" != "$(ARCH)" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(DOCKER_TAG)' has invalid architecture: $${OS}/$${ARCH}"; \
|
||||
>&2 echo "Expected: $(ARCH)"; \
|
||||
>&2 echo; \
|
||||
exit 1; \
|
||||
else \
|
||||
echo "OK: Image $(IMAGE):$(DOCKER_TAG) is of arch $${OS}/$${ARCH}"; \
|
||||
fi
|
||||
|
||||
###
|
||||
### Checks if parent image exists and is of correct architecture
|
||||
###
|
||||
.PHONY: check-parent-image-exists
|
||||
check-parent-image-exists: check-flavour-is-set
|
||||
check-parent-image-exists:
|
||||
@if [ "$(FLAVOUR)" = "work" ]; then \
|
||||
if [ "$$( docker images -q $(IMAGE):$(PROD_TAG) )" = "" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(PROD_TAG)' 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; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
OS="$$( docker image inspect $(IMAGE):$(PROD_TAG) --format '{{.Os}}' )"; \
|
||||
ARCH="$$( docker image inspect $(IMAGE):$(PROD_TAG) --format '{{.Architecture}}' )"; \
|
||||
if [ "$${OS}/$${ARCH}" != "$(ARCH)" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(PROD_TAG)' has invalid architecture: $${OS}/$${ARCH}"; \
|
||||
>&2 echo "Expected: $(ARCH)"; \
|
||||
>&2 echo; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
elif [ "$(FLAVOUR)" = "prod" ]; then \
|
||||
if [ "$$( docker images -q $(IMAGE):$(MODS_TAG) )" = "" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(MODS_TAG)' 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; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
OS="$$( docker image inspect $(IMAGE):$(MODS_TAG) --format '{{.Os}}' )"; \
|
||||
ARCH="$$( docker image inspect $(IMAGE):$(MODS_TAG) --format '{{.Architecture}}' )"; \
|
||||
if [ "$${OS}/$${ARCH}" != "$(ARCH)" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(MODS_TAG)' has invalid architecture: $${OS}/$${ARCH}"; \
|
||||
>&2 echo "Expected: $(ARCH)"; \
|
||||
>&2 echo; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
elif [ "$(FLAVOUR)" = "mods" ]; then \
|
||||
if [ "$$( docker images -q $(IMAGE):$(BASE_TAG) )" = "" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(BASE_TAG)' 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; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
OS="$$( docker image inspect $(IMAGE):$(BASE_TAG) --format '{{.Os}}' )"; \
|
||||
ARCH="$$( docker image inspect $(IMAGE):$(BASE_TAG) --format '{{.Architecture}}' )"; \
|
||||
if [ "$${OS}/$${ARCH}" != "$(ARCH)" ]; then \
|
||||
>&2 echo "Docker image '$(IMAGE):$(BASE_TAG)' has invalid architecture: $${OS}/$${ARCH}"; \
|
||||
>&2 echo "Expected: $(ARCH)"; \
|
||||
>&2 echo; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi;
|
||||
|
||||
|
||||
_pull-base-image:
|
||||
@echo "Pulling root image for PHP ${VERSION}"
|
||||
docker pull --platform $(ARCH) $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';)
|
||||
|
||||
@@ -60,8 +60,8 @@ RUN set -eux \
|
||||
### Upgrade (install ps)
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
dpkg-dev \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -31,9 +31,8 @@ FROM devilbox/php-fpm:{{ php_version }}-base as builder
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
{% for build_dep in build_deps | unique | sort %}
|
||||
{{ build_dep }} \
|
||||
{% endfor %}
|
||||
@@ -58,7 +57,8 @@ RUN set -eux \
|
||||
patch \
|
||||
pkg-config \
|
||||
re2c \
|
||||
xz-utils
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr)
|
||||
@@ -356,8 +356,8 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
{# Loop over enabled run-time dependencies -#}
|
||||
{%- set run_deps = [] -%}
|
||||
{%- for ext in extensions_enabled -%}
|
||||
|
||||
@@ -26,9 +26,8 @@ LABEL "org.opencontainers.image.description"="PHP-FPM {{ php_version }}-prod"
|
||||
### Install
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
locales-all \
|
||||
postfix \
|
||||
postfix-pcre \
|
||||
@@ -36,9 +35,12 @@ RUN set -eux \
|
||||
rsyslog \
|
||||
socat \
|
||||
supervisor \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
# Fix: rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
|
||||
&& sed -i'' 's/.*imklog.*//g' /etc/rsyslog.conf \
|
||||
\
|
||||
# Setup Supervisor
|
||||
&& rm -rf /etc/supervisor* \
|
||||
&& mkdir -p /var/log/supervisor \
|
||||
&& mkdir -p /etc/supervisor/conf.d \
|
||||
|
||||
@@ -46,9 +46,8 @@ ENV BASH_PROFILE=".bashrc"
|
||||
### Install Tools
|
||||
###
|
||||
RUN set -eux \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests apt-utils \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
@@ -81,8 +80,8 @@ RUN set -eux \
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}{{ "\n\t" }}\
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
ack-grep \
|
||||
aspell \
|
||||
autoconf \
|
||||
@@ -133,7 +132,7 @@ RUN set -eux \
|
||||
openssh-client \
|
||||
patch \
|
||||
patchelf \
|
||||
postgresql-client \
|
||||
# postgresql-client \
|
||||
redis-tools \
|
||||
rsync \
|
||||
rubygems \
|
||||
@@ -158,7 +157,6 @@ RUN set -eux \
|
||||
{% if php_version in [5.6, 7.0] %}
|
||||
zsh-common \
|
||||
{% endif %}
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \
|
||||
@@ -169,15 +167,15 @@ RUN set -eux \
|
||||
###
|
||||
### Instal Architecture Dependent software
|
||||
###
|
||||
RUN set -eux \
|
||||
&& if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -q \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests \
|
||||
mongodb-org-shell \
|
||||
mongodb-org-tools; \
|
||||
fi \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get purge -q -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
#RUN set -eux \
|
||||
# && if [ "${ARCH}" = "linux/amd64" ]; then \
|
||||
# DEBIAN_FRONTEND=noninteractive apt-get update \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
# mongodb-org-shell \
|
||||
# mongodb-org-tools; \
|
||||
# fi \
|
||||
# && DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
###
|
||||
|
||||
@@ -22,8 +22,8 @@ apt_repositories_enabled:
|
||||
- backports
|
||||
- blackfire
|
||||
- git
|
||||
- mongo
|
||||
- pgsql
|
||||
#- mongo
|
||||
#- pgsql
|
||||
- yarn
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ npm_enabled:
|
||||
# Python pip packages to install
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
pip_enabled:
|
||||
- ansible
|
||||
#- ansible
|
||||
- yamllint
|
||||
- yq
|
||||
|
||||
@@ -94,10 +94,9 @@ software_enabled:
|
||||
- drush9
|
||||
- drupalconsole
|
||||
- gitflow
|
||||
- homebrew
|
||||
#- homebrew
|
||||
- laravel
|
||||
- linkcheck
|
||||
# - linuxbrew
|
||||
- mhsendmail
|
||||
- mysqldumpsecure
|
||||
- phalcon
|
||||
@@ -709,25 +708,14 @@ software_available:
|
||||
command: |
|
||||
curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \
|
||||
&& chmod +x /usr/local/bin/linkcheck \
|
||||
linuxbrew:
|
||||
check: su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+'
|
||||
all:
|
||||
command: |
|
||||
git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \
|
||||
&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \
|
||||
&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \
|
||||
'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \
|
||||
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
|
||||
mhsendmail:
|
||||
all:
|
||||
command: |
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \
|
||||
&& chmod +x mhsendmail_linux_amd64 \
|
||||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail; \
|
||||
fi \
|
||||
mysqldumpsecure:
|
||||
check: mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+'
|
||||
all:
|
||||
@@ -948,71 +936,87 @@ software_available:
|
||||
command: curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_$(dpkg-architecture --query DEB_HOST_ARCH)" > /usr/local/bin/symfony
|
||||
post: chmod +x /usr/local/bin/symfony
|
||||
wkhtmltopdf:
|
||||
check: wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"
|
||||
check: if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)"; fi
|
||||
5.2:
|
||||
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
5.3:
|
||||
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
5.4:
|
||||
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
5.5:
|
||||
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+jessie_amd64\.deb' | head -1 )"
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
5.6:
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
7.0:
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
all:
|
||||
pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )"
|
||||
command: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \
|
||||
libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \
|
||||
&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \
|
||||
&& dpkg -i /tmp/wkhtmltopdf.deb \
|
||||
&& rm -f /tmp/wkhtmltopdf.deb; \
|
||||
fi \
|
||||
post: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "amd64" ]; then \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*; \
|
||||
fi \
|
||||
wpcli:
|
||||
disabled: [5.2]
|
||||
check: wp --allow-root --version | grep -E '[0-9][.0-9]+'
|
||||
|
||||
@@ -8,27 +8,18 @@ set -o pipefail
|
||||
# Get absolute directory of this script
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
ARCH="${1:-linux/amd64}"
|
||||
IMAGE="${1}"
|
||||
ARCH="${2}"
|
||||
TAG_BASE="${3}"
|
||||
TAG_MODS="${4}"
|
||||
VERSION="${5:-}"
|
||||
|
||||
|
||||
###
|
||||
### Show Usage
|
||||
###
|
||||
print_usage() {
|
||||
echo "Usage: gen-readme.sh [<ARCH>]"
|
||||
echo " gen-readme.sh <ARCH> 5.2"
|
||||
echo " gen-readme.sh <ARCH> 5.3"
|
||||
echo " gen-readme.sh <ARCH> 5.4"
|
||||
echo " gen-readme.sh <ARCH> 5.5"
|
||||
echo " gen-readme.sh <ARCH> 5.6"
|
||||
echo " gen-readme.sh <ARCH> 7.0"
|
||||
echo " gen-readme.sh <ARCH> 7.1"
|
||||
echo " gen-readme.sh <ARCH> 7.2"
|
||||
echo " gen-readme.sh <ARCH> 7.3"
|
||||
echo " gen-readme.sh <ARCH> 7.4"
|
||||
echo " gen-readme.sh <ARCH> 8.0"
|
||||
echo " gen-readme.sh <ARCH> 8.1"
|
||||
echo " gen-readme.sh <ARCH> 8.2"
|
||||
echo "Usage: gen-readme.sh <IMAGE> <ARCH> <TAG_BASE> <TAG_MODS> [<VERSION>]"
|
||||
}
|
||||
|
||||
|
||||
@@ -36,25 +27,24 @@ print_usage() {
|
||||
### Extract PHP modules in alphabetical order and comma separated in one line
|
||||
###
|
||||
get_modules() {
|
||||
tag="${1}"
|
||||
|
||||
current_tag="${1}"
|
||||
# Retrieve all modules
|
||||
PHP_MODULES="$( docker run --rm --platform "${ARCH}" $(tty -s && echo '-it' || echo) --entrypoint=php devilbox/php-fpm:${tag} -m )"
|
||||
PHP_MODULES="$( docker run --rm --platform "${ARCH}" "$(tty -s && echo '-it' || echo)" --entrypoint=php "${IMAGE}:${current_tag}" -m )"
|
||||
ALL_MODULES=
|
||||
|
||||
if docker run --rm --platform "${ARCH}" $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then
|
||||
if docker run --rm --platform "${ARCH}" "$(tty -s && echo '-it' || echo)" --entrypoint=find "${IMAGE}:${current_tag}" /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then
|
||||
ALL_MODULES="${ALL_MODULES},ioncube";
|
||||
fi
|
||||
|
||||
if docker run --rm --platform "${ARCH}" $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then
|
||||
if docker run --rm --platform "${ARCH}" "$(tty -s && echo '-it' || echo)" --entrypoint=find "${IMAGE}:${current_tag}" /usr/local/lib/php/extensions -name 'blackfire.so' | grep -q blackfire.so; then
|
||||
ALL_MODULES="${ALL_MODULES},blackfire";
|
||||
fi
|
||||
|
||||
if docker run --rm --platform "${ARCH}" $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'psr.so' | grep -q psr.so; then
|
||||
if docker run --rm --platform "${ARCH}" "$(tty -s && echo '-it' || echo)" --entrypoint=find "${IMAGE}:${current_tag}" /usr/local/lib/php/extensions -name 'psr.so' | grep -q psr.so; then
|
||||
ALL_MODULES="${ALL_MODULES},psr";
|
||||
fi
|
||||
|
||||
if docker run --rm --platform "${ARCH}" $(tty -s && echo '-it' || echo) --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'phalcon.so' | grep -q phalcon.so; then
|
||||
if docker run --rm --platform "${ARCH}" "$(tty -s && echo '-it' || echo)" --entrypoint=find "${IMAGE}:${current_tag}" /usr/local/lib/php/extensions -name 'phalcon.so' | grep -q phalcon.so; then
|
||||
ALL_MODULES="${ALL_MODULES},phalcon";
|
||||
fi
|
||||
|
||||
@@ -85,15 +75,15 @@ get_modules() {
|
||||
update_readme() {
|
||||
v="${1}"
|
||||
# Those sections must exist in README.md, otherwise this script will exit with errors
|
||||
sed -i'' "s|<td id=\"${v//.}-base\">.*<\/td>|<td id=\"${v//.}-base\">$( get_modules "${v}-base" )<\/td>|g" "${CWD}/../README.md"
|
||||
sed -i'' "s|<td id=\"${v//.}-mods\">.*<\/td>|<td id=\"${v//.}-mods\">$( get_modules "${v}-mods" )<\/td>|g" "${CWD}/../README.md"
|
||||
sed -i'' "s|<td id=\"${v//.}-base\">.*<\/td>|<td id=\"${v//.}-base\">$( get_modules "${TAG_BASE}" )<\/td>|g" "${CWD}/../README.md"
|
||||
sed -i'' "s|<td id=\"${v//.}-mods\">.*<\/td>|<td id=\"${v//.}-mods\">$( get_modules "${TAG_MODS}" )<\/td>|g" "${CWD}/../README.md"
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Entrypoint
|
||||
###
|
||||
if [ "${#}" -eq "0" ] || [ "${#}" -eq "1" ]; then
|
||||
if [ "${VERSION}" = "" ]; then
|
||||
# Update PHP modules for all versions at once
|
||||
update_readme "5.2"
|
||||
update_readme "5.3"
|
||||
@@ -108,31 +98,26 @@ if [ "${#}" -eq "0" ] || [ "${#}" -eq "1" ]; then
|
||||
update_readme "8.0"
|
||||
update_readme "8.1"
|
||||
update_readme "8.2"
|
||||
elif [ "${#}" -gt "2" ]; then
|
||||
# Specifying more than 1 argument is wrong
|
||||
echo "Error, invalid number of arguments."
|
||||
print_usage
|
||||
exit 1
|
||||
else
|
||||
if [ "${2}" != "5.2" ] \
|
||||
&& [ "${2}" != "5.3" ] \
|
||||
&& [ "${2}" != "5.4" ] \
|
||||
&& [ "${2}" != "5.5" ] \
|
||||
&& [ "${2}" != "5.6" ] \
|
||||
&& [ "${2}" != "7.0" ] \
|
||||
&& [ "${2}" != "7.1" ] \
|
||||
&& [ "${2}" != "7.2" ] \
|
||||
&& [ "${2}" != "7.3" ] \
|
||||
&& [ "${2}" != "7.4" ] \
|
||||
&& [ "${2}" != "8.0" ] \
|
||||
&& [ "${2}" != "8.1" ] \
|
||||
&& [ "${2}" != "8.2" ]; then
|
||||
if [ "${VERSION}" != "5.2" ] \
|
||||
&& [ "${VERSION}" != "5.3" ] \
|
||||
&& [ "${VERSION}" != "5.4" ] \
|
||||
&& [ "${VERSION}" != "5.5" ] \
|
||||
&& [ "${VERSION}" != "5.6" ] \
|
||||
&& [ "${VERSION}" != "7.0" ] \
|
||||
&& [ "${VERSION}" != "7.1" ] \
|
||||
&& [ "${VERSION}" != "7.2" ] \
|
||||
&& [ "${VERSION}" != "7.3" ] \
|
||||
&& [ "${VERSION}" != "7.4" ] \
|
||||
&& [ "${VERSION}" != "8.0" ] \
|
||||
&& [ "${VERSION}" != "8.1" ] \
|
||||
&& [ "${VERSION}" != "8.2" ]; then
|
||||
# Argument does not match any of the PHP versions
|
||||
echo "Error, invalid argument."
|
||||
print_usage
|
||||
exit 1
|
||||
else
|
||||
# Update PHP modules for one specific PHP version
|
||||
update_readme "${2}"
|
||||
update_readme "${VERSION}"
|
||||
fi
|
||||
fi
|
||||
|
||||
191
tests/.lib.sh
191
tests/.lib.sh
@@ -10,11 +10,11 @@ set -o pipefail
|
||||
###
|
||||
function run() {
|
||||
local cmd="${1}"
|
||||
local to_stderr=0
|
||||
local to_stdout=0
|
||||
|
||||
# Output to stderr instead?
|
||||
# Output to stdout instead?
|
||||
if [ "${#}" -eq "2" ]; then
|
||||
to_stderr="${2}"
|
||||
to_stdout="${2}"
|
||||
fi
|
||||
|
||||
local red="\033[0;31m"
|
||||
@@ -22,24 +22,24 @@ function run() {
|
||||
local yellow="\033[0;33m"
|
||||
local reset="\033[0m"
|
||||
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2
|
||||
else
|
||||
printf "${yellow}[%s] ${red}%s \$ ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)"
|
||||
fi
|
||||
|
||||
if sh -c "${cmd}"; then
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${green}[%s]${reset}\n" "OK"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${green}[%s]${reset}\n" "OK" >&2
|
||||
else
|
||||
printf "${green}[%s]${reset}\n" "OK"
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${red}[%s]${reset}\n" "NO"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${red}[%s]${reset}\n" "NO" >&2
|
||||
else
|
||||
printf "${red}[%s]${reset}\n" "NO"
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
@@ -49,11 +49,11 @@ function run() {
|
||||
###
|
||||
function run_fail() {
|
||||
local cmd="${1}"
|
||||
local to_stderr=0
|
||||
local to_stdout=0
|
||||
|
||||
# Output to stderr instead?
|
||||
# Output to stdout instead?
|
||||
if [ "${#}" -eq "2" ]; then
|
||||
to_stderr="${2}"
|
||||
to_stdout="${2}"
|
||||
fi
|
||||
|
||||
local red="\033[0;31m"
|
||||
@@ -61,29 +61,51 @@ function run_fail() {
|
||||
local yellow="\033[0;33m"
|
||||
local reset="\033[0m"
|
||||
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)" >&2
|
||||
else
|
||||
printf "${yellow}[%s] ${red}%s \$ ${yellow}[NOT] ${green}${cmd}${reset}\n" "$(hostname)" "$(whoami)"
|
||||
fi
|
||||
|
||||
if ! sh -c "${cmd}"; then
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${green}[%s]${reset}\n" "OK"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${green}[%s]${reset}\n" "OK" >&2
|
||||
else
|
||||
printf "${green}[%s]${reset}\n" "OK"
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
if [ "${to_stderr}" -eq "0" ]; then
|
||||
printf "${red}[%s]${reset}\n" "NO"
|
||||
else
|
||||
if [ "${to_stdout}" -eq "0" ]; then
|
||||
printf "${red}[%s]${reset}\n" "NO" >&2
|
||||
else
|
||||
printf "${red}[%s]${reset}\n" "NO"
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Print H2
|
||||
###
|
||||
function print_h2() {
|
||||
local text="${1}"
|
||||
|
||||
local red="\033[0;31m"
|
||||
local green="\033[0;32m"
|
||||
local yellow="\033[0;33m"
|
||||
local purple="\033[0;35m"
|
||||
local reset="\033[0m"
|
||||
|
||||
echo
|
||||
echo
|
||||
printf "${purple}%s${reset}\n" "###"
|
||||
printf "${purple}%s${reset}\n" "### ${text}"
|
||||
printf "${purple}%s${reset}\n" "###"
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Get 15 character random word
|
||||
###
|
||||
@@ -93,8 +115,8 @@ function get_random_name() {
|
||||
local name=
|
||||
|
||||
for i in {1..15}; do
|
||||
rand="$( shuf -i 0-${len} -n 1 )"
|
||||
rand=$(( rand - 1 ))
|
||||
rand="$( shuf -i "0-${len}" -n 1 )"
|
||||
rand="$(( rand - 1 ))"
|
||||
name="${name}${chr[$rand]}"
|
||||
i="${i}" # simply to get rid of shellcheck complaints
|
||||
done
|
||||
@@ -107,22 +129,34 @@ function get_random_name() {
|
||||
###
|
||||
function docker_run() {
|
||||
local image_name="${1}"
|
||||
|
||||
local architecture="${2}"
|
||||
shift
|
||||
shift
|
||||
|
||||
local args="${*}"
|
||||
|
||||
# Returns docker-id
|
||||
did="$( run "docker run --rm -d --name $( get_random_name ) ${args} ${image_name}" "1" )"
|
||||
sleep 10
|
||||
>&2 echo "------------------------------ [STARTING CONTAINER] ------------------------------"
|
||||
name="$( get_random_name )"
|
||||
run "docker run --rm --platform ${architecture} --name ${name} ${args} ${image_name} &" 1>&2
|
||||
run "sleep 15"
|
||||
|
||||
# If it fails, start again in foreground to fail again, but show errors
|
||||
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"
|
||||
>&2 echo "[CHECK IF RUNNING] docker ps"
|
||||
# Check docker ps if running
|
||||
if ! run "docker ps | grep '${name}'" 1>&2; then
|
||||
docker_stop "${name}"
|
||||
>&2 echo "------------------------------ [STARTING CONTAINER] FAILED ------------------------------"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Only get 8 digits of docker id
|
||||
echo "${did}" | grep -Eo '^[0-9a-zA-Z]{8}'
|
||||
# Check if we can ls
|
||||
>&2 echo "[CHECK IF RUNNING] docker exec"
|
||||
if ! run "docker exec $(tty -s && echo "-it" || echo ) ${name} id" 1>&2; then
|
||||
docker_stop "${name}"
|
||||
>&2 echo "------------------------------ [STARTING CONTAINER] FAILED ------------------------------"
|
||||
return 1
|
||||
fi
|
||||
>&2 echo "------------------------------ [STARTING CONTAINER] OK ------------------------------"
|
||||
echo "${name}"
|
||||
}
|
||||
|
||||
|
||||
@@ -130,9 +164,9 @@ function docker_run() {
|
||||
### Show Docker logs
|
||||
###
|
||||
function docker_logs() {
|
||||
local docker_id="${1}"
|
||||
local name="${1}"
|
||||
|
||||
run "docker logs ${docker_id}"
|
||||
run "docker logs ${name}"
|
||||
}
|
||||
|
||||
|
||||
@@ -140,28 +174,13 @@ function docker_logs() {
|
||||
### Docker exec
|
||||
###
|
||||
function docker_exec() {
|
||||
local did="${1}"
|
||||
local name="${1}"
|
||||
local cmd="${2}"
|
||||
shift
|
||||
shift
|
||||
local args="${*}"
|
||||
|
||||
run "docker exec ${args} $(tty -s && echo '-it' || echo) ${did} ${cmd}"
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Get docker name
|
||||
###
|
||||
function docker_name() {
|
||||
local did="${1}"
|
||||
local name=
|
||||
name="$( docker ps | grep "${did}" | awk '{print $(NF)}' )"
|
||||
|
||||
if [ -z "${name}" ]; then
|
||||
return 1
|
||||
fi
|
||||
echo "${name}"
|
||||
run "docker exec ${args} $(tty -s && echo '-it' || echo) ${name} ${cmd}"
|
||||
}
|
||||
|
||||
|
||||
@@ -169,15 +188,59 @@ function docker_name() {
|
||||
### Stop container
|
||||
###
|
||||
function docker_stop() {
|
||||
local did="${1}"
|
||||
local name=
|
||||
name="$( docker ps --no-trunc --format='{{.ID}} {{.Names}}' | grep "${did}" | head -1 | awk '{print $2}' )"
|
||||
local name="${1}"
|
||||
# Stop
|
||||
run "docker stop ${did} >/dev/null"
|
||||
if docker ps | grep -q "${did}"; then
|
||||
run "docker kill ${did} >/dev/null" || true
|
||||
fi
|
||||
|
||||
# Remove if still exist
|
||||
run "docker rm ${name} >/dev/null 2>&1 || true"
|
||||
run "docker stop ${name}" || true
|
||||
run "docker kill ${name} || true" 2>/dev/null
|
||||
run "docker rm -f ${name} || true" 2>/dev/null
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
### Check if PHP-FPM is up and running
|
||||
###
|
||||
function check_php_fpm_running() {
|
||||
local name="${1}"
|
||||
local retries="60"
|
||||
local index="0"
|
||||
|
||||
>&2 echo
|
||||
|
||||
# PHP process
|
||||
index=0
|
||||
>&2 echo "Checking if PHP-FPM process is running..."
|
||||
while ! run "docker exec ${name} ps auxwww | grep -E '(php-fpm|php-cgi)'"; do
|
||||
>&2 printf "."
|
||||
index="$(( index + 1 ))"
|
||||
if [ "${index}" = "${retries}" ]; then
|
||||
>&2 echo
|
||||
run "docker exec ${name} ps auxwww"
|
||||
>&2 echo "Failed to find PHP process after ${retries} seconds."
|
||||
return 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
>&2 echo
|
||||
|
||||
# Docker logs
|
||||
index=0
|
||||
>&2 echo "Checking if PHP-FPM shows success in docker logs..."
|
||||
while ! run "docker logs ${name} 2>&1 | grep -E 'php-fpm entered RUNNING state|ready to handle connections|fpm is running'"; do
|
||||
>&2 printf "."
|
||||
index="$(( index + 1 ))"
|
||||
if [ "${index}" = "${retries}" ]; then
|
||||
>&2 echo
|
||||
>&2 echo "Failed to find PHP success in docker logs after ${retries} seconds."
|
||||
return 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
>&2 echo
|
||||
|
||||
# Wait some more time for everyting else to settle
|
||||
run "sleep 10"
|
||||
|
||||
|
||||
# Echo newline and return
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,76 +24,112 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### Debug == 0
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=0" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=0"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=0" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run_fail "docker logs ${did} 2>&1 | grep 'Debug level'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run_fail "docker logs ${did} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run_fail "docker logs ${name} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run_fail "docker logs ${did} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
if ! run_fail "docker logs ${name} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### Debug == 1
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=1" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=1"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=1" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep 'Debug level: 1'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run "docker logs ${did} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'Debug level: 1'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run_fail "docker logs ${did} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
if ! run "docker logs ${name} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! run_fail "docker logs ${name} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### Debug == 2
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep 'Debug level: 2'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run "docker logs ${did} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'Debug level: 2'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run_fail "docker logs ${did} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
if ! run "docker logs ${name} 2>&1 | grep '\[INFO\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! run_fail "docker logs ${name} 2>&1 | grep -E '\[(ERR|\?\?\?)\]'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,58 +24,100 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### uid: 1005 (new uid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=1005" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_UID=1005"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=1005" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '1005'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'uid=1005'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '1005'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'uid=1005'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### uid: 1000 (same uid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=1000" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_UID=1000"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=1000" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '1000'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'uid=1000'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '1000'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'uid=1000'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### uid: 33 (existing uid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=33" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_UID=33"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=33" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '33'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'uid=33'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '33'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'uid=33'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,58 +24,100 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### gid: 1005 (new gid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=1005" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_GID=1005"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=1005" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '1005'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'gid=1005'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '1005'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'gid=1005'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### gid: 1000 (same gid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=1000" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_GID=1000"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=1000" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '1000'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'gid=1000'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '1000'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'gid=1000'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
|
||||
###
|
||||
### gid: 33 (existing gid)
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=33" )"
|
||||
print_h2 "DEBUG_ENTRYPOINT=2 NEW_GID=33"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_GID=33" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '33'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "id | grep 'gid=33'" "--user=devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q '33'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "id | grep 'gid=33'" "--user=devilbox"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -37,12 +39,26 @@ chmod 0777 "${CONFIG_HOST}"
|
||||
chmod 0777 "${DOC_ROOT_HOST}"
|
||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||
|
||||
|
||||
# Pull Image
|
||||
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||
print_h2 "Pulling Nginx"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"
|
||||
name="$( docker_name "${did}" )"
|
||||
print_h2 "Starting PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Nginx.conf
|
||||
{
|
||||
@@ -62,8 +78,11 @@ name="$( docker_name "${did}" )"
|
||||
} > "${CONFIG_HOST}/php.conf"
|
||||
|
||||
# Start Nginx
|
||||
ndid="$( docker_run "${CONTAINER}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"
|
||||
|
||||
print_h2 "Starting Nginx"
|
||||
if ! nginx_name="$( docker_run "${CONTAINER}" "${ARCH}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"; then
|
||||
docker_stop "${name}" || true
|
||||
exit 1
|
||||
fi
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
|
||||
@@ -71,18 +90,18 @@ run "sleep 10"
|
||||
###
|
||||
### Check correct PHP-FPM user
|
||||
###
|
||||
|
||||
print_h2 "Check PHP-FPM user"
|
||||
# On pm = ondemand, there will be no child process, so we need to create some traffic
|
||||
# in order to have child proccesses spawn
|
||||
for i in $(seq 1 10); do
|
||||
curl http://127.0.0.1:${WWW_PORT}/index.php?${i} >/dev/null 2>&1 &
|
||||
curl "http://127.0.0.1:${WWW_PORT}/index.php?${i}" >/dev/null 2>&1 &
|
||||
done
|
||||
if ! docker_exec "${did}" "ps auxw | grep -E '(php-fpm: pool|php-cgi)' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then
|
||||
docker_exec "${did}" "ps auxw"
|
||||
if ! docker_exec "${name}" "ps auxw | grep -E '(php-fpm|php-cgi)' | grep -v grep | awk '{ print \$1 }' | tail -1 | grep devilbox"; then
|
||||
docker_exec "${name}" "ps auxw"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
echo "Failed"
|
||||
@@ -94,6 +113,7 @@ fi
|
||||
###
|
||||
### Test Nginx with PHP-FPM
|
||||
###
|
||||
print_h2 "Test Nginx with PHP-FPM"
|
||||
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>&1 | grep '${FINDME}'"; then
|
||||
|
||||
# Info
|
||||
@@ -101,25 +121,25 @@ if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>&1 | grep '${FINDM
|
||||
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "docker ps --no-trunc"
|
||||
docker_exec "${ndid}" "nginx -t"
|
||||
docker_exec "${nginx_name}" "nginx -t"
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Ensure file is available
|
||||
docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${nginx_name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
|
||||
docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${nginx_name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
|
||||
# Nginx configuration
|
||||
docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
|
||||
docker_exec "${nginx_name}" "cat ${CONFIG_CONT}/php.conf"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
echo "Failed"
|
||||
@@ -130,7 +150,8 @@ fi
|
||||
###
|
||||
### Clean-up
|
||||
###
|
||||
docker_stop "${did}"
|
||||
docker_stop "${ndid}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${nginx_name}"
|
||||
docker_stop "${name}"
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,12 +24,26 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### Ensuring 'apt update' works without any issues
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2" )"
|
||||
print_h2 "Ensure 'apt update' works"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker_exec "${did}" "apt update"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! docker_exec "${name}" "apt update"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
@@ -21,7 +23,7 @@ FLAVOUR="${3}"
|
||||
|
||||
ERROR=0
|
||||
for dir in $( ls -1 "${CWD}/modules/" ); do
|
||||
if ! "${CWD}/modules.sh" "${IMAGE}" "${VERSION}" "${FLAVOUR}" "${dir}"; then
|
||||
if ! "${CWD}/modules.sh" "${IMAGE}" "${ARCH}" "${VERSION}" "${FLAVOUR}" "${TAG}" "${dir}"; then
|
||||
ERROR="$(( ERROR + 1 ))"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -6,15 +6,17 @@ set -o pipefail
|
||||
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
if [ "${#}" != "4" ]; then
|
||||
>&2 echo "Error, requires 4 arguments: <IMAGE> <VERSION> <FLAVOUR> <MODULE>"
|
||||
if [ "${#}" != "6" ]; then
|
||||
>&2 echo "Error, requires 6 arguments: <IMAGE> <ARCH> <VERSION> <FLAVOUR> <TAG> <MODULE>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
MODULE="${4}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
MODULE="${6}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -47,13 +49,14 @@ fi
|
||||
WORKDIR="/tmp/${MODULE}"
|
||||
docker run \
|
||||
--rm \
|
||||
--platform "${ARCH}" \
|
||||
-e DEBUG_ENTRYPOINT=0 \
|
||||
-e NEW_UID="$(id -u)" \
|
||||
-e NEW_GID="$(id -g)" \
|
||||
-v "${CWD}/modules/${MODULE}:${WORKDIR}" \
|
||||
--entrypoint=sh \
|
||||
--workdir="${WORKDIR}" \
|
||||
"${IMAGE}:${VERSION}-${FLAVOUR}" \
|
||||
"${IMAGE}:${TAG}" \
|
||||
-c 'find . -name "*.php" -type f -print0 | xargs -0 -n1 sh -c "
|
||||
set -e
|
||||
set -u
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,25 +24,39 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### Europe/Berlin
|
||||
###
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e TIMEZONE=Europe/Berlin" )"
|
||||
print_h2 "-e DEBUG_ENTRYPOINT=2 -e TIMEZONE=Europe/Berlin"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e TIMEZONE=Europe/Berlin" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'Europe/Berlin'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "date | grep -E 'CE(S)*T'"; then
|
||||
docker_exec "${did}" "date"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q 'Europe/Berlin'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "php -i | grep -E 'date\.timezone' | grep 'Europe/Berlin'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
if ! docker_exec "${name}" "date | grep -E 'CE(S)*T'"; then
|
||||
docker_exec "${name}" "date"
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${did}"
|
||||
if ! docker_exec "${name}" "php -i | grep -E 'date\.timezone' | grep 'Europe/Berlin'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -40,13 +42,28 @@ chmod 0777 -R "${CFG_DIR_HOST}"
|
||||
chmod 0777 -R "${WWW_DIR_HOST}"
|
||||
|
||||
|
||||
# Pull Image
|
||||
print_h2 "Pulling Nginx"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
###
|
||||
### Start container
|
||||
###
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=1 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )"
|
||||
name="$( docker_name "${did}" )"
|
||||
print_h2 "Starting PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=1 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Nginx.conf
|
||||
{
|
||||
@@ -67,8 +84,11 @@ name="$( docker_name "${did}" )"
|
||||
|
||||
|
||||
# Start Nginx
|
||||
ndid="$( docker_run "${CONTAINER}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )"
|
||||
|
||||
print_h2 "Starting Nginx"
|
||||
if ! nginx_name="$( docker_run "${CONTAINER}" "${ARCH}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )"; then
|
||||
docker_stop "${name}" || true
|
||||
exit 1
|
||||
fi
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
|
||||
@@ -76,6 +96,7 @@ run "sleep 10"
|
||||
###
|
||||
### Fire positive and error generating request
|
||||
###
|
||||
print_h2 "Fire curl requests"
|
||||
run "curl http://localhost:${WWW_PORT}/ok.php"
|
||||
run "curl http://localhost:${WWW_PORT}/fail.php"
|
||||
|
||||
@@ -83,10 +104,12 @@ run "curl http://localhost:${WWW_PORT}/fail.php"
|
||||
###
|
||||
### Run tests
|
||||
###
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Checking DOCKER_LOGS"
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'DOCKER_LOGS'"; then
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -94,13 +117,15 @@ if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "${LOG_DIR_HOST}/php-fpm.access" ]; then
|
||||
print_h2 "Ensure php-fpm.access does not exist"
|
||||
if ! run_fail "test -f ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
echo "Access log should not exist: ${LOG_DIR_HOST}/php-fpm.access"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
cat "${LOG_DIR_HOST}/php-fpm.access"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -108,13 +133,15 @@ if [ -f "${LOG_DIR_HOST}/php-fpm.access" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "${LOG_DIR_HOST}/php-fpm.error" ]; then
|
||||
print_h2 "Ensure php-fpm.error does not exist"
|
||||
if ! run_fail "test -f ${LOG_DIR_HOST}/php-fpm.error"; then
|
||||
echo "Error log should not exist: ${LOG_DIR_HOST}/php-fpm.error"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
cat "${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -126,33 +153,39 @@ fi
|
||||
### PHP 5.2 still does not show any errors
|
||||
###
|
||||
if [ "${VERSION}" != "5.2" ]; then
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then
|
||||
print_h2 "Ensure stderr access logging is enabled"
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'GET /ok.php'"; then
|
||||
echo "Error no access log string for 'GET /ok.php' found in stderr"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then
|
||||
print_h2 "Ensure stderr access logging is enabled"
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'GET /fail.php'"; then
|
||||
echo "Error no access log string for 'GET /fail.php' found in stderr"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then
|
||||
print_h2 "Ensure errors are logged to stderr"
|
||||
if ! run "docker logs ${name} 2>&1 | grep '/var/www/default/fail.php'"; then
|
||||
echo "Error no error message found in stderr"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -165,8 +198,9 @@ fi
|
||||
###
|
||||
### Shutdown
|
||||
###
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -40,13 +42,28 @@ chmod 0777 -R "${CFG_DIR_HOST}"
|
||||
chmod 0777 -R "${WWW_DIR_HOST}"
|
||||
|
||||
|
||||
# Pull Image
|
||||
print_h2 "Pulling Nginx"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
###
|
||||
### Start container
|
||||
###
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=0 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )"
|
||||
name="$( docker_name "${did}" )"
|
||||
print_h2 "Starting PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e DOCKER_LOGS=0 -v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${LOG_DIR_HOST}:/var/log/php" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Nginx.conf
|
||||
{
|
||||
@@ -67,7 +84,11 @@ name="$( docker_name "${did}" )"
|
||||
|
||||
|
||||
# Start Nginx
|
||||
ndid="$( docker_run "${CONTAINER}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )"
|
||||
print_h2 "Starting Nginx"
|
||||
if ! nginx_name="$( docker_run "${CONTAINER}" "${ARCH}" "-v ${WWW_DIR_HOST}:${WWW_DIR_CONT} -v ${CFG_DIR_HOST}:${CFG_DIR_CONT} -p ${WWW_PORT}:80 --link ${name}" )"; then
|
||||
docker_stop "${name}" || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
@@ -76,6 +97,7 @@ run "sleep 10"
|
||||
###
|
||||
### Fire positive and error generating request
|
||||
###
|
||||
print_h2 "Fire curl requests"
|
||||
run "curl http://localhost:${WWW_PORT}/ok.php"
|
||||
run "curl http://localhost:${WWW_PORT}/fail.php"
|
||||
|
||||
@@ -83,10 +105,11 @@ run "curl http://localhost:${WWW_PORT}/fail.php"
|
||||
###
|
||||
### Run tests
|
||||
###
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Checking DOCKER_LOGS"
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'DOCKER_LOGS'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -94,24 +117,29 @@ if ! run "docker logs ${did} 2>&1 | grep -q 'DOCKER_LOGS'"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${LOG_DIR_HOST}/php-fpm.access" ]; then
|
||||
print_h2 "Ensure php-fpm.access exists"
|
||||
if ! run "test -f ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
echo "Access log does not exist: ${LOG_DIR_HOST}/php-fpm.access"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -r "${LOG_DIR_HOST}/php-fpm.access" ]; then
|
||||
|
||||
print_h2 "Ensure php-fpm.access is readable"
|
||||
if ! run "test -r ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
echo "Access log is not readable"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -119,24 +147,14 @@ if [ ! -r "${LOG_DIR_HOST}/php-fpm.access" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${LOG_DIR_HOST}/php-fpm.error" ]; then
|
||||
print_h2 "Ensure php-fpm.error exists"
|
||||
if ! run "test -f ${LOG_DIR_HOST}/php-fpm.error"; then
|
||||
echo "Error log does not exist: ${LOG_DIR_HOST}/php-fpm.error"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -r "${LOG_DIR_HOST}/php-fpm.error" ]; then
|
||||
echo "Error log is not readable"
|
||||
ls -lap ${LOG_DIR_HOST}/
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -144,40 +162,62 @@ if [ ! -r "${LOG_DIR_HOST}/php-fpm.error" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure no access/error goes to stderr
|
||||
if run "docker logs ${did} 2>&1 | grep -q 'GET /ok.php'"; then
|
||||
print_h2 "Ensure php-fpm.error is readable"
|
||||
if ! run "test -r ${LOG_DIR_HOST}/php-fpm.error"; then
|
||||
echo "Error log is not readable"
|
||||
ls -lap "${LOG_DIR_HOST}/"
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_h2 "Ensure no access/error logging exists in stderr (ok.php)"
|
||||
if run "docker logs ${name} 2>&1 | grep 'GET /ok.php'"; then
|
||||
echo "Error access log string for 'GET /ok.php' found in stderr, but shold go to file"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if run "docker logs ${did} 2>&1 | grep -q 'GET /fail.php'"; then
|
||||
|
||||
print_h2 "Ensure no access/error logging exists in stderr (fail.php)"
|
||||
if run "docker logs ${name} 2>&1 | grep 'GET /fail.php'"; then
|
||||
echo "Error access log string for 'GET /fail.php' found in stderr, but should go to file"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if run "docker logs ${did} 2>&1 | grep -q '/var/www/default/fail.php'"; then
|
||||
|
||||
print_h2 "Ensure no error message is present in stderr"
|
||||
if run "docker logs ${name} 2>&1 | grep '/var/www/default/fail.php'"; then
|
||||
echo "Error error message found in stderr, but should go to file"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -188,26 +228,31 @@ fi
|
||||
# PHP-FPM 5.2 does not show access logs
|
||||
if [ "${VERSION}" != "5.2" ]; then
|
||||
# Test access and error file for correct content
|
||||
if ! run "grep -q 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
print_h2 "Test access logs in php-fpm.access (ok.php)"
|
||||
if ! run "grep 'GET /ok.php' ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
echo "Error no access log string for 'GET /ok.php' found in: ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! run "grep -q 'GET /fail.php' ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
|
||||
print_h2 "Test access logs in php-fpm.access (fail.php)"
|
||||
if ! run "grep 'GET /fail.php' ${LOG_DIR_HOST}/php-fpm.access"; then
|
||||
echo "Error no access log string for 'GET /fail.php' found in: ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -215,13 +260,16 @@ if [ "${VERSION}" != "5.2" ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if ! run "grep -q '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then
|
||||
|
||||
print_h2 "Ensiure error message is present in php-fpm.error"
|
||||
if ! run "grep '/var/www/default/fail.php' ${LOG_DIR_HOST}/php-fpm.error"; then
|
||||
echo "Error no error message found in: ${LOG_DIR_HOST}/php-fpm.error"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${nginx_name}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
@@ -233,12 +281,13 @@ fi
|
||||
###
|
||||
### Shutdown
|
||||
###
|
||||
docker_logs "${did}" || true
|
||||
print_h2 "Cleanup"
|
||||
docker_logs "${name}" || true
|
||||
run "ls -lap ${LOG_DIR_HOST}/"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.access"
|
||||
run "cat ${LOG_DIR_HOST}/php-fpm.error"
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}"
|
||||
docker_stop "${nginx_name}" || true
|
||||
docker_stop "${name}"
|
||||
rm -rf "${LOG_DIR_HOST}"
|
||||
rm -rf "${CFG_DIR_HOST}"
|
||||
rm -rf "${WWW_DIR_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -23,12 +25,26 @@ FLAVOUR="${3}"
|
||||
### Postfix
|
||||
###
|
||||
MOUNTPOINT="$( mktemp --directory )"
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e ENABLE_MAIL=2 -v ${MOUNTPOINT}:/var/mail" )"
|
||||
run "sleep 10"
|
||||
|
||||
if ! run "docker logs ${did} 2>&1 | grep -q 'ENABLE_MAIL'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e ENABLE_MAIL=2 -v ${MOUNTPOINT}:/var/mail"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e ENABLE_MAIL=2 -v ${MOUNTPOINT}:/var/mail" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start Tests
|
||||
print_h2 "Testing..."
|
||||
if ! run "docker logs ${name} 2>&1 | grep -q 'ENABLE_MAIL'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
@@ -37,8 +53,8 @@ fi
|
||||
if [ ! -f "${MOUNTPOINT}/devilbox" ]; then
|
||||
echo "Mail file does not exist: ${MOUNTPOINT}/devilbox"
|
||||
ls -lap "${MOUNTPOINT}/"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
@@ -46,25 +62,37 @@ fi
|
||||
if [ ! -r "${MOUNTPOINT}/devilbox" ]; then
|
||||
echo "Mail file is not readable"
|
||||
ls -lap "${MOUNTPOINT}/"
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Send test email
|
||||
docker_exec "${did}" "php -r \"mail('mailtest@devilbox.org', 'the subject', 'the message');\""
|
||||
run "sleep 5"
|
||||
print_h2 "Send test email"
|
||||
docker_exec "${name}" "php -r \"mail('mailtest@devilbox.org', 'the subject', 'the message');\""
|
||||
|
||||
if ! run "grep 'the subject' ${MOUNTPOINT}/devilbox"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
run "cat ${MOUNTPOINT}/devilbox"
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_stop "${did}"
|
||||
# Probe if email has been received
|
||||
print_h2 "Probe for sent email"
|
||||
RETRIES=60
|
||||
INDEX=0
|
||||
while ! run "grep 'the subject' ${MOUNTPOINT}/devilbox"; do
|
||||
if [ "${RETRIES}" = "${INDEX}" ]; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
run "cat ${MOUNTPOINT}/devilbox"
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
INDEX="$(( INDEX + 1 ))"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
||||
# Cleanup
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name}"
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -22,52 +24,70 @@ FLAVOUR="${3}"
|
||||
###
|
||||
### Socat forwarding
|
||||
###
|
||||
CONTAINER="mysql:5.6"
|
||||
CONTAINER="devilbox/mysql:mysql-8.0"
|
||||
|
||||
# Pull Container
|
||||
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||
print_h2 "Pulling MySQL"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
# Start mysql container
|
||||
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ALLOW_EMPTY_PASSWORD=yes" )"
|
||||
mname="$( docker_name "${mdid}" )"
|
||||
run "sleep 5"
|
||||
print_h2 "Starting MySQL"
|
||||
if ! name_mysql="$( docker_run "${CONTAINER}" "${ARCH}" "-e MYSQL_ALLOW_EMPTY_PASSWORD=yes" )"; then
|
||||
exit 1
|
||||
fi
|
||||
run "sleep 60"
|
||||
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e FORWARD_PORTS_TO_LOCALHOST=3306:${mname}:3306 --link ${mname}" )"
|
||||
if ! run "docker logs ${did} 2>&1 | grep 'Forwarding ${mname}:3306'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${mdid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${mdid}" || true
|
||||
|
||||
# Start PHP-FPM
|
||||
print_h2 "Start PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e FORWARD_PORTS_TO_LOCALHOST=3306:${name_mysql}:3306 --link ${name_mysql}" )"; then
|
||||
docker_stop "${name_mysql}" || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait for both containers to come up
|
||||
run "sleep 10"
|
||||
print_h2 "Ensure forwarding info is present in docker logs"
|
||||
if ! run "docker logs ${name} 2>&1 | grep 'Forwarding ${name_mysql}:3306'"; then
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test connectivity
|
||||
#docker_exec "${did}" "ping -c 1 ${mname}"
|
||||
#docker_exec "${did}" "echo | nc -w 1 ${mname} 3306"
|
||||
#docker_exec "${did}" "echo | nc -w 1 127.0.0.1 3306"
|
||||
|
||||
# Only work container has mysql binary installed
|
||||
if [ "${FLAVOUR}" = "work" ]; then
|
||||
if ! docker_exec "${did}" "mysql --user=root --password= --host=${mname} -e 'SHOW DATABASES;'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${mdid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${mdid}" || true
|
||||
print_h2 "Test connectivity against hostname"
|
||||
if ! docker_exec "${name}" "mysql --user=root --password= --host=${name_mysql} -e 'SHOW DATABASES;'"; then
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
if ! docker_exec "${did}" "mysql --user=root --password= --host=127.0.0.1 -e 'SHOW DATABASES;'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${mdid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${mdid}" || true
|
||||
print_h2 "Test connectivity against 127.0.0.1"
|
||||
if ! docker_exec "${name}" "mysql --user=root --password= --host=127.0.0.1 -e 'SHOW DATABASES;'"; then
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
docker_stop "${mdid}"
|
||||
docker_stop "${did}"
|
||||
|
||||
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name_mysql}"
|
||||
docker_stop "${name}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -43,12 +45,25 @@ chmod 0777 "${PHP_INI_HOST}"
|
||||
chmod 0777 "${DOC_ROOT_HOST}"
|
||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||
|
||||
|
||||
# Pull container
|
||||
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||
print_h2 "Pulling Nginx"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"
|
||||
name="$( docker_name "${did}" )"
|
||||
print_h2 "Starting PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Nginx.conf
|
||||
{
|
||||
@@ -69,17 +84,21 @@ name="$( docker_name "${did}" )"
|
||||
|
||||
|
||||
# Start Nginx
|
||||
ndid="$( docker_run "${CONTAINER}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"
|
||||
|
||||
print_h2 "Starting Nginx"
|
||||
if ! name_nginx="$( docker_run "${CONTAINER}" "${ARCH}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"; then
|
||||
docker_stop "${name}" || true
|
||||
exit 1
|
||||
fi
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
|
||||
# Check entrypoint
|
||||
if ! run "docker logs ${did} | grep 'post.ini'"; then
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Checking entrypoint"
|
||||
if ! run "docker logs ${name} | grep 'post.ini'"; then
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_INI_HOST}"
|
||||
@@ -88,31 +107,32 @@ if ! run "docker logs ${did} | grep 'post.ini'"; then
|
||||
fi
|
||||
|
||||
# Check PHP connectivity
|
||||
print_h2 "Checking connectivity"
|
||||
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; then
|
||||
# Info
|
||||
run "netstat -tuln"
|
||||
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "docker ps --no-trunc"
|
||||
docker_exec "${ndid}" "nginx -t"
|
||||
docker_exec "${name_nginx}" "nginx -t"
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Ensure file is available
|
||||
docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name_nginx}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
|
||||
docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name_nginx}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
|
||||
# Nginx configuration
|
||||
docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
|
||||
docker_exec "${name_nginx}" "cat ${CONFIG_CONT}/php.conf"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_INI_HOST}"
|
||||
@@ -121,17 +141,18 @@ if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; th
|
||||
fi
|
||||
|
||||
# Check modified php.ini
|
||||
if ! docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\" | grep '17M'"; then
|
||||
print_h2 "Checking modified php.ini"
|
||||
if ! docker_exec "${name}" "php -r \"echo ini_get('post_max_size');\" | grep '17M'"; then
|
||||
# Info
|
||||
docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\""
|
||||
docker_exec "${name}" "php -r \"echo ini_get('post_max_size');\""
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_INI_HOST}"
|
||||
@@ -140,31 +161,32 @@ if ! docker_exec "${did}" "php -r \"echo ini_get('post_max_size');\" | grep '17M
|
||||
fi
|
||||
|
||||
# Check modified php.ini
|
||||
print_h2 "Checking modified php.ini"
|
||||
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep post_max_size | grep '17M'"; then
|
||||
# Info
|
||||
run "netstat -tuln"
|
||||
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "docker ps --no-trunc"
|
||||
docker_exec "${ndid}" "nginx -t"
|
||||
docker_exec "${name_nginx}" "nginx -t"
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Ensure file is available
|
||||
docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name_nginx}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
|
||||
docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name_nginx}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
|
||||
# Nginx configuration
|
||||
docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
|
||||
docker_exec "${name_nginx}" "cat ${CONFIG_CONT}/php.conf"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_INI_HOST}"
|
||||
@@ -174,8 +196,9 @@ fi
|
||||
|
||||
|
||||
# Cleanup
|
||||
docker_stop "${did}"
|
||||
docker_stop "${ndid}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name}"
|
||||
docker_stop "${name_nginx}"
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_INI_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -49,11 +51,23 @@ chmod 0777 "${DOC_ROOT_HOST}"
|
||||
chmod 0644 "${DOC_ROOT_HOST}/index.php"
|
||||
|
||||
# Pull container
|
||||
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||
print_h2 "Pulling Nginx"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_CNF_HOST}:${PHP_CNF_CONT}" )"
|
||||
name="$( docker_name "${did}" )"
|
||||
print_h2 "Starting PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_CNF_HOST}:${PHP_CNF_CONT}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Nginx.conf
|
||||
{
|
||||
@@ -74,17 +88,21 @@ name="$( docker_name "${did}" )"
|
||||
|
||||
|
||||
# Start Nginx
|
||||
ndid="$( docker_run "${CONTAINER}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"
|
||||
|
||||
print_h2 "Starting Nginx"
|
||||
if ! name_nginx="$( docker_run "${CONTAINER}" "${ARCH}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )"; then
|
||||
docker_stop "${name}" || true
|
||||
exit 1
|
||||
fi
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
|
||||
# Check entrypoint
|
||||
if ! run "docker logs ${did} | grep 'post.conf'"; then
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Checking entrypoint"
|
||||
if ! run "docker logs ${name} | grep 'post.conf'"; then
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_CNF_HOST}"
|
||||
@@ -93,31 +111,32 @@ if ! run "docker logs ${did} | grep 'post.conf'"; then
|
||||
fi
|
||||
|
||||
# Check PHP connectivity
|
||||
print_h2 "Checking connectivity"
|
||||
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; then
|
||||
# Info
|
||||
run "netstat -tuln"
|
||||
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "curl -6 http://127.0.0.1:${WWW_PORT}/index.php" || true
|
||||
run "docker ps --no-trunc"
|
||||
docker_exec "${ndid}" "nginx -t"
|
||||
docker_exec "${name_nginx}" "nginx -t"
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Ensure file is available
|
||||
docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name_nginx}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
|
||||
docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name_nginx}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
|
||||
# Nginx configuration
|
||||
docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
|
||||
docker_exec "${name_nginx}" "cat ${CONFIG_CONT}/php.conf"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_CNF_HOST}"
|
||||
@@ -125,32 +144,32 @@ if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php >/dev/null 2>&1"; th
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Check modified php-fpm.conf
|
||||
print_h2 "Checking modified php-fpm.conf"
|
||||
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then
|
||||
# Info
|
||||
run "netstat -tuln"
|
||||
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true
|
||||
run "docker ps --no-trunc"
|
||||
docker_exec "${ndid}" "nginx -t"
|
||||
docker_exec "${name_nginx}" "nginx -t"
|
||||
|
||||
# Show logs
|
||||
docker_logs "${ndid}" || true
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${name_nginx}" || true
|
||||
docker_logs "${name}" || true
|
||||
|
||||
# Ensure file is available
|
||||
docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name_nginx}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
docker_exec "${name}" "ls -la ${DOC_ROOT_CONT}/"
|
||||
|
||||
docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name_nginx}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
docker_exec "${name}" "cat ${DOC_ROOT_CONT}/index.php"
|
||||
|
||||
# Nginx configuration
|
||||
docker_exec "${ndid}" "cat ${CONFIG_CONT}/php.conf"
|
||||
docker_exec "${name_nginx}" "cat ${CONFIG_CONT}/php.conf"
|
||||
|
||||
# Shutdown
|
||||
docker_stop "${ndid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${name_nginx}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_CNF_HOST}"
|
||||
@@ -160,8 +179,9 @@ fi
|
||||
|
||||
|
||||
# Cleanup
|
||||
docker_stop "${did}"
|
||||
docker_stop "${ndid}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name}"
|
||||
docker_stop "${name_nginx}"
|
||||
rm -rf "${DOC_ROOT_HOST}"
|
||||
rm -rf "${CONFIG_HOST}"
|
||||
rm -rf "${PHP_CNF_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -33,24 +35,35 @@ printf "#!/bin/bash\\necho 'abcdefghijklmnopq';\\n" > "${RUN_SH_HOST}/myscript1.
|
||||
chmod +x "${RUN_SH_HOST}/myscript1.sh"
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"
|
||||
print_h2 "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check entrypoint for script run
|
||||
if ! run "docker logs ${did} | grep 'myscript1.sh'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Check docker logs for script run"
|
||||
if ! run "docker logs ${name} | grep 'myscript1.sh'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check entrypoint for script output
|
||||
if ! run "docker logs ${did} | grep 'abcdefghijklmnopq'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Check docker logs for script output"
|
||||
if ! run "docker logs ${name} | grep 'abcdefghijklmnopq'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
@@ -58,5 +71,6 @@ fi
|
||||
|
||||
|
||||
# Cleanup
|
||||
docker_stop "${did}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name}"
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -33,24 +35,35 @@ printf "#!/bin/bash\\necho 'abcdefghijklmnopq';\\n" > "${RUN_SH_HOST}/myscript1.
|
||||
chmod +x "${RUN_SH_HOST}/myscript1.sh"
|
||||
|
||||
# Start PHP-FPM
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"
|
||||
print_h2 "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Wait for both containers to be up and running
|
||||
run "sleep 10"
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check entrypoint for script run
|
||||
if ! run "docker logs ${did} | grep 'myscript1.sh'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Check docker logs for script run"
|
||||
if ! run "docker logs ${name} | grep 'myscript1.sh'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check entrypoint for script output
|
||||
if ! run "docker logs ${did} | grep 'abcdefghijklmnopq'"; then
|
||||
docker_logs "${did}" || true
|
||||
docker_stop "${did}" || true
|
||||
print_h2 "Check docker logs for script output"
|
||||
if ! run "docker logs ${name} | grep 'abcdefghijklmnopq'"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
echo "Failed"
|
||||
exit 1
|
||||
@@ -58,5 +71,6 @@ fi
|
||||
|
||||
|
||||
# Cleanup
|
||||
docker_stop "${did}"
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name}"
|
||||
rm -rf "${RUN_SH_HOST}"
|
||||
|
||||
@@ -30,8 +30,8 @@ CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
###
|
||||
### Sanity check
|
||||
###
|
||||
if [ "${#}" -ne "4" ]; then
|
||||
echo "Usage: start.ci <image> <arch> <version> <flavour>"
|
||||
if [ "${#}" -ne "5" ]; then
|
||||
echo "Usage: start.ci <image> <arch> <version> <flavour> <tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -39,47 +39,52 @@ IMAGE="${1}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
|
||||
###
|
||||
### Run tests
|
||||
###
|
||||
if [ "${FLAVOUR}" = "base" ] || [ "${FLAVOUR}" = "mods" ] || [ "${FLAVOUR}" = "prod" ] || [ "${FLAVOUR}" = "work" ]; then
|
||||
TESTS="$( find ${CWD} -regex "${CWD}/base/[0-9].+.*\.sh" | sort -u )"
|
||||
TESTS="$( find "${CWD}" -regex "${CWD}/base/[0-9].+.*\.sh" | sort -u )"
|
||||
for t in ${TESTS}; do
|
||||
printf "\n\n\033[0;33m%s\033[0m\n" "################################################################################"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH}): ${t}"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH})"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "${t} ${IMAGE} ${ARCH} ${VERSION} ${FLAVOUR} ${TAG}"
|
||||
printf "\033[0;33m%s\033[0m\n\n" "################################################################################"
|
||||
time ${t} "${IMAGE}" "${VERSION}" "${FLAVOUR}"
|
||||
time ${t} "${IMAGE}" "${ARCH}" "${VERSION}" "${FLAVOUR}" "${TAG}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${FLAVOUR}" = "mods" ] || [ "${FLAVOUR}" = "prod" ] || [ "${FLAVOUR}" = "work" ]; then
|
||||
TESTS="$( find ${CWD} -regex "${CWD}/mods/[0-9].+.*\.sh" | sort -u )"
|
||||
TESTS="$( find "${CWD}" -regex "${CWD}/mods/[0-9].+.*\.sh" | sort -u )"
|
||||
for t in ${TESTS}; do
|
||||
printf "\n\n\033[0;33m%s\033[0m\n" "################################################################################"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH}): ${t}"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH})"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "${t} ${IMAGE} ${ARCH} ${VERSION} ${FLAVOUR} ${TAG}"
|
||||
printf "\033[0;33m%s\033[0m\n\n" "################################################################################"
|
||||
time ${t} "${IMAGE}" "${VERSION}" "${FLAVOUR}"
|
||||
time ${t} "${IMAGE}" "${ARCH}" "${VERSION}" "${FLAVOUR}" "${TAG}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${FLAVOUR}" = "prod" ] || [ "${FLAVOUR}" = "work" ]; then
|
||||
TESTS="$( find ${CWD} -regex "${CWD}/prod/[0-9].+.*\.sh" | sort -u )"
|
||||
TESTS="$( find "${CWD}" -regex "${CWD}/prod/[0-9].+.*\.sh" | sort -u )"
|
||||
for t in ${TESTS}; do
|
||||
printf "\n\n\033[0;33m%s\033[0m\n" "################################################################################"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH}): ${t}"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH})"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "${t} ${IMAGE} ${ARCH} ${VERSION} ${FLAVOUR} ${TAG}"
|
||||
printf "\033[0;33m%s\033[0m\n\n" "################################################################################"
|
||||
time ${t} "${IMAGE}" "${VERSION}" "${FLAVOUR}"
|
||||
time ${t} "${IMAGE}" "${ARCH}" "${VERSION}" "${FLAVOUR}" "${TAG}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${FLAVOUR}" = "work" ]; then
|
||||
TESTS="$( find ${CWD} -regex "${CWD}/work/[0-9].+.*\.sh" | sort -u )"
|
||||
TESTS="$( find "${CWD}" -regex "${CWD}/work/[0-9].+.*\.sh" | sort -u )"
|
||||
for t in ${TESTS}; do
|
||||
printf "\n\n\033[0;33m%s\033[0m\n" "################################################################################"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH}): ${t}"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "[${VERSION}-${FLAVOUR}] (${ARCH})"
|
||||
printf "\033[0;33m%s %s\033[0m\n" "#" "${t} ${IMAGE} ${ARCH} ${VERSION} ${FLAVOUR} ${TAG}"
|
||||
printf "\033[0;33m%s\033[0m\n\n" "################################################################################"
|
||||
time ${t} "${IMAGE}" "${VERSION}" "${FLAVOUR}"
|
||||
time ${t} "${IMAGE}" "${ARCH}" "${VERSION}" "${FLAVOUR}" "${TAG}"
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -7,8 +7,10 @@ set -o pipefail
|
||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
IMAGE="${1}"
|
||||
VERSION="${2}"
|
||||
FLAVOUR="${3}"
|
||||
ARCH="${2}"
|
||||
VERSION="${3}"
|
||||
FLAVOUR="${4}"
|
||||
TAG="${5}"
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
. "${CWD}/../.lib.sh"
|
||||
@@ -24,35 +26,82 @@ FLAVOUR="${3}"
|
||||
###
|
||||
MYSQL_ROOT_PASSWORD="toor"
|
||||
MOUNTPOINT="$( mktemp --directory )"
|
||||
CONTAINER="mysql:5.6"
|
||||
CONTAINER="devilbox/mysql:mysql-8.0"
|
||||
|
||||
# Pull Container
|
||||
run "until docker pull ${CONTAINER}; do sleep 1; done"
|
||||
print_h2 "Pulling MySQL"
|
||||
run "until docker pull --platform ${ARCH} ${CONTAINER}; do sleep 1; done"
|
||||
|
||||
# Start mysql container
|
||||
mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )"
|
||||
mname="$( docker_name "${mdid}" )"
|
||||
run "sleep 10"
|
||||
print_h2 "Starting MySQL"
|
||||
if ! name_mysql="$( docker_run "${CONTAINER}" "${ARCH}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )"; then
|
||||
exit 1
|
||||
fi
|
||||
run "sleep 60"
|
||||
|
||||
# Start PHP-FPM container
|
||||
did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e FORWARD_PORTS_TO_LOCALHOST=3306:${mname}:3306 -e MYSQL_BACKUP_USER=root -e MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD} -e MYSQL_BACKUP_HOST=127.0.0.1 -v ${MOUNTPOINT}:/shared/backups --link ${mname}" )"
|
||||
print_h2 "Start PHP-FPM"
|
||||
if ! name="$( docker_run "${IMAGE}:${TAG}" "${ARCH}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -e FORWARD_PORTS_TO_LOCALHOST=3306:${name_mysql}:3306 -e MYSQL_BACKUP_USER=root -e MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD} -e MYSQL_BACKUP_HOST=127.0.0.1 -v ${MOUNTPOINT}:/shared/backups --link ${name_mysql}" )"; then
|
||||
docker_stop "${name_mysql}" || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_exec "${did}" mysqldump-secure
|
||||
# Check if PHP-FPM is running
|
||||
print_h2 "Check if PHP-FPM is running"
|
||||
if ! check_php_fpm_running "${name}"; then
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name}" || true
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "${MOUNTPOINT}/mysql" ]; then
|
||||
echo "MySQL backup dir does not exist: ${MOUNTPOINT}/mysql"
|
||||
ls -lap ${MOUNTPOINT}/
|
||||
docker_logs "${did}" || true
|
||||
docker_logs "${mdid}" || true
|
||||
docker_stop "${did}" || true
|
||||
docker_stop "${mdid}" || true
|
||||
print_h2 "Run mysqldump-secure"
|
||||
if ! docker_exec "${name}" "mysqldump-secure -vv"; then
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run "ls -lap ${MOUNTPOINT}/mysql/ | grep -E 'mysql\.sql\.gz'"
|
||||
run "ls -lap ${MOUNTPOINT}/mysql/ | grep -E 'mysql\.sql\.gz\.info'"
|
||||
|
||||
docker_stop "${did}"
|
||||
docker_stop "${mdid}"
|
||||
print_h2 "Test backup directory"
|
||||
if ! run "test -d ${MOUNTPOINT}/mysql"; then
|
||||
echo "MySQL backup dir does not exist: ${MOUNTPOINT}/mysql"
|
||||
ls -lap "${MOUNTPOINT}/"
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_h2 "Grep backup files"
|
||||
if ! run "ls -lap ${MOUNTPOINT}/mysql/ | grep -E 'mysql\.sql\.gz'"; then
|
||||
ls -lap "${MOUNTPOINT}/"
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_h2 "Grep info files"
|
||||
if ! run "ls -lap ${MOUNTPOINT}/mysql/ | grep -E 'mysql\.sql\.gz\.info'"; then
|
||||
ls -lap "${MOUNTPOINT}/"
|
||||
docker_logs "${name_mysql}" || true
|
||||
docker_logs "${name}" || true
|
||||
docker_stop "${name_mysql}" || true
|
||||
docker_stop "${name}" || true
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
print_h2 "Cleanup"
|
||||
docker_stop "${name_mysql}"
|
||||
docker_stop "${name}"
|
||||
rm -rf "${MOUNTPOINT}"
|
||||
|
||||
Reference in New Issue
Block a user