diff --git a/.github/markdown-link-check-config.json b/.github/markdown-link-check-config.json new file mode 100644 index 0000000..87ffcd7 --- /dev/null +++ b/.github/markdown-link-check-config.json @@ -0,0 +1,17 @@ +{ + "ignorePatterns": [ + { + "pattern": "^https://github.com/.*/pull/new/" + }, + { + "pattern": "^http://localhost" + }, + { + "pattern": "^https://sumguy.com" + } + ], + "timeout": "20s", + "retryOn429": true, + "retryCount": 3, + "aliveStatusCodes": [200, 206] +} diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index b65151b..405415d 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -4,9 +4,19 @@ on: push: branches: - '**' + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE' + - '.gitignore' pull_request: branches: - '**' + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE' + - '.gitignore' schedule: - cron: '0 3 * * 2' # Weekly on Tuesday at 3:00 AM UTC workflow_dispatch: @@ -22,7 +32,7 @@ jobs: fail-fast: false matrix: variant: [v1, v2] - php-version: ['8.3', '8.2'] + php-version: ['8.4', '8.3', '8.2'] php-type: [fpm, cli] php-base: [alpine, bookworm] exclude: @@ -224,7 +234,7 @@ jobs: fail-fast: false matrix: variant: [v1, v2] - php-version: ['8.3', '8.2'] + php-version: ['8.4', '8.3', '8.2'] php-type: [fpm, cli, apache] php-base: [alpine, bookworm] exclude: diff --git a/.github/workflows/docker-image.v1.yml b/.github/workflows/docker-image.v1.yml index c4ee791..1d6c62a 100644 --- a/.github/workflows/docker-image.v1.yml +++ b/.github/workflows/docker-image.v1.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: php-type: [cli, fpm, apache] - php-version: ['8.3', '8.2'] + php-version: ['8.4', '8.3', '8.2'] php-base-os: [bookworm, alpine] exclude: - php-type: apache diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml new file mode 100644 index 0000000..92958d7 --- /dev/null +++ b/.github/workflows/docs-ci.yml @@ -0,0 +1,82 @@ +name: Documentation CI + +on: + push: + branches: + - '**' + paths: + - '**.md' + - 'docs/**' + pull_request: + branches: + - '**' + paths: + - '**.md' + - 'docs/**' + workflow_dispatch: + +concurrency: + group: docs-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + markdown-lint: + runs-on: ubuntu-latest + name: Markdown Lint + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint Markdown files + uses: DavidAnson/markdownlint-cli2-action@v16 + with: + globs: | + **/*.md + !node_modules + !.github + + - name: Summary + run: | + echo "✅ Markdown linting passed" + + link-checker: + runs-on: ubuntu-latest + name: Check Links + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check links in markdown files + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + config-file: '.github/markdown-link-check-config.json' + check-modified-files-only: 'yes' + base-branch: 'main' + + - name: Summary + if: success() + run: | + echo "✅ Link checking passed" + + docs-summary: + runs-on: ubuntu-latest + name: Docs CI Summary + needs: [markdown-lint, link-checker] + if: always() + + steps: + - name: Check job results + run: | + if [ "${{ needs.markdown-lint.result }}" = "success" ] && [ "${{ needs.link-checker.result }}" = "success" ]; then + echo "✅ All documentation checks passed" + exit 0 + elif [ "${{ needs.link-checker.result }}" = "failure" ]; then + echo "⚠️ Link checker failed (non-blocking)" + exit 0 + else + echo "❌ Documentation checks failed" + exit 1 + fi diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..aab3b66 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,10 @@ +{ + "default": true, + "MD013": false, + "MD033": false, + "MD041": false, + "MD022": false, + "MD032": false, + "MD040": false, + "MD031": false +} diff --git a/README.md b/README.md index 7ad07cb..910db01 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ See [v1 vs v2 comparison](#v1-vs-v2-comparison) below for details. ## Features - **Multi-Architecture Support**: Works on `amd64`, `arm64/aarch64` and `arm32v7/armhf` platforms -- **Multiple PHP Versions**: PHP 8.2 and 8.3 (actively built); PHP 7, 8 and 8.1 deprecated +- **Multiple PHP Versions**: PHP 8.2, 8.3, and 8.4 (actively built); PHP 7.x, 8.0, and 8.1 deprecated - **Multiple Server Types**: CLI, FPM, and Apache - **Base OS Options**: Alpine (lightweight) and Debian (Bookworm/Bullseye) - **Extensive Extensions**: 30+ PHP extensions pre-installed @@ -65,7 +65,7 @@ The following environment variables can be overridden when running containers: | `PHP_OPCACHE_MAX_ACCELERATED_FILES` | `10000` | OPCache maximum number of files | | `PHP_OPCACHE_REVALIDATE_FREQ` | `0` | How often to check script timestamps | -### Example usage: +### Example usage ```bash docker run -e PHP_MEMORY_LIMIT=512M -e PHP_MAX_EXECUTION_TIME=600 kingpin/php-docker:8.3-fpm-alpine @@ -311,6 +311,11 @@ Both v1 and v2 variants are available for all combinations below: | PHP Version | Type | OS | v1 Tag Example | v2 Tag Example | |-------------|--------|-----------|------------------------|----------------------------| +| 8.4 | CLI | Alpine | `8.4-cli-alpine` | `8.4-cli-alpine-v2` | +| 8.4 | CLI | Bookworm | `8.4-cli-bookworm` | `8.4-cli-bookworm-v2` | +| 8.4 | FPM | Alpine | `8.4-fpm-alpine` | `8.4-fpm-alpine-v2` | +| 8.4 | FPM | Bookworm | `8.4-fpm-bookworm` | `8.4-fpm-bookworm-v2` | +| 8.4 | Apache | Bookworm | `8.4-apache-bookworm` | `8.4-apache-bookworm-v2` | | 8.3 | CLI | Alpine | `8.3-cli-alpine` | `8.3-cli-alpine-v2` | | 8.3 | CLI | Bookworm | `8.3-cli-bookworm` | `8.3-cli-bookworm-v2` | | 8.3 | FPM | Alpine | `8.3-fpm-alpine` | `8.3-fpm-alpine-v2` | @@ -322,7 +327,6 @@ Both v1 and v2 variants are available for all combinations below: | 8.2 | FPM | Bookworm | `8.2-fpm-bookworm` | `8.2-fpm-bookworm-v2` | | 8.2 | Apache | Bookworm | `8.2-apache-bookworm` | `8.2-apache-bookworm-v2` | - > **Note:** PHP 8.1+ images are built on Bookworm (Debian 12). Bullseye tags redirect to Bookworm for PHP 8.1+. ### Deprecated Tags (v1 only) @@ -344,7 +348,7 @@ The following tags are deprecated and will not be built going forward, but remai - `8.1-fpm-bullseye`, `8.1-fpm-bookworm`, `8.1-fpm-alpine` - `8.1-apache-bullseye`, `8.1-apache-bookworm` -> **Important:** These versions are deprecated. Please upgrade to PHP 8.2 or 8.3 for security and performance. +> **Important:** These versions are deprecated. Please upgrade to PHP 8.2, 8.3, or 8.4 for security and performance. ## 📊 Image Sizes diff --git a/docs/ci.md b/docs/ci.md index 20cb217..6d7a030 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -97,7 +97,7 @@ These run only via `workflow_dispatch` (manual trigger) and don't publish automa **Recommended settings for `main` branch:** 1. **Require pull request reviews**: At least 1 approval -2. **Require status checks**: +2. **Require status checks**: - `build-and-test` must pass - All matrix jobs must succeed 3. **Require branches to be up to date**: Enable diff --git a/docs/deprecated-images.md b/docs/deprecated-images.md index ef15b41..1643b5d 100644 --- a/docs/deprecated-images.md +++ b/docs/deprecated-images.md @@ -41,7 +41,7 @@ This document lists PHP versions that are **no longer actively built** but remai **Last Build**: January 2025 **Reason**: Focus maintenance on PHP 8.2+ for better resource allocation -#### Available Tags (Legacy) +#### Available Tags **Alpine-based:** - `8.1-cli-alpine` diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index cc671f5..7fc5c18 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -116,20 +116,20 @@ docker run -e PHP_OPCACHE_MEMORY_CONSUMPTION=256 \ kingpin/php-docker:8.3-fpm-alpine-v2 ``` -2. **Enable JIT (PHP 8.0+):** +1. **Enable JIT (PHP 8.0+):** ```ini # Create custom php.ini opcache.jit_buffer_size=100M opcache.jit=1255 ``` -3. **Use Alpine for smaller footprint:** +1. **Use Alpine for smaller footprint:** ```bash # Alpine is lighter than Bookworm docker pull kingpin/php-docker:8.3-fpm-alpine-v2 ``` -4. **Profile your code:** +1. **Profile your code:** ```bash # Install xdebug for profiling FROM kingpin/php-docker:8.3-fpm-alpine-v2 @@ -255,7 +255,7 @@ COPY s6-services/ /etc/services.d/ docker run --rm kingpin/php-docker:8.3-cli-alpine ping -c 3 db-host ``` -2. **Verify database host:** +1. **Verify database host:** ```yaml # Use service name in docker-compose services: @@ -266,7 +266,7 @@ services: image: mysql:8 ``` -3. **Check database is ready:** +1. **Check database is ready:** ```yaml services: php: