├── .github
└── workflows
│ ├── fitness-functions-release-8.2.yml
│ ├── fitness-functions-release-8.3.yml
│ ├── fitness-functions-release-8.1-ubuntu.yml
│ ├── fitness-functions-release-8.1.yml
│ ├── fitness-functions-release-8.2-ubuntu.yml
│ ├── fitness-functions-release-8.3-ubuntu.yml
│ ├── fitness-functions-release-8.4-ubuntu.yml
│ ├── fitness-functions-release-8.4.yml
│ ├── fitness-functions-release-8.2-zts.yml
│ ├── fitness-functions-release-8.4-zts.yml
│ ├── fitness-functions-release-8.3-zts.yml
│ └── security-scan.yml
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── LICENSE
└── README.md
/.github/workflows/fitness-functions-release-8.2.yml:
--------------------------------------------------------------------------------
1 | name: php 8.2 Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-alpine-is-latest-version:
13 | name: "Ensure that Alpine 3.20 is the latest alpine version"
14 | env:
15 | LATEST_ALPINE_RELEASE: "3.20.6"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm alpine:3.20 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.3.yml:
--------------------------------------------------------------------------------
1 | name: php 8.3 Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-alpine-is-latest-version:
13 | name: "Ensure that Alpine 3.20 is the latest alpine version"
14 | env:
15 | LATEST_ALPINE_RELEASE: "3.20.6"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm alpine:3.20 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.1-ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: php 8.1-ubuntu Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-ubuntu-is-latest-version:
13 | name: "Ensure that Ubuntu is the latest supported version"
14 | env:
15 | LATEST_UBUNTU_RELEASE: "24.04"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm ubuntu:latest cat /etc/os-release | grep $LATEST_UBUNTU_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.1.yml:
--------------------------------------------------------------------------------
1 | name: php 8.1 Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 | jobs:
11 | configured-release-8-1-alpine-is-latest-version:
12 | name: "Ensure that Alpine is the latest alpine version for release 8.1"
13 | env:
14 | LATEST_ALPINE_RELEASE: "3.19.7"
15 | runs-on: ubuntu-latest
16 | steps:
17 | - name: Execute
18 | run: >
19 | docker run --pull always --rm alpine:3.19 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
20 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.2-ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: php 8.2-ubuntu Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-ubuntu-is-latest-version:
13 | name: "Ensure that Ubuntu is the latest supported version"
14 | env:
15 | LATEST_UBUNTU_RELEASE: "24.04"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm ubuntu:latest cat /etc/os-release | grep $LATEST_UBUNTU_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.3-ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: php 8.3-ubuntu Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-ubuntu-is-latest-version:
13 | name: "Ensure that Ubuntu is the latest supported version"
14 | env:
15 | LATEST_UBUNTU_RELEASE: "24.04"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm ubuntu:latest cat /etc/os-release | grep $LATEST_UBUNTU_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.4-ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: php 8.4-ubuntu Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-ubuntu-is-latest-version:
13 | name: "Ensure that Ubuntu is the latest supported version"
14 | env:
15 | LATEST_UBUNTU_RELEASE: "24.04"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm ubuntu:latest cat /etc/os-release | grep $LATEST_UBUNTU_RELEASE
21 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.4.yml:
--------------------------------------------------------------------------------
1 | name: php 8.4 Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-alpine-is-latest-version:
13 | name: "Ensure that Alpine 3.21 is the latest alpine version"
14 | env:
15 | LATEST_ALPINE_RELEASE: "3.21.3"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --pull always --rm alpine:3.21 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
21 |
22 | php83-is-not-the-default-php-on-edge:
23 | name: "We need to symlink php84 until php 8.4 is the default php"
24 | runs-on: ubuntu-latest
25 | steps:
26 | - name: Execute
27 | run: >
28 | ! docker run --rm alpine:3.21 sh -c 'apk add -U php84 && php -v'
29 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.2-zts.yml:
--------------------------------------------------------------------------------
1 | name: php 8.2-zts Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 | jobs:
11 | configured-alpine-is-latest-version:
12 | name: "Ensure that Alpine is the latest alpine version"
13 | env:
14 | LATEST_ALPINE_RELEASE: "3.21.3"
15 | runs-on: ubuntu-latest
16 | steps:
17 | - name: Execute
18 | run: >
19 | docker run --rm alpine:3.21 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
20 |
21 | configured-go-version-is-required-one:
22 | name: "Ensure that Go 1.23 is the version required by frankenphp"
23 | runs-on: ubuntu-latest
24 | steps:
25 | - name: Execute
26 | run: >
27 | curl -sS https://github.com/dunglas/frankenphp/blob/main/go.mod | grep "go1.23"
28 |
29 | packages-not-available-on-alpine-for-release-8-2-zts:
30 | name: Package not available on alpine for php 8.2 zts in edge community, yet
31 | runs-on: ubuntu-latest
32 | strategy:
33 | matrix:
34 | package:
35 | - phpzts82
36 | - phpzts82-pecl-redis
37 | - phpzts82-pecl-memcached
38 | - phpzts82-pecl-msgpack
39 | - phpzts82-pecl-imagick
40 | - phpzts82-pecl-apcu
41 | - phpzts82-pecl-amqp
42 | - phpzts82-pecl-protobuf
43 | - phpzts82-pecl-grpc
44 | - phpzts82-pecl-pcov
45 | - phpzts82-pecl-xdebug
46 | steps:
47 | - name: Execute
48 | run: "! docker run --rm alpine:3.21 apk --no-cache search ${{ matrix.package }} | grep ${{ matrix.package }}"
49 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.4-zts.yml:
--------------------------------------------------------------------------------
1 | name: php 8.4-zts Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-alpine-is-latest-version:
13 | name: "Ensure that Alpine is the latest alpine version"
14 | env:
15 | LATEST_ALPINE_RELEASE: "3.21.3"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --rm alpine:3.21 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
21 |
22 | configured-go-version-is-required-one:
23 | name: "Ensure that Go 1.23 is the version required by frankenphp"
24 | runs-on: ubuntu-latest
25 | steps:
26 | - name: Execute
27 | run: >
28 | curl -sS https://github.com/dunglas/frankenphp/blob/main/go.mod | grep "go1.23"
29 |
30 | packages-not-available-on-alpine-for-release-8-4-zts:
31 | name: Package not available on alpine for php 8.4 zts 3.21 community, yet
32 | runs-on: ubuntu-latest
33 | strategy:
34 | matrix:
35 | package:
36 | - phpzts84
37 | - phpzts84-pecl-redis
38 | - phpzts84-pecl-memcached
39 | - phpzts84-pecl-msgpack
40 | - phpzts84-pecl-imagick
41 | - phpzts84-pecl-apcu
42 | - phpzts84-pecl-amqp
43 | - phpzts84-pecl-protobuf
44 | - phpzts84-pecl-grpc
45 | - phpzts84-pecl-pcov
46 | - phpzts84-pecl-xdebug
47 | steps:
48 | - name: Execute
49 | run: "! docker run --rm alpine:3.21 apk --no-cache search ${{ matrix.package }} | grep ${{ matrix.package }}"
50 |
--------------------------------------------------------------------------------
/.github/workflows/fitness-functions-release-8.3-zts.yml:
--------------------------------------------------------------------------------
1 | name: php 8.3-zts Fitness Functions
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 |
11 | jobs:
12 | configured-alpine-is-latest-version:
13 | name: "Ensure that Alpine is the latest alpine version"
14 | env:
15 | LATEST_ALPINE_RELEASE: "3.21.3"
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Execute
19 | run: >
20 | docker run --rm alpine:3.21 cat /etc/os-release | grep $LATEST_ALPINE_RELEASE
21 |
22 | configured-go-version-is-required-one:
23 | name: "Ensure that Go is the version required by frankenphp"
24 | runs-on: ubuntu-latest
25 | steps:
26 | - name: Execute
27 | run: >
28 | curl -sS https://github.com/dunglas/frankenphp/blob/v1.0.2/go.mod | grep "go 1.21"
29 |
30 | packages-not-available-on-alpine-for-release-8-3-zts:
31 | name: Package not available on alpine for php 8.3 zts in edge community, yet
32 | runs-on: ubuntu-latest
33 | strategy:
34 | matrix:
35 | package:
36 | - phpzts83
37 | - phpzts83-pecl-redis
38 | - phpzts83-pecl-memcached
39 | - phpzts83-pecl-msgpack
40 | - phpzts83-pecl-imagick
41 | - phpzts83-pecl-apcu
42 | - phpzts83-pecl-amqp
43 | - phpzts83-pecl-protobuf
44 | - phpzts83-pecl-grpc
45 | - phpzts83-pecl-pcov
46 | - phpzts83-pecl-xdebug
47 | steps:
48 | - name: Execute
49 | run: "! docker run --rm alpine:3.21 apk --no-cache search ${{ matrix.package }} | grep ${{ matrix.package }}"
50 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to docker-php
2 |
3 | We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
4 |
5 | - Reporting a bug
6 | - Discussing the current state of the code
7 | - Submitting a fix
8 | - Proposing new features
9 |
10 | ## We Develop with Github
11 |
12 | We use Github to host code, to track issues and feature requests, as well as accept pull requests.
13 |
14 | ## Pull Requests
15 |
16 | Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
17 |
18 | 1. Fork the repo and create your branch from respective `release/*` branch.
19 | 2. If you've added code that should be tested, add tests.
20 | 6. Issue that pull request!
21 |
22 | Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
23 |
24 | $ git commit -m "A brief summary of the commit
25 | >
26 | > A paragraph describing what changed and its impact."
27 |
28 |
29 | ## Any contributions you make will be under the Apache 2.0 Software License
30 |
31 | When you submit code changes, your submissions are understood to be under the same [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) that covers the project. Feel free to contact the maintainers at [opensource@endava.com](opensource@endava.com) if that's a concern.
32 |
33 | ## Report bugs using Github's issues
34 |
35 | We use Github issues to track public bugs. Report a bug by [opening a new issue]().
36 |
37 | ## Write bug reports with detail, background, and sample code
38 |
39 | **Great Bug Reports** tend to have:
40 |
41 | - A quick summary and/or background
42 | - Steps to reproduce
43 | - Be specific!
44 | - Give sample code if you can
45 | - What you expected would happen
46 | - What actually happens
47 | - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
48 |
49 | ## Use a Consistent Coding Style
50 |
51 | We use [Hadolint](https://github.com/hadolint/hadolint) for Dockerfile linting.
52 |
53 | And also please consider to:
54 | - run a ```hadolint Dockerfile``` to check for code quality violations
55 |
56 | ## Snippets for Special Case: Build pecl package manually and fitness function check for availability
57 |
58 | If you need to build (e.g. pecl amqp) manually, because the package does not exist yet in packages, you have to do two things:
59 |
60 | 1. add the fitness function at e.g. [.github/workflows/fitness-functions-release-8.4.yml](.github/workflows/fitness-functions-release-8.4.yml) a section for this (the example is for alpine:3.21 and the package php84-pecl-amqp)
61 |
62 | ```yaml
63 | packages-not-available-on-alpine-for-community-release-8-4:
64 | name: Package not available on alpine for php 8.4 in community, yet
65 | runs-on: ubuntu-latest
66 | strategy:
67 | matrix:
68 | package:
69 | - php84-pecl-amqp
70 | steps:
71 | - name: Execute
72 | run: "! docker run --rm alpine:3.21 apk --no-cache search ${{ matrix.package }} | grep ${{ matrix.package }}"
73 | packages-not-available-on-alpine-testing-for-release-8-4:
74 | name: Package not available on alpine 3.21 for php 8.4, yet
75 | runs-on: ubuntu-latest
76 | strategy:
77 | matrix:
78 | package:
79 | - php84-pecl-amqp
80 | steps:
81 | - name: Execute
82 | run: "! docker run --rm alpine:3.21 apk --no-cache search ${{ matrix.package }} | grep ${{ matrix.package }}"
83 | ```
84 |
85 | 2. add the package like this in the Dockerfile at the respective part:
86 |
87 | ```Dockerfile
88 | # FIXME: RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-amqp
89 | RUN apk add --no-cache binutils build-base openssl-dev autoconf pcre2-dev automake libtool linux-headers rabbitmq-c-dev ${PHP_PACKAGE_BASENAME}-dev~=${PHP_VERSION} --virtual .build-deps \
90 | && MAKEFLAGS="-j $(nproc)" pecl84 install amqp \
91 | && strip --strip-all /usr/lib/$PHP_PACKAGE_BASENAME/modules/amqp.so \
92 | && echo "extension=amqp" > /etc/$PHP_PACKAGE_BASENAME/conf.d/40_amqp.ini \
93 | && apk del --no-network .build-deps \
94 | && apk add --no-cache rabbitmq-c
95 | ```
96 |
97 | And as soon as the fitness function fails - remove the "FIXME: " and remove the manual apk add command. That's it!
98 |
99 | ## License
100 | By contributing, you agree that your contributions will be licensed under Apache 2.0 License.
101 |
102 | ## References
103 | This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) and [https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62)
104 |
105 | # Code of Conduct
106 |
107 | Please refer to [Code of Conduct](CODE_OF_CONDUCT.md)
108 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8 |
9 | ## Our Standards
10 |
11 | Examples of behavior that contributes to a positive environment for our community include:
12 |
13 | * Demonstrating empathy and kindness toward other people
14 | * Being respectful of differing opinions, viewpoints, and experiences
15 | * Giving and gracefully accepting constructive feedback
16 | * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17 | * Focusing on what is best not just for us as individuals, but for the overall community
18 |
19 | Examples of unacceptable behavior include:
20 |
21 | * The use of sexualized language or imagery, and sexual attention or
22 | advances of any kind
23 | * Trolling, insulting or derogatory comments, and personal or political attacks
24 | * Public or private harassment
25 | * Publishing others' private information, such as a physical or email
26 | address, without their explicit permission
27 | * Other conduct which could reasonably be considered inappropriate in a
28 | professional setting
29 |
30 | ## Enforcement Responsibilities
31 |
32 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33 |
34 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35 |
36 | ## Scope
37 |
38 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39 |
40 | ## Enforcement
41 |
42 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [opensource@endava.com](opensource@endava.com). All complaints will be reviewed and investigated promptly and fairly.
43 |
44 | All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45 |
46 | ## Enforcement Guidelines
47 |
48 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49 |
50 | ### 1. Correction
51 |
52 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53 |
54 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55 |
56 | ### 2. Warning
57 |
58 | **Community Impact**: A violation through a single incident or series of actions.
59 |
60 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61 |
62 | ### 3. Temporary Ban
63 |
64 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65 |
66 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67 |
68 | ### 4. Permanent Ban
69 |
70 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71 |
72 | **Consequence**: A permanent ban from any sort of public interaction within the community.
73 |
74 | ## Attribution
75 |
76 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78 |
79 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80 |
81 | [homepage]: https://www.contributor-covenant.org
82 |
83 | For answers to common questions about this code of conduct, see the FAQ at
84 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
85 |
--------------------------------------------------------------------------------
/.github/workflows/security-scan.yml:
--------------------------------------------------------------------------------
1 | name: Security Scan
2 |
3 | on:
4 | push:
5 | branches:
6 | - 'main'
7 | schedule:
8 | - cron: '15 10 * * *' # each day at 10:15 UTC
9 |
10 | jobs:
11 | security-scan:
12 | name: Security Scan
13 |
14 | runs-on: ubuntu-latest
15 |
16 | continue-on-error: false
17 |
18 | strategy:
19 | fail-fast: false
20 | matrix:
21 | branch-name:
22 | - 'release/8.0'
23 | - 'release/8.1'
24 | - 'release/8.1-ubuntu'
25 | - 'release/8.2'
26 | - 'release/8.2-zts'
27 | - 'release/8.2-ubuntu'
28 | - 'release/8.3'
29 | - 'release/8.3-zts'
30 | - 'release/8.3-ubuntu'
31 | - 'release/8.4'
32 | - 'release/8.4-ubuntu'
33 | - 'release/8.4-zts'
34 | steps:
35 | - name: "Checkout code"
36 | uses: actions/checkout@v3
37 | with:
38 | ref: ${{ matrix.branch-name }}
39 |
40 | - name: "ZTS_SUFFIX Env"
41 | run: echo "ZTS_SUFFIX=`echo '${{ matrix.branch-name }}' | grep zts > /dev/null && echo '-zts' || echo ''`" > $GITHUB_ENV
42 |
43 | - name: "UBUNTU_SUFFIX Env"
44 | run: echo "UBUNTU_SUFFIX=`echo '${{ matrix.branch-name }}' | grep ubuntu > /dev/null && echo '-ubuntu' || echo ''`" > $GITHUB_ENV
45 |
46 | - name: "PHP_VERSION Env"
47 | run: echo "PHP_VERSION=`grep "ARG PHP_VERSION" Dockerfile | cut -f 2 -d '"' | tr -d '_'`${{ env.ZTS_SUFFIX }}${{ env.UBUNTU_SUFFIX }}" > $GITHUB_ENV
48 |
49 | - name: "BRANCH_SHA Env"
50 | run: echo "BRANCH_SHA=`git rev-parse HEAD`" >> $GITHUB_ENV
51 |
52 | - name: Pull the image
53 | run: docker pull ghcr.io/endava/docker-php:${{ env.PHP_VERSION }}
54 |
55 | - name: Tag also with php:${{ env.PHP_VERSION }}
56 | run: docker tag ghcr.io/endava/docker-php:${{ env.PHP_VERSION }} php-${{ env.PHP_VERSION }}
57 |
58 | - name: "IMAGE_SIZE Env"
59 | run: echo "IMAGE_SIZE=`docker image save php-${{ env.PHP_VERSION }} | gzip | wc -c | numfmt --to=si`" > $GITHUB_ENV
60 |
61 | - run: wget "https://img.shields.io/static/v1.png?label=${{ env.PHP_VERSION }}&message=${{ env.IMAGE_SIZE }}&color=blue" -O size-status.png
62 |
63 | - name: Run Alpine Trivy vulnerability scanner
64 | uses: aquasecurity/trivy-action@0.24.0
65 | env:
66 | TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
67 | with:
68 | image-ref: php-${{ env.PHP_VERSION }}
69 | format: 'table'
70 | exit-code: '0' # we don't break the build if vulnerabilities are included!
71 | ignore-unfixed: true
72 | vuln-type: 'os,library'
73 | severity: 'CRITICAL,HIGH'
74 |
75 | - name: Run Alpine Trivy vulnerability scanner and create html file
76 | uses: aquasecurity/trivy-action@0.24.0
77 | env:
78 | TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
79 | with:
80 | image-ref: php-${{ env.PHP_VERSION }}
81 | format: 'template'
82 | template: '@/contrib/html.tpl'
83 | output: 'vulnerability-report.html'
84 |
85 | - name: Run Alpine Trivy vulnerability scanner and create html file
86 | uses: aquasecurity/trivy-action@0.24.0
87 | env:
88 | TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
89 | with:
90 | image-ref: php-${{ env.PHP_VERSION }}
91 | format: 'json'
92 | ignore-unfixed: true
93 | output: 'vulnerability-report.json'
94 |
95 | - name: "FIXED_VULNERABILITIES Env"
96 | run: echo "FIXED_VULNERABILITIES=`cat vulnerability-report.json | jq '.Results[0].Vulnerabilities | length'`" > $GITHUB_ENV
97 |
98 | - if: ${{ env.FIXED_VULNERABILITIES == '0' }}
99 | run: wget "https://img.shields.io/static/v1.png?label=vulnerabilites&message=0&color=green" -O vulnerability-status.png
100 |
101 | - if: ${{ env.FIXED_VULNERABILITIES != '0' }}
102 | run: wget "https://img.shields.io/static/v1.png?label=vulnerabilites&message=${{ env.FIXED_VULNERABILITIES }}&color=red" -O vulnerability-status.png
103 |
104 | - name: Run Alpine Trivy vulnerability scanner and upload to github security tab
105 | uses: aquasecurity/trivy-action@0.24.0
106 | env:
107 | TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
108 | with:
109 | image-ref: php-${{ env.PHP_VERSION }}
110 | format: 'sarif'
111 | output: 'trivy-results.sarif'
112 |
113 | - if: contains(github.ref, 'refs/heads/main')
114 | name: Upload Alpine Trivy scan results to GitHub Security tab
115 | uses: github/codeql-action/upload-sarif@v2
116 | with:
117 | ref: refs/heads/${{ matrix.branch-name }}
118 | sha: ${{ env.BRANCH_SHA }}
119 | sarif_file: 'trivy-results.sarif'
120 | - if: contains(github.ref, 'refs/heads/main')
121 | name: Run Snyk to check Docker images for vulnerabilities
122 | uses: snyk/actions/docker@master
123 | continue-on-error: true
124 | env:
125 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
126 | with:
127 | image: ghcr.io/endava/docker-php:${{ env.PHP_VERSION }}
128 | args: "--org=${{ secrets.SNYK_ORG }} --fail-on=upgradable --project-name=docker-php:${{ env.PHP_VERSION }} --target-reference=${{ env.PHP_VERSION }}"
129 | command: monitor
130 | - if: contains(github.ref, 'refs/heads/main')
131 | name: Upload vulnerability Report to Github Release Artifacts
132 | uses: softprops/action-gh-release@v1
133 | with:
134 | tag_name: ${{ env.PHP_VERSION }}
135 | append_body: true
136 | body: ""
137 | files: |
138 | vulnerability-report.html
139 | vulnerability-status.png
140 | size-status.png
141 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # endava/docker-php
2 |
3 | This is a docker php image is based on an alpine (and ubuntu) distribution including some tools and php extensions. You can find more details at the respective release pages on github.
4 |
5 | # Supported Versions
6 |
7 | | Version | Branch | Latest Release | Status | Vulnerability Report | Fitness Functions |
8 | | --- | --- | --- | --- | --- | --- |
9 | | **8.4** | [release/8.4](https://github.com/endava/docker-php/tree/release/8.4) | [![Size][size_84_badge]][release_84_link] | [![Build Status][github_actions_84_badge]][github_actions_84_link] | [![Security Report][security_report_84_badge]][security_report_84_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4.yml)
10 | | **8.3** | [release/8.3](https://github.com/endava/docker-php/tree/release/8.3) | [![Size][size_83_badge]][release_83_link] | [![Build Status][github_actions_83_badge]][github_actions_83_link] | [![Security Report][security_report_83_badge]][security_report_83_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3.yml)
11 | | **8.2** | [release/8.2](https://github.com/endava/docker-php/tree/release/8.2) | [![Size][size_82_badge]][release_82_link] | [![Build Status][github_actions_82_badge]][github_actions_82_link] | [![Security Report][security_report_82_badge]][security_report_82_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2.yml)
12 | | **8.1** | [release/8.1](https://github.com/endava/docker-php/tree/release/8.1) | [![Size][size_81_badge]][release_81_link] | [![Build Status][github_actions_81_badge]][github_actions_81_link] | [![Security Report][security_report_81_badge]][security_report_81_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.1.yml)
13 |
14 | [github_actions_84_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.4
15 | [github_actions_84_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4
16 | [release_84_link]: https://github.com/endava/docker-php/releases/tag/8.4.5
17 | [security_report_84_badge]: https://github.com/endava/docker-php/releases/download/8.4.5/vulnerability-status.png
18 | [security_report_84_link]: https://github.com/endava/docker-php/releases/download/8.4.5/vulnerability-report.html
19 | [size_84_badge]: https://github.com/endava/docker-php/releases/download/8.4.5/size-status.png
20 |
21 | [github_actions_83_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.3
22 | [github_actions_83_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3
23 | [release_83_link]: https://github.com/endava/docker-php/releases/tag/8.3.18
24 | [security_report_83_badge]: https://github.com/endava/docker-php/releases/download/8.3.18/vulnerability-status.png
25 | [security_report_83_link]: https://github.com/endava/docker-php/releases/download/8.3.18/vulnerability-report.html
26 | [size_83_badge]: https://github.com/endava/docker-php/releases/download/8.3.18/size-status.png
27 |
28 | [github_actions_82_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.2
29 | [github_actions_82_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2
30 | [release_82_link]: https://github.com/endava/docker-php/releases/tag/8.2.28
31 | [security_report_82_badge]: https://github.com/endava/docker-php/releases/download/8.2.28/vulnerability-status.png
32 | [security_report_82_link]: https://github.com/endava/docker-php/releases/download/8.2.28/vulnerability-report.html
33 | [size_82_badge]: https://github.com/endava/docker-php/releases/download/8.2.28/size-status.png
34 |
35 | [github_actions_81_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.1
36 | [github_actions_81_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.1
37 | [release_81_link]: https://github.com/endava/docker-php/releases/tag/8.1.32
38 | [security_report_81_badge]: https://github.com/endava/docker-php/releases/download/8.1.32/vulnerability-status.png
39 | [security_report_81_link]: https://github.com/endava/docker-php/releases/download/8.1.32/vulnerability-report.html
40 | [size_81_badge]: https://github.com/endava/docker-php/releases/download/8.1.32/size-status.png
41 |
42 |
43 | # Experimental Versions
44 |
45 |
46 | | Version | Branch | Latest Release | Status | Vulnerability Report | Fitness Functions |
47 | | --- | --- | --- | --- | --- | --- |
48 | | **8.4 (ZTS)** | [release/8.4-zts](https://github.com/endava/docker-php/tree/release/8.4-zts) | [![Size][size_84zts_badge]][release_84zts_link] | [![Build Status][github_actions_84zts_badge]][github_actions_84zts_link] | [![Security Report][security_report_84zts_badge]][security_report_84zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4-zts.yml)
49 | | **8.3 (ZTS)** | [release/8.3-zts](https://github.com/endava/docker-php/tree/release/8.3-zts) | [![Size][size_83zts_badge]][release_83zts_link] | [![Build Status][github_actions_83zts_badge]][github_actions_83zts_link] | [![Security Report][security_report_83zts_badge]][security_report_83zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3-zts.yml)
50 | | **8.2 (ZTS)** | [release/8.2-zts](https://github.com/endava/docker-php/tree/release/8.2-zts) | [![Size][size_82zts_badge]][release_82zts_link] | [![Build Status][github_actions_82zts_badge]][github_actions_82zts_link] | [![Security Report][security_report_82zts_badge]][security_report_82zts_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2-zts.yml)
51 | | **8.4 (Ubuntu)** | [release/8.4-ubuntu](https://github.com/endava/docker-php/tree/release/8.4-ubuntu) | [![Size][size_84ubuntu_badge]][release_84ubuntu_link] | [![Build Status][github_actions_84ubuntu_badge]][github_actions_84ubuntu_link] | [![Security Report][security_report_84ubuntu_badge]][security_report_84ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.4-ubuntu.yml)
52 | | **8.3 (Ubuntu)** | [release/8.3-ubuntu](https://github.com/endava/docker-php/tree/release/8.3-ubuntu) | [![Size][size_83ubuntu_badge]][release_83ubuntu_link] | [![Build Status][github_actions_83ubuntu_badge]][github_actions_83ubuntu_link] | [![Security Report][security_report_83ubuntu_badge]][security_report_83ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.3-ubuntu.yml)
53 | | **8.2 (Ubuntu)** | [release/8.2-ubuntu](https://github.com/endava/docker-php/tree/release/8.2-ubuntu) | [![Size][size_82ubuntu_badge]][release_82ubuntu_link] | [![Build Status][github_actions_82ubuntu_badge]][github_actions_82ubuntu_link] | [![Security Report][security_report_82ubuntu_badge]][security_report_82ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.2-ubuntu.yml)
54 | | **8.1 (Ubuntu)** | [release/8.1-ubuntu](https://github.com/endava/docker-php/tree/release/8.1-ubuntu) | [![Size][size_81ubuntu_badge]][release_81ubuntu_link] | [![Build Status][github_actions_81ubuntu_badge]][github_actions_81ubuntu_link] | [![Security Report][security_report_81ubuntu_badge]][security_report_81ubuntu_link] | [](https://github.com/Endava/docker-php/actions/workflows/fitness-functions-release-8.1-ubuntu.yml)
55 |
56 | [github_actions_81ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.1-ubuntu
57 | [github_actions_81ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.1-ubuntu
58 | [release_81ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.1.31-ubuntu
59 | [security_report_81ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/vulnerability-status.png
60 | [security_report_81ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/vulnerability-report.html
61 | [size_81ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.1.31-ubuntu/size-status.png
62 |
63 | [github_actions_82ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.2-ubuntu
64 | [github_actions_82ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2-ubuntu
65 | [release_82ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.2.27-ubuntu
66 | [security_report_82ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/vulnerability-status.png
67 | [security_report_82ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/vulnerability-report.html
68 | [size_82ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-ubuntu/size-status.png
69 |
70 | [github_actions_83ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.3-ubuntu
71 | [github_actions_83ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3-ubuntu
72 | [release_83ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.3.17-ubuntu
73 | [security_report_83ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/vulnerability-status.png
74 | [security_report_83ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/vulnerability-report.html
75 | [size_83ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-ubuntu/size-status.png
76 |
77 | [github_actions_84ubuntu_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.4-ubuntu
78 | [github_actions_84ubuntu_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4-ubuntu
79 | [release_84ubuntu_link]: https://github.com/endava/docker-php/releases/tag/8.4.4-ubuntu
80 | [security_report_84ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/vulnerability-status.png
81 | [security_report_84ubuntu_link]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/vulnerability-report.html
82 | [size_84ubuntu_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-ubuntu/size-status.png
83 |
84 | [github_actions_82zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.2-zts
85 | [github_actions_82zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.2-zts
86 | [release_82zts_link]: https://github.com/endava/docker-php/releases/tag/8.2.27-zts
87 | [security_report_82zts_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/vulnerability-status.png
88 | [security_report_82zts_link]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/vulnerability-report.html
89 | [size_82zts_badge]: https://github.com/endava/docker-php/releases/download/8.2.27-zts/size-status.png
90 |
91 | [github_actions_83zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.3-zts
92 | [github_actions_83zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.3-zts
93 | [release_83zts_link]: https://github.com/endava/docker-php/releases/tag/8.3.17-zts
94 | [security_report_83zts_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/vulnerability-status.png
95 | [security_report_83zts_link]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/vulnerability-report.html
96 | [size_83zts_badge]: https://github.com/endava/docker-php/releases/download/8.3.17-zts/size-status.png
97 |
98 | [github_actions_84zts_badge]: https://github.com/endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release/8.4-zts
99 | [github_actions_84zts_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.4-zts
100 | [release_84zts_link]: https://github.com/endava/docker-php/releases/tag/8.4.4-zts
101 | [security_report_84zts_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/vulnerability-status.png
102 | [security_report_84zts_link]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/vulnerability-report.html
103 | [size_84zts_badge]: https://github.com/endava/docker-php/releases/download/8.4.4-zts/size-status.png
104 |
105 | # Unsupported Versions
106 |
107 | Unsupported as of php's eol list at https://www.php.net/eol.php
108 |
109 | | Version | Branch | Latest Release | Status | Vulnerability Report |
110 | | --- | --- | --- | --- | --- |
111 | | **8.0** | [release/8.0](https://github.com/endava/docker-php/tree/release/8.0) | [![Size][size_80_badge]](https://github.com/endava/docker-php/releases/tag/8.0.30) | [![Build Status][github_actions_80_badge]][github_actions_80_link] | [![Security Report][security_report_80_badge]][security_report_80_link]
112 |
113 | [github_actions_80_badge]: https://github.com/Endava/docker-php/actions/workflows/ci.yml/badge.svg?branch=release%2F8.0
114 | [github_actions_80_link]: https://github.com/endava/docker-php/actions?query=branch%3Arelease%2F8.0
115 | [security_report_80_badge]: https://github.com/endava/docker-php/releases/download/8.0.30/vulnerability-status.png
116 | [security_report_80_link]: https://github.com/endava/docker-php/releases/download/8.0.30/vulnerability-report.html
117 | [size_80_badge]: https://github.com/endava/docker-php/releases/download/8.0.30/size-status.png
118 |
119 | # Overview
120 |
121 | This is the successor of the deprecated [exozet/php-fpm](https://hub.docker.com/r/exozet/php-fpm/) docker image. We collected ideas on how a new (including breaking changes) version of our heavily used php-fpm image could look like.
122 |
123 | We figured that our old approach had some disadvantages (it was a php-fpm build based on [official docker php images](https://hub.docker.com/_/php)):
124 |
125 | * it is based on a source build from php, so we could not use any packages from alpine/debian to speed up the build time
126 | * there are differences between the php package on debian/alpine
127 | * there is no official alpine apache2 build
128 | * we cannot add nginx unit to alpine build, as it lacks php embed SAPI [comment on php!1355](https://github.com/docker-library/php/pull/1355#issuecomment-1352087633)
129 | * the non-alpine image has lots of (fixable) CVEs, we cannot fix (e.g. trivy image --ignore-unfixed php:8.1.13-fpm-buster says: Total: 23)
130 | * depends on what the docker library team thinks fits into a docker image for php, it is not the php team releasing it
131 |
132 | The new approach has some advantages:
133 |
134 | * It uses the latest package distributed by alpine team/community (which is pretty fast when it comes to security updates - 1 or 2 days after release) and official ubuntu packages
135 | * The precompiled packages (e.g. xdebug) are very fast installed
136 | * No need for custom scripts like [docker-php-ext-install](https://github.com/docker-library/php/blob/master/docker-php-ext-install)
137 | * It ships with httpd binary (for apache2), unitd binary (for nginx unit) and php-fpm binary (for php fpm) to execute php web requests
138 | * For apache2 and nginx unit variants an external webserver (like nginx) is not necessary anymore
139 | * It ships linux/arm64/v8 and linux/amd64 version of the image
140 | * The web server and the web requests are executed as non-privileged user www-data
141 | * The github release notes (including tool versions and php extension versions) is automatically generated if a commit is tagged
142 | * The release is available only as endava/php:8.1.16 (no suffix for -root, -xdebug -alpine or -sudo or others)
143 | * The CI/CD pipeline includes tests to validate the image as nginx unit or apache2 delivery
144 | * The CI/CD pipeline only builds the latest version (if necessary we can git checkout -b 8.1.13 if you really want to fix something in a release)
145 |
146 | The new approach has a disadvantage:
147 |
148 | * We depend on the release of php packages at alpine and ubuntu (e.g. on 2023/01/03 the php82 was not officially packaged on alpine including nginx unit - so we cannot support it. at the same time it is available as docker image on official docker php). If the packaged package version number is not available on alpine anymore - we cannot recreate the docker image (we have a workaround to build older apk's for it - takes more time, but is 100% viable solution!)
149 |
150 |
151 |
152 | # Contributing
153 | Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
154 |
155 | # License
156 | Please refer to [LICENSE](LICENSE).
157 |
158 |
--------------------------------------------------------------------------------