From 6363c894cd91830d5e9aa1c221d6ed05bbdcc629 Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Fri, 18 Oct 2024 16:44:20 +0200 Subject: [PATCH 1/7] SC-21584: Flow improvements + Security --- .github/compare-images.sh | 73 +++++++++++++ .github/workflows/ci.yml | 74 ++++++++++++- .../workflows/cleanup-old-docker-images.yml | 103 ++++++++++++++++++ ...ty.yml => ecr-scheduled-security-scan.yml} | 6 +- .github/workflows/trivy.yml | 23 ++++ .github/workflows/trufflehog.yml | 39 +++++++ ...tryvi-trufflehog-default-security-scan.yml | 99 +++++++++++++++++ .trivy/.trivyignore.yaml | 0 .trivy/trivy.yaml | 12 ++ README.md | 2 +- alpine/3.17/8.1/Dockerfile | 2 +- alpine/3.17/8.2/Dockerfile | 2 +- alpine/3.17/8.3/Dockerfile | 2 +- alpine/3.18/8.1/Dockerfile | 2 +- alpine/3.18/8.2/Dockerfile | 2 +- alpine/3.18/8.3/Dockerfile | 2 +- alpine/3.19/8.1/Dockerfile | 2 +- alpine/3.19/8.2/Dockerfile | 2 +- alpine/3.19/8.3/Dockerfile | 2 +- alpine/3.20/8.1/Dockerfile | 2 +- alpine/3.20/8.2/Dockerfile | 2 +- alpine/3.20/8.3/Dockerfile | 2 +- debian/bullseye/8.0/Dockerfile | 2 +- debian/bullseye/8.1/Dockerfile | 2 +- debian/bullseye/8.2/Dockerfile | 2 +- debian/bullseye/8.3/Dockerfile | 2 +- 26 files changed, 438 insertions(+), 25 deletions(-) create mode 100755 .github/compare-images.sh create mode 100644 .github/workflows/cleanup-old-docker-images.yml rename .github/workflows/{security.yml => ecr-scheduled-security-scan.yml} (96%) create mode 100644 .github/workflows/trivy.yml create mode 100644 .github/workflows/trufflehog.yml create mode 100644 .github/workflows/tryvi-trufflehog-default-security-scan.yml create mode 100644 .trivy/.trivyignore.yaml create mode 100644 .trivy/trivy.yaml diff --git a/.github/compare-images.sh b/.github/compare-images.sh new file mode 100755 index 00000000..ba70859d --- /dev/null +++ b/.github/compare-images.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Error: No tag provided. Usage: ./compare-image.sh " + exit 1 +fi + +IMAGE_TAG=$1 + +if [[ "$IMAGE_TAG" == *"debian"* ]]; then + docker run -i --rm "$IMAGE_TAG" sh -s <<'EOF' + echo "=== Debian Version ===" + echo -n "Debian " && cat /etc/debian_version + + echo "" + echo "=== Installed PHP Extensions ===" + docker-php-source extract + for ext in `ls /usr/src/php/ext`; do + echo ' ' `php -r "if (extension_loaded('$ext' !== 'opcache' ? '$ext' : 'Zend OPcache')) { echo '[x] $ext'; } else { echo '[ ] $ext'; }"`; + done + + echo "" + echo "=== Disabled PHP Extensions ===" + for f in /usr/local/etc/php/disabled/*.ini; do + disabled=$(basename $f | sed -e 's/\.ini$//'); + echo " [ ] ${disabled} $(PHP_INI_SCAN_DIR=:/usr/local/etc/php/disabled php -r "echo phpversion('${disabled}');")"; + done + + echo "" + echo "=== PECL Extensions ===" + pear list -c pecl + + echo "" + echo "=== Composer Version ===" + composer -V + + echo "" + echo "=== Installed System Packages ===" + dpkg-query -W --showformat='${Package} ${Version}\n' | sort +EOF +else + docker run -i --rm "$IMAGE_TAG" sh -s <<'EOF' + echo "=== Alpine Version ===" + echo -n "Alpine " && cat /etc/alpine-release + + echo "" + echo "=== Installed PHP Extensions ===" + docker-php-source extract + for ext in `ls /usr/src/php/ext`; do + echo ' ' `php -r "if (extension_loaded('$ext' !== 'opcache' ? '$ext' : 'Zend OPcache')) { echo '[x] $ext'; } else { echo '[ ] $ext'; }"`; + done + + echo "" + echo "=== Disabled PHP Extensions ===" + for f in /usr/local/etc/php/disabled/*.ini; do + disabled=$(basename $f | sed -e 's/\.ini$//'); + echo " [ ] ${disabled} $(PHP_INI_SCAN_DIR=:/usr/local/etc/php/disabled php -r "echo phpversion('${disabled}');")"; + done + + echo "" + echo "=== PECL Extensions ===" + pear list -c pecl + + echo "" + echo "=== Composer Version ===" + composer -V + + echo "" + echo "=== Installed System Packages ===" + apk info -vv | sort +EOF +fi + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2240e367..ca47227d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,11 @@ -name: CI +name: CI/CD on: push +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -68,6 +72,7 @@ jobs: - image: "debian/bullseye/8.3/Dockerfile" tags: [ "spryker/php:8.3-debian" ] platforms: [ "linux/amd64", "linux/arm64" ] + steps: - name: Check out repository uses: actions/checkout@v3 @@ -76,10 +81,23 @@ jobs: - name: Get the previous commit hash id: previous_commit - if: ${{ github.ref == 'refs/heads/master' }} run: | - PREV_COMMIT_HASH=$(git rev-parse HEAD^1) - echo "PREV_COMMIT_HASH=$PREV_COMMIT_HASH" >> $GITHUB_ENV + if [ "${{ github.ref }}" == "refs/heads/master" ]; then + PREV_COMMIT_HASH=$(git rev-parse HEAD^1) + else + PREV_COMMIT_HASH=$(git rev-parse origin/master) + IMAGE_TAG="${{ matrix.tags[0] }}" + echo "Pulling image $IMAGE_TAG" + docker pull "$IMAGE_TAG" + + NEW_TAG="${IMAGE_TAG}-${PREV_COMMIT_HASH}" + echo "Re-tagging image to $NEW_TAG" + docker tag "$IMAGE_TAG" "$NEW_TAG" + + echo "Removing the pulled image $IMAGE_TAG" + docker rmi "$IMAGE_TAG" || true + fi + echo "PREV_COMMIT_HASH=$PREV_COMMIT_HASH" >> $GITHUB_ENV - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -111,6 +129,52 @@ jobs: uses: docker/build-push-action@v2 with: push: ${{ github.ref == 'refs/heads/master' }} + load: ${{ github.ref != 'refs/heads/master' }} file: ${{ matrix.image }} tags: ${{ join(matrix.tags) }} - platforms: ${{ join(matrix.platforms) }} + platforms: ${{ github.ref == 'refs/heads/master' && join(matrix.platforms) || 'linux/amd64' }} + + - name: Current image report + run: | + CURRENT_TAG=${{ matrix.tags[0] }} + bash .github/compare-images.sh $CURRENT_TAG > current-image-report.txt || true + cat current-image-report.txt + + - name: Previous image report + run: | + PREVIOUS_TAG="${{ matrix.tags[0] }}-${{ env.PREV_COMMIT_HASH }}" + bash .github/compare-images.sh $PREVIOUS_TAG > previous-image-report.txt || true + cat previous-image-report.txt + + - name: Run the diff + run: | + DIFF_OUTPUT=$(diff current-image-report.txt previous-image-report.txt | sed ':a;N;$!ba;s/\n/\\n/g' || true) + echo "$DIFF_OUTPUT" + + echo "DIFF_OUTPUT<> $GITHUB_ENV + echo "$DIFF_OUTPUT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Send Slack Notification + if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} + uses: slackapi/slack-github-action@v1.24.0 + with: + payload: | + { + "attachments": [ + { + "pretext": "Release changes for *spryker/php:${{ matrix.tags[0] }}*", + "color": "good", + "fields": [ + { + "title": "Image diff:", + "value": "${{ env.DIFF_OUTPUT }}", + "short": false + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/cleanup-old-docker-images.yml b/.github/workflows/cleanup-old-docker-images.yml new file mode 100644 index 00000000..3e55c214 --- /dev/null +++ b/.github/workflows/cleanup-old-docker-images.yml @@ -0,0 +1,103 @@ +name: Cleanup Old Docker Images > 6 months by the scheduler + +on: + push: + branches: + - master + +jobs: + cleanup: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: List Docker Hub images and delete ones matching the pattern + run: | + REPO="spryker/php" + curl -s "https://hub.docker.com/v2/repositories/${REPO}/tags?page_size=1000" > tags.json + TODAY=$(date +%s) + THRESHOLD=$((180 * 24 * 60 * 60)) # 180 days in seconds + + # Regex pattern to match tags that end with a hash (40-character hexadecimal) + HASH_PATTERN=".*-[a-f0-9]{40}$" + IMAGES_DELETED=false + DELETED_IMAGES="" + + for TAG in $(jq -r '.results[] | @base64' < tags.json); do + _jq() { + echo ${TAG} | base64 --decode | jq -r ${1} + } + + TAG_NAME=$(_jq '.name') + LAST_UPDATED=$(_jq '.last_updated') + LAST_UPDATED_DATE=$(date -d "${LAST_UPDATED}" +%s) + + AGE=$((TODAY - LAST_UPDATED_DATE)) + + if [[ ${AGE} -ge ${THRESHOLD} ]] && [[ ${TAG_NAME} =~ ${HASH_PATTERN} ]]; then + echo "Deleting image tag ${TAG_NAME} (last updated: ${LAST_UPDATED})" + IMAGES_DELETED=true + DELETED_IMAGES="${DELETED_IMAGES}\n${TAG_NAME}" + + # Uncomment the following lines to enable image deletion + curl -X DELETE \ + -u "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" \ + "https://hub.docker.com/v2/repositories/${REPO}/tags/${TAG_NAME}/" + fi + done + + if [[ ${IMAGES_DELETED} == false ]]; then + echo "No images found for deletion" > deleted_images.txt + else + echo -e "Deleted images: ${DELETED_IMAGES}" > deleted_images.txt + fi + + - name: Read Deleted Images + id: read_deleted_images + run: | + DELETED_IMAGES=$(cat deleted_images.txt) + echo "Deleted images: ${DELETED_IMAGES}" + echo "::set-output name=deleted_images::${DELETED_IMAGES}" + shell: bash + + - name: Send Slack Notification + uses: slackapi/slack-github-action@v1.24.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + payload: | + { + "attachments": [ + { + "pretext": "Outdated docker images cleanup (180 days) for *${{ github.repository }} repository*", + "color": "good", + "fields": [ + { + "title": "Images:", + "value": "${{ steps.read_deleted_images.outputs.deleted_images }}", + "short": false + }, + { + "title": "Branch:", + "value": "${{ github.ref }}", + "short": true + }, + { + "title": "Commit:", + "value": "${{ github.sha }}", + "short": true + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/security.yml b/.github/workflows/ecr-scheduled-security-scan.yml similarity index 96% rename from .github/workflows/security.yml rename to .github/workflows/ecr-scheduled-security-scan.yml index a4d55192..6ca01f82 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/ecr-scheduled-security-scan.yml @@ -1,10 +1,10 @@ -name: Vulnerability detection +name: ECR vulnerability detection on: schedule: - cron: '0 9 * * *' push: - branches-ignore: + branches: - master jobs: @@ -119,7 +119,7 @@ jobs: "text": "Scanned image tag *${{ matrix.tags }}*.", "attachments": [ { - "pretext": "Vulnerability scan outputs for ${{ steps.set-date.outputs.current_datetime }}", + "pretext": "ECR vulnerability scan outputs for ${{ steps.set-date.outputs.current_datetime }}", "color": "${{ steps.set-color.outputs.color }}", "fields": [ { diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml new file mode 100644 index 00000000..1ee799f2 --- /dev/null +++ b/.github/workflows/trivy.yml @@ -0,0 +1,23 @@ +name: Trivy secrets scan + +on: + push: + branches-ignore: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + trivy-secrets-scan: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Scan for secrets in repository + uses: aquasecurity/trivy-action@0.28.0 + with: + scan-type: 'fs' + trivy-config: .trivy/trivy.yaml diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml new file mode 100644 index 00000000..c4be3c77 --- /dev/null +++ b/.github/workflows/trufflehog.yml @@ -0,0 +1,39 @@ +name: Trufflehog secrets scan + +on: + push: + branches-ignore: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + trufflehog-vulnerability-detection: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Display File Structure + run: | + echo "Displaying file structure..." + find . -type f + + - name: Secret Scanning + id: trufflehog_scan + uses: trufflesecurity/trufflehog@v3.82.8 + with: + path: ./ + base: "${{ github.event.repository.default_branch }}" + head: HEAD + extra_args: --debug + + - name: Check Trufflehog Result and Fail if Secrets Found + run: | + if [ "${{ steps.trufflehog_scan.outcome }}" == "failure" ]; then + echo "Secrets were found by Trufflehog!" + exit 1 # This will fail the workflow + fi diff --git a/.github/workflows/tryvi-trufflehog-default-security-scan.yml b/.github/workflows/tryvi-trufflehog-default-security-scan.yml new file mode 100644 index 00000000..7552ccee --- /dev/null +++ b/.github/workflows/tryvi-trufflehog-default-security-scan.yml @@ -0,0 +1,99 @@ +name: Build and Scan Docker Images with Trivy && Trufflehog + +on: + push: + branches-ignore: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-scan-images-for-vulnerabilities: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + ## Alpine + ### Alpine 3.17 + - context: "alpine/3.17/8.1" + dockerfile: "Dockerfile" + tags: "8.1-alpine3.17" + platforms: "linux/amd64" + - context: "alpine/3.17/8.2" + dockerfile: "Dockerfile" + tags: "8.2-alpine3.17" + platforms: "linux/amd64" + - context: "alpine/3.17/8.3" + dockerfile: "Dockerfile" + tags: "8.3-alpine3.17" + platforms: "linux/amd64" + + ### Alpine 3.18 + - context: "alpine/3.18/8.1" + dockerfile: "Dockerfile" + tags: "8.1-alpine3.18" + platforms: "linux/amd64" + - context: "alpine/3.18/8.2" + dockerfile: "Dockerfile" + tags: "8.2-alpine3.18" + platforms: "linux/amd64" + - context: "alpine/3.18/8.3" + dockerfile: "Dockerfile" + tags: "8.3-alpine3.18" + platforms: "linux/amd64" + + ### Alpine 3.19 + - context: "alpine/3.19/8.1" + dockerfile: "Dockerfile" + tags: "8.1-alpine3.19" + platforms: "linux/amd64" + - context: "alpine/3.19/8.2" + dockerfile: "Dockerfile" + tags: "8.2-alpine3.19" + platforms: "linux/amd64" + - context: "alpine/3.19/8.3" + dockerfile: "Dockerfile" + tags: "8.3-alpine3.19" + platforms: "linux/amd64" + + ### Alpine 3.20 + - context: "alpine/3.20/8.1" + dockerfile: "Dockerfile" + tags: "8.1-alpine3.20" + platforms: "linux/amd64" + - context: "alpine/3.20/8.2" + dockerfile: "Dockerfile" + tags: "8.2-alpine3.20" + platforms: "linux/amd64" + - context: "alpine/3.20/8.3" + dockerfile: "Dockerfile" + tags: "8.3-alpine3.20" + platforms: "linux/amd64" + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Build Docker image + run: | + docker build --platform ${{ matrix.platforms }} -t spryker/php:${{ matrix.tags }} -f ${{ matrix.context }}/${{ matrix.dockerfile }} . + + - name: Scan Docker image with Trufflehog + continue-on-error: false + run: | + docker run --rm trufflesecurity/trufflehog:latest docker --image spryker/php:${{ matrix.tags }} --only-verified + + - name: Scan Docker image with Trivy + uses: aquasecurity/trivy-action@0.28.0 + with: + image-ref: "spryker/php:${{ matrix.tags }}" + exit-code: '1' + severity: 'LOW,MEDIUM,HIGH,CRITICAL' + ignore-unfixed: true + + - name: Show scan result + run: | + echo "Trivy scan completed for spryker/php:${{ matrix.tags }}" diff --git a/.trivy/.trivyignore.yaml b/.trivy/.trivyignore.yaml new file mode 100644 index 00000000..e69de29b diff --git a/.trivy/trivy.yaml b/.trivy/trivy.yaml new file mode 100644 index 00000000..22afc777 --- /dev/null +++ b/.trivy/trivy.yaml @@ -0,0 +1,12 @@ +scan: + scanners: + - secret +severity: + - UNKNOWN + - LOW + - MEDIUM + - HIGH + - CRITICAL +exit-code: 1 +#ignorefile: .trivy/.trivyignore.yaml +debug: true \ No newline at end of file diff --git a/README.md b/README.md index d746fc9e..ea79a8f6 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Disabled extensions ==================== [ ] amqp 2.1.2 [ ] blackfire 1.87.1~linux-musl-x64-non_zts82 - [ ] newrelic 10.22.0.12 + [ ] newrelic 11.2.0.15 [ ] pcov 1.0.11 [ ] tideways 5.5.14 [ ] xhprof 2.3.10 diff --git a/alpine/3.17/8.1/Dockerfile b/alpine/3.17/8.1/Dockerfile index 3806040c..232c7a67 100644 --- a/alpine/3.17/8.1/Dockerfile +++ b/alpine/3.17/8.1/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.1 diff --git a/alpine/3.17/8.2/Dockerfile b/alpine/3.17/8.2/Dockerfile index 28f648da..ec93f8b3 100644 --- a/alpine/3.17/8.2/Dockerfile +++ b/alpine/3.17/8.2/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.2 diff --git a/alpine/3.17/8.3/Dockerfile b/alpine/3.17/8.3/Dockerfile index 39d49e88..8e4e0102 100644 --- a/alpine/3.17/8.3/Dockerfile +++ b/alpine/3.17/8.3/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 ARG TIDEWAYS_PHP_VERSION=8.3 diff --git a/alpine/3.18/8.1/Dockerfile b/alpine/3.18/8.1/Dockerfile index 89052c75..d0569d36 100644 --- a/alpine/3.18/8.1/Dockerfile +++ b/alpine/3.18/8.1/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.1 diff --git a/alpine/3.18/8.2/Dockerfile b/alpine/3.18/8.2/Dockerfile index e3e6e261..2cffcd9a 100644 --- a/alpine/3.18/8.2/Dockerfile +++ b/alpine/3.18/8.2/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.2 diff --git a/alpine/3.18/8.3/Dockerfile b/alpine/3.18/8.3/Dockerfile index 649acded..568277a8 100644 --- a/alpine/3.18/8.3/Dockerfile +++ b/alpine/3.18/8.3/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 ARG TIDEWAYS_PHP_VERSION=8.3 diff --git a/alpine/3.19/8.1/Dockerfile b/alpine/3.19/8.1/Dockerfile index 141fc9cb..95fe084b 100644 --- a/alpine/3.19/8.1/Dockerfile +++ b/alpine/3.19/8.1/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.1 diff --git a/alpine/3.19/8.2/Dockerfile b/alpine/3.19/8.2/Dockerfile index 076bb312..89b1f570 100644 --- a/alpine/3.19/8.2/Dockerfile +++ b/alpine/3.19/8.2/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.2 diff --git a/alpine/3.19/8.3/Dockerfile b/alpine/3.19/8.3/Dockerfile index 29f490f2..d2a5cbd5 100644 --- a/alpine/3.19/8.3/Dockerfile +++ b/alpine/3.19/8.3/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 ARG TIDEWAYS_PHP_VERSION=8.3 diff --git a/alpine/3.20/8.1/Dockerfile b/alpine/3.20/8.1/Dockerfile index 323c7fc2..ca1ef760 100644 --- a/alpine/3.20/8.1/Dockerfile +++ b/alpine/3.20/8.1/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.1 diff --git a/alpine/3.20/8.2/Dockerfile b/alpine/3.20/8.2/Dockerfile index b3a3db03..c949d75a 100644 --- a/alpine/3.20/8.2/Dockerfile +++ b/alpine/3.20/8.2/Dockerfile @@ -6,7 +6,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.2 diff --git a/alpine/3.20/8.3/Dockerfile b/alpine/3.20/8.3/Dockerfile index 6adeda72..9e837b5c 100644 --- a/alpine/3.20/8.3/Dockerfile +++ b/alpine/3.20/8.3/Dockerfile @@ -6,7 +6,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 ARG TIDEWAYS_PHP_VERSION=8.3 diff --git a/debian/bullseye/8.0/Dockerfile b/debian/bullseye/8.0/Dockerfile index cde06f5f..69107230 100644 --- a/debian/bullseye/8.0/Dockerfile +++ b/debian/bullseye/8.0/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=80 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.8 ARG TIDEWAYS_PHP_VERSION=8.0 ARG GOLANG_VERSION=1.20.3 diff --git a/debian/bullseye/8.1/Dockerfile b/debian/bullseye/8.1/Dockerfile index 9b0dfd2b..7023eccc 100644 --- a/debian/bullseye/8.1/Dockerfile +++ b/debian/bullseye/8.1/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.8 ARG TIDEWAYS_PHP_VERSION=8.1 ARG GOLANG_VERSION=1.20.3 diff --git a/debian/bullseye/8.2/Dockerfile b/debian/bullseye/8.2/Dockerfile index 05b060fc..5dd008d6 100644 --- a/debian/bullseye/8.2/Dockerfile +++ b/debian/bullseye/8.2/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.5.14 ARG TIDEWAYS_PHP_VERSION=8.2 ARG GOLANG_VERSION=1.20.3 diff --git a/debian/bullseye/8.3/Dockerfile b/debian/bullseye/8.3/Dockerfile index f546eae8..c939630d 100644 --- a/debian/bullseye/8.3/Dockerfile +++ b/debian/bullseye/8.3/Dockerfile @@ -7,7 +7,7 @@ ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 ARG BLACKFIRE_VERSION=1.87.1 ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=10.22.0.12 +ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 ARG TIDEWAYS_PHP_VERSION=8.3 ARG GOLANG_VERSION=1.20.3 From e0ec2eeaa4553ab35e0671a8660473abc696cc3c Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Tue, 19 Nov 2024 17:47:59 +0100 Subject: [PATCH 2/7] Remove Alpine 3.17 + Updated php to the latest + Fixed Blackifre issue --- .github/workflows/ci.yml | 11 - .../workflows/ecr-scheduled-security-scan.yml | 11 - ...tryvi-trufflehog-default-security-scan.yml | 14 -- README.md | 25 +-- alpine/.DS_Store | Bin 6148 -> 6148 bytes alpine/3.17/8.1/Dockerfile | 188 ------------------ alpine/3.17/8.2/Dockerfile | 188 ------------------ alpine/3.17/8.3/Dockerfile | 188 ------------------ alpine/3.18/8.3/Dockerfile | 2 +- alpine/3.19/8.2/Dockerfile | 2 +- alpine/3.19/8.3/Dockerfile | 4 +- alpine/3.20/8.2/Dockerfile | 2 +- alpine/3.20/8.3/Dockerfile | 86 ++++---- debian/bullseye/8.2/Dockerfile | 2 +- debian/bullseye/8.3/Dockerfile | 4 +- 15 files changed, 62 insertions(+), 665 deletions(-) delete mode 100644 alpine/3.17/8.1/Dockerfile delete mode 100644 alpine/3.17/8.2/Dockerfile delete mode 100644 alpine/3.17/8.3/Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca47227d..5e091786 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,17 +14,6 @@ jobs: matrix: include: ## Alpine - ### Alpine 3.17 - - image: "alpine/3.17/8.1/Dockerfile" - tags: [ "spryker/php:8.1-alpine3.17" ] - platforms: [ "linux/amd64", "linux/arm64" ] - - image: "alpine/3.17/8.2/Dockerfile" - tags: [ "spryker/php:8.2-alpine3.17" ] - platforms: [ "linux/amd64", "linux/arm64" ] - - image: "alpine/3.17/8.3/Dockerfile" - tags: [ "spryker/php:8.3-alpine3.17" ] - platforms: [ "linux/amd64", "linux/arm64" ] - ### Alpine 3.18 - image: "alpine/3.18/8.1/Dockerfile" tags: [ "spryker/php:8.1-alpine3.18" ] diff --git a/.github/workflows/ecr-scheduled-security-scan.yml b/.github/workflows/ecr-scheduled-security-scan.yml index 6ca01f82..a9c2676f 100644 --- a/.github/workflows/ecr-scheduled-security-scan.yml +++ b/.github/workflows/ecr-scheduled-security-scan.yml @@ -15,17 +15,6 @@ jobs: matrix: include: ## Alpine - ### Alpine 3.17 - - image: "alpine/3.17/8.1/Dockerfile" - tags: "8.1-alpine3.17" - platforms: "linux/amd64" - - image: "alpine/3.17/8.2/Dockerfile" - tags: "8.2-alpine3.17" - platforms: "linux/amd64" - - image: "alpine/3.17/8.3/Dockerfile" - tags: "8.3-alpine3.17" - platforms: "linux/amd64" - ### Alpine 3.18 - image: "alpine/3.18/8.1/Dockerfile" tags: "8.1-alpine3.18" diff --git a/.github/workflows/tryvi-trufflehog-default-security-scan.yml b/.github/workflows/tryvi-trufflehog-default-security-scan.yml index 7552ccee..fd2ca275 100644 --- a/.github/workflows/tryvi-trufflehog-default-security-scan.yml +++ b/.github/workflows/tryvi-trufflehog-default-security-scan.yml @@ -17,20 +17,6 @@ jobs: matrix: include: ## Alpine - ### Alpine 3.17 - - context: "alpine/3.17/8.1" - dockerfile: "Dockerfile" - tags: "8.1-alpine3.17" - platforms: "linux/amd64" - - context: "alpine/3.17/8.2" - dockerfile: "Dockerfile" - tags: "8.2-alpine3.17" - platforms: "linux/amd64" - - context: "alpine/3.17/8.3" - dockerfile: "Dockerfile" - tags: "8.3-alpine3.17" - platforms: "linux/amd64" - ### Alpine 3.18 - context: "alpine/3.18/8.1" dockerfile: "Dockerfile" diff --git a/README.md b/README.md index ea79a8f6..d8e70a37 100644 --- a/README.md +++ b/README.md @@ -30,24 +30,21 @@ Extends official PHP Docker images with extensions and tools to be able to run S | Tag | PHP version | Linux distribution | Details | Dockerfile | |:--------------------------------------------------------------------------------------------|:------------|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------| -| [spryker/php:latest](https://hub.docker.com/r/spryker/php/tags?name=latest) | 8.2.20 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:latest.svg)](https://microbadger.com/images/spryker/php:latest "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | -| [spryker/php:8.3](https://hub.docker.com/r/spryker/php/tags?name=8.3) | 8.3.12 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3.svg)](https://microbadger.com/images/spryker/php:8.3 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.3/Dockerfile) | -| [spryker/php:8.2](https://hub.docker.com/r/spryker/php/tags?name=8.2) | 8.2.24 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2.svg)](https://microbadger.com/images/spryker/php:8.2 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | +| [spryker/php:latest](https://hub.docker.com/r/spryker/php/tags?name=latest) | 8.2.25 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:latest.svg)](https://microbadger.com/images/spryker/php:latest "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | +| [spryker/php:8.3](https://hub.docker.com/r/spryker/php/tags?name=8.3) | 8.3.13 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3.svg)](https://microbadger.com/images/spryker/php:8.3 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.3/Dockerfile) | +| [spryker/php:8.2](https://hub.docker.com/r/spryker/php/tags?name=8.2) | 8.2.25 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2.svg)](https://microbadger.com/images/spryker/php:8.2 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | | [spryker/php:8.1](https://hub.docker.com/r/spryker/php/tags?name=8.1) | 8.1.30 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1.svg)](https://microbadger.com/images/spryker/php:8.1 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.1/Dockerfile) | -| [spryker/php:8.3-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.20) | 8.3.12 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.20.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.20 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.3/Dockerfile) | -| [spryker/php:8.2-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.20) | 8.2.24 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.20.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.20 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | +| [spryker/php:8.3-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.20) | 8.3.13 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.20.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.20 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.3/Dockerfile) | +| [spryker/php:8.2-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.20) | 8.2.25 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.20.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.20 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.2/Dockerfile) | | [spryker/php:8.1-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.20) | 8.1.30 | Alpine 3.20 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.20.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.20 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.20/8.1/Dockerfile) | -| [spryker/php:8.3-alpine3.19](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.19) | 8.3.12 | Alpine 3.19 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.19.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.19 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.19/8.3/Dockerfile) | -| [spryker/php:8.2-alpine3.19](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.19) | 8.2.24 | Alpine 3.19 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.19.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.19 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.19/8.2/Dockerfile) | +| [spryker/php:8.3-alpine3.19](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.19) | 8.3.13 | Alpine 3.19 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.19.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.19 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.19/8.3/Dockerfile) | +| [spryker/php:8.2-alpine3.19](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.19) | 8.2.25 | Alpine 3.19 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.19.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.19 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.19/8.2/Dockerfile) | | [spryker/php:8.1-alpine3.20](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.20) | 8.1.30 | Alpine 3.19 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.19.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.19 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.19/8.1/Dockerfile) | | [spryker/php:8.3-alpine3.18](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.18) | 8.3.7 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.18.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.18 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.3/Dockerfile) | | [spryker/php:8.2-alpine3.18](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.18) | 8.2.19 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.18.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.18 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.2/Dockerfile) | | [spryker/php:8.1-alpine3.18](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.18) | 8.1.28 | Alpine 3.18 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.18.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.18 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.18/8.1/Dockerfile) | -| [spryker/php:8.3-alpine3.17](https://hub.docker.com/r/spryker/php/tags?name=8.3-alpine3.17) | 8.3.0 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-alpine3.17.svg)](https://microbadger.com/images/spryker/php:8.3-alpine3.17 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.3/Dockerfile) | -| [spryker/php:8.2-alpine3.17](https://hub.docker.com/r/spryker/php/tags?name=8.2-alpine3.17) | 8.2.13 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-alpine3.17.svg)](https://microbadger.com/images/spryker/php:8.2-alpine3.17 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.17/8.2/Dockerfile) | -| [spryker/php:8.1-alpine3.17](https://hub.docker.com/r/spryker/php/tags?name=8.1-alpine3.17) | 8.1.26 | Alpine 3.17 | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-alpine3.17.svg)](https://microbadger.com/images/spryker/php:8.1-alpine3.17 "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/alpine/3.16/8.1/Dockerfile) | -| [spryker/php:8.3-debian](https://hub.docker.com/r/spryker/php/tags?name=8.3-debian) | 8.3.12 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-debian.svg)](https://microbadger.com/images/spryker/php:8.3-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.3/Dockerfile) | -| [spryker/php:8.2-debian](https://hub.docker.com/r/spryker/php/tags?name=8.2-debian) | 8.2.24 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-debian.svg)](https://microbadger.com/images/spryker/php:8.2-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.2/Dockerfile) | +| [spryker/php:8.3-debian](https://hub.docker.com/r/spryker/php/tags?name=8.3-debian) | 8.3.13 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.3-debian.svg)](https://microbadger.com/images/spryker/php:8.3-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.3/Dockerfile) | +| [spryker/php:8.2-debian](https://hub.docker.com/r/spryker/php/tags?name=8.2-debian) | 8.2.25 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.2-debian.svg)](https://microbadger.com/images/spryker/php:8.2-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.2/Dockerfile) | | [spryker/php:8.1-debian](https://hub.docker.com/r/spryker/php/tags?name=8.1-debian) | 8.1.30 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.1-debian.svg)](https://microbadger.com/images/spryker/php:8.1-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.1/Dockerfile) | | [spryker/php:8.0-debian](https://hub.docker.com/r/spryker/php/tags?name=8.0-debian) | 8.0.30 | Debian "bullseye" | [![](https://images.microbadger.com/badges/image/spryker/php:8.0-debian.svg)](https://microbadger.com/images/spryker/php:8.0-debian "Get your own image badge on microbadger.com") | [:link:](https://github.com/spryker/docker-php/blob/master/debian/bullseye/8.0/Dockerfile) | ## How to use @@ -178,7 +175,7 @@ Installed extensions Disabled extensions ==================== [ ] amqp 2.1.2 - [ ] blackfire 1.87.1~linux-musl-x64-non_zts82 + [ ] blackfire 1.92.28~linux-musl-x64-non_zts82 [ ] newrelic 11.2.0.15 [ ] pcov 1.0.11 [ ] tideways 5.5.14 @@ -196,7 +193,7 @@ xhprof 2.3.10 stable Composer ==================== -PHP version 8.2.24 (/usr/local/bin/php) +PHP version 8.2.25 (/usr/local/bin/php) Composer version 2.8.1 2024-10-04 11:31:01 ``` ##### Run the following to get the report diff --git a/alpine/.DS_Store b/alpine/.DS_Store index 5f473a8410ebfa520481427c66ea28a91a6eda8b..340ad9aae42fc6a1217a358a7c7a5ed15d5f3160 100644 GIT binary patch delta 338 zcmZoMXffEJ##HYZ#lXP8!eGpx$6&}{o}2IDl9ZF51Qg>~67_G5SLiWERQVLV@&y@& z!O8i#1wcJOkN_fJW?ST>Bg?rR0Lx8Y$|TIbxeaX7eps4nzkg}87kvoIUili(eb!X~d{mVz delta 338 zcmZoMXffEJ##FCu!oa}5!eGpx$6&}{o}2IDl9ZF51Qg@A|IgBHiNR4vRQVLV@&y@& z!O8i#1wcJO-~b|EW?ST>Bg^UYf#oJIWfEqWx9wbBl74jZekMsc`#zI2qr>FiOw#pw z&Pb+MBD-*R@5b(`9VjjY$|GEeO&+HUjTj72T?n;z@>FJFwl^C6F&zez*D*`MnCF;f U7#%i$WENwYSirWKo#QV*01)6&7ytkO diff --git a/alpine/3.17/8.1/Dockerfile b/alpine/3.17/8.1/Dockerfile deleted file mode 100644 index 232c7a67..00000000 --- a/alpine/3.17/8.1/Dockerfile +++ /dev/null @@ -1,188 +0,0 @@ -# syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.1.26 - -FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.17 - -ARG TARGETPLATFORM -ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 -ARG BLACKFIRE_PHP_VERSION=81 -ARG NEWRELIC_VERSION=11.2.0.15 -ARG TIDEWAYS_VERSION=5.5.14 -ARG TIDEWAYS_PHP_VERSION=8.1 - -ENV srcRoot /data - -RUN mkdir -p ${srcRoot} - -ARG PHP_RUN_DEPS="\ - freetype \ - gmp \ - gnu-libiconv \ - icu-libs \ - libbz2 \ - libc6-compat \ - libjpeg-turbo \ - libpng \ - libwebp \ - libxml2 \ - libxpm \ - libxslt \ - libzip \ - rabbitmq-c" - -ARG PHP_BUILD_DEPS="\ - autoconf \ - bzip2-dev \ - freetype-dev \ - gmp-dev \ - icu-dev \ - icu-data-full \ - libjpeg-turbo-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libzip-dev \ - postgresql-dev \ - rabbitmq-c-dev" - -ARG PHP_EXTENSIONS="\ - bcmath \ - bz2 \ - gd \ - gmp \ - intl \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - soap \ - sockets \ - zip" - -ARG PHP_PECL_EXTENSIONS="\ - apcu \ - redis" - -ARG ADDITIONAL_PHP_PECL_EXTENSIONS="\ - pcov \ - xdebug \ - xhprof \ - amqp" - -ARG CFLAGS="-I/usr/src/php" -RUN apk update \ - && apk upgrade \ - && apk add --no-cache \ - bash \ - coreutils \ - curl \ - g++ \ - git \ - graphviz \ - make \ - mysql-client \ - netcat-openbsd \ - openssh \ - postgresql-client \ - procps \ - python3 \ - shadow \ - unzip \ - linux-headers \ - ${PHP_RUN_DEPS} \ - && \ - apk add --no-cache --virtual .php-build-deps ${PHP_BUILD_DEPS} \ - && rm -rf /var/lib/apt/lists/ \ - && \ - docker-php-ext-configure gd \ - --disable-gd-jis-conv \ - --with-freetype=/usr \ - --with-jpeg=/usr \ - --with-webp=/usr \ - --with-xpm=/usr \ - && docker-php-ext-install -j5 ${PHP_EXTENSIONS} \ - && pecl install -o -f ${PHP_PECL_EXTENSIONS} ${ADDITIONAL_PHP_PECL_EXTENSIONS} \ - && rm -rf /tmp/pear \ - && docker-php-ext-enable ${PHP_EXTENSIONS} ${PHP_PECL_EXTENSIONS} \ - && apk del --no-cache .php-build-deps - -# Related to https://github.com/docker-library/php/issues/240 -ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so - -# Blackfire -ENV BLACKFIRE_AGENT_SOCKET='' -RUN architecture=$(case ${TARGETPLATFORM} in "linux/amd64") echo "amd64" ;; linux/arm64) echo "arm64" ;; *) echo "amd64" ;; esac) \ - && curl -A "Docker" -o /tmp/blackfire.so -D - -L -s https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_${architecture}-php-${BLACKFIRE_PHP_VERSION}.so \ - && mv /tmp/blackfire.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so - -# New Relic -ENV NEWRELIC_ENABLED=0 -ENV NEWRELIC_LICENSE='' -ENV NEWRELIC_APPNAME='Spryker' -ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 -ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 -ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 - -RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ - && export NR_INSTALL_USE_CP_NOT_LN=1 \ - && export NR_INSTALL_SILENT=1 \ - && /tmp/newrelic-php5-*/newrelic-install install \ - && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ - && /usr/bin/install -d -m 777 /var/log/newrelic/ \ - && rm /usr/local/etc/php/conf.d/newrelic.ini \ - && ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2' - -# Tideways -ENV TIDEWAYS_APIKEY='' -ENV TIDEWAYS_DAEMON_URI='' -ENV TIDEWAYS_CLI_ENABLED=0 -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -# Opcache -RUN /usr/bin/install -d -m 777 /var/run/opcache - -# Remove default FPM pool -RUN rm /usr/local/etc/php-fpm.d/www.conf && \ - rm /usr/local/etc/php-fpm.d/docker.conf && \ - rm /usr/local/etc/php-fpm.d/zz-docker.conf - -# Add FPM configs -COPY context/php/php-fpm.d/worker.conf /usr/local/etc/php-fpm.d/worker.conf -COPY context/php/php-fpm.conf /usr/local/etc/php-fpm.conf - -# Copy php.ini configuration -COPY context/php/php.ini /usr/local/etc/php/ -COPY context/php/conf.d/90-opcache.ini /usr/local/etc/php/conf.d/ -COPY context/php/conf.d/92-session.ini /usr/local/etc/php/conf.d/ -COPY context/php/disabled /usr/local/etc/php/disabled - -WORKDIR /data - -# Install composer -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} - -# Create application user 'spryker' -RUN addgroup spryker && \ - adduser -h /home/spryker -s /bin/sh -G www-data -D spryker && \ - chown spryker:spryker ${srcRoot} - -USER spryker -ENV COMPOSER_MEMORY_LIMIT=-1 -RUN mkdir -p /home/spryker/.composer -RUN bash -c '[[ $COMPOSER_VERSION == "1"* ]] && composer global require hirak/prestissimo && rm -rf /home/spryker/.composer/cache || true' - -USER root diff --git a/alpine/3.17/8.2/Dockerfile b/alpine/3.17/8.2/Dockerfile deleted file mode 100644 index ec93f8b3..00000000 --- a/alpine/3.17/8.2/Dockerfile +++ /dev/null @@ -1,188 +0,0 @@ -# syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.2.13 - -FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.17 - -ARG TARGETPLATFORM -ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 -ARG BLACKFIRE_PHP_VERSION=82 -ARG NEWRELIC_VERSION=11.2.0.15 -ARG TIDEWAYS_VERSION=5.5.14 -ARG TIDEWAYS_PHP_VERSION=8.2 - -ENV srcRoot /data - -RUN mkdir -p ${srcRoot} - -ARG PHP_RUN_DEPS="\ - freetype \ - gmp \ - gnu-libiconv \ - icu-libs \ - libbz2 \ - libc6-compat \ - libjpeg-turbo \ - libpng \ - libwebp \ - libxml2 \ - libxpm \ - libxslt \ - libzip \ - rabbitmq-c" - -ARG PHP_BUILD_DEPS="\ - autoconf \ - bzip2-dev \ - freetype-dev \ - gmp-dev \ - icu-dev \ - icu-data-full \ - libjpeg-turbo-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libzip-dev \ - postgresql-dev \ - rabbitmq-c-dev" - -ARG PHP_EXTENSIONS="\ - bcmath \ - bz2 \ - gd \ - gmp \ - intl \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - soap \ - sockets \ - zip" - -ARG PHP_PECL_EXTENSIONS="\ - apcu \ - redis" - -ARG ADDITIONAL_PHP_PECL_EXTENSIONS="\ - pcov \ - xdebug \ - xhprof \ - amqp" - -ARG CFLAGS="-I/usr/src/php" -RUN apk update \ - && apk upgrade \ - && apk add --no-cache \ - bash \ - coreutils \ - curl \ - g++ \ - git \ - graphviz \ - make \ - mysql-client \ - netcat-openbsd \ - openssh \ - postgresql-client \ - procps \ - python3 \ - shadow \ - unzip \ - linux-headers \ - ${PHP_RUN_DEPS} \ - && \ - apk add --no-cache --virtual .php-build-deps ${PHP_BUILD_DEPS} \ - && rm -rf /var/lib/apt/lists/ \ - && \ - docker-php-ext-configure gd \ - --disable-gd-jis-conv \ - --with-freetype=/usr \ - --with-jpeg=/usr \ - --with-webp=/usr \ - --with-xpm=/usr \ - && docker-php-ext-install -j5 ${PHP_EXTENSIONS} \ - && pecl install -o -f ${PHP_PECL_EXTENSIONS} ${ADDITIONAL_PHP_PECL_EXTENSIONS} \ - && rm -rf /tmp/pear \ - && docker-php-ext-enable ${PHP_EXTENSIONS} ${PHP_PECL_EXTENSIONS} \ - && apk del --no-cache .php-build-deps - -# Related to https://github.com/docker-library/php/issues/240 -ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so - -# Blackfire -ENV BLACKFIRE_AGENT_SOCKET='' -RUN architecture=$(case ${TARGETPLATFORM} in "linux/amd64") echo "amd64" ;; linux/arm64) echo "arm64" ;; *) echo "amd64" ;; esac) \ - && curl -A "Docker" -o /tmp/blackfire.so -D - -L -s https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_${architecture}-php-${BLACKFIRE_PHP_VERSION}.so \ - && mv /tmp/blackfire.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so - -# New Relic -ENV NEWRELIC_ENABLED=0 -ENV NEWRELIC_LICENSE='' -ENV NEWRELIC_APPNAME='Spryker' -ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 -ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 -ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 - -RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ - && export NR_INSTALL_USE_CP_NOT_LN=1 \ - && export NR_INSTALL_SILENT=1 \ - && /tmp/newrelic-php5-*/newrelic-install install \ - && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ - && /usr/bin/install -d -m 777 /var/log/newrelic/ \ - && rm /usr/local/etc/php/conf.d/newrelic.ini \ - && ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2' - -# Tideways -ENV TIDEWAYS_APIKEY='' -ENV TIDEWAYS_DAEMON_URI='' -ENV TIDEWAYS_CLI_ENABLED=0 -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -# Opcache -RUN /usr/bin/install -d -m 777 /var/run/opcache - -# Remove default FPM pool -RUN rm /usr/local/etc/php-fpm.d/www.conf && \ - rm /usr/local/etc/php-fpm.d/docker.conf && \ - rm /usr/local/etc/php-fpm.d/zz-docker.conf - -# Add FPM configs -COPY context/php/php-fpm.d/worker.conf /usr/local/etc/php-fpm.d/worker.conf -COPY context/php/php-fpm.conf /usr/local/etc/php-fpm.conf - -# Copy php.ini configuration -COPY context/php/php.ini /usr/local/etc/php/ -COPY context/php/conf.d/90-opcache.ini /usr/local/etc/php/conf.d/ -COPY context/php/conf.d/92-session.ini /usr/local/etc/php/conf.d/ -COPY context/php/disabled /usr/local/etc/php/disabled - -WORKDIR /data - -# Install composer -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} - -# Create application user 'spryker' -RUN addgroup spryker && \ - adduser -h /home/spryker -s /bin/sh -G www-data -D spryker && \ - chown spryker:spryker ${srcRoot} - -USER spryker -ENV COMPOSER_MEMORY_LIMIT=-1 -RUN mkdir -p /home/spryker/.composer -RUN bash -c '[[ $COMPOSER_VERSION == "1"* ]] && composer global require hirak/prestissimo && rm -rf /home/spryker/.composer/cache || true' - -USER root diff --git a/alpine/3.17/8.3/Dockerfile b/alpine/3.17/8.3/Dockerfile deleted file mode 100644 index 8e4e0102..00000000 --- a/alpine/3.17/8.3/Dockerfile +++ /dev/null @@ -1,188 +0,0 @@ -# syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.3 - -FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.17 - -ARG TARGETPLATFORM -ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 -ARG BLACKFIRE_PHP_VERSION=83 -ARG NEWRELIC_VERSION=11.2.0.15 -ARG TIDEWAYS_VERSION=5.6.4 -ARG TIDEWAYS_PHP_VERSION=8.3 - -ENV srcRoot /data - -RUN mkdir -p ${srcRoot} - -ARG PHP_RUN_DEPS="\ - freetype \ - gmp \ - gnu-libiconv \ - icu-libs \ - libbz2 \ - libc6-compat \ - libjpeg-turbo \ - libpng \ - libwebp \ - libxml2 \ - libxpm \ - libxslt \ - libzip \ - rabbitmq-c" - -ARG PHP_BUILD_DEPS="\ - autoconf \ - bzip2-dev \ - freetype-dev \ - gmp-dev \ - icu-dev \ - icu-data-full \ - libjpeg-turbo-dev \ - libpng-dev \ - libwebp-dev \ - libxml2-dev \ - libxpm-dev \ - libzip-dev \ - postgresql-dev \ - rabbitmq-c-dev" - -ARG PHP_EXTENSIONS="\ - bcmath \ - bz2 \ - gd \ - gmp \ - intl \ - mysqli \ - opcache \ - pcntl \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - soap \ - sockets \ - zip" - -ARG PHP_PECL_EXTENSIONS="\ - apcu \ - redis" - -ARG ADDITIONAL_PHP_PECL_EXTENSIONS="\ - pcov \ - xdebug \ - xhprof \ - amqp" - -ARG CFLAGS="-I/usr/src/php" -RUN apk update \ - && apk upgrade \ - && apk add --no-cache \ - bash \ - coreutils \ - curl \ - g++ \ - git \ - graphviz \ - make \ - mysql-client \ - netcat-openbsd \ - openssh \ - postgresql-client \ - procps \ - python3 \ - shadow \ - unzip \ - linux-headers \ - ${PHP_RUN_DEPS} \ - && \ - apk add --no-cache --virtual .php-build-deps ${PHP_BUILD_DEPS} \ - && rm -rf /var/lib/apt/lists/ \ - && \ - docker-php-ext-configure gd \ - --disable-gd-jis-conv \ - --with-freetype=/usr \ - --with-jpeg=/usr \ - --with-webp=/usr \ - --with-xpm=/usr \ - && docker-php-ext-install -j5 ${PHP_EXTENSIONS} \ - && pecl install -o -f ${PHP_PECL_EXTENSIONS} ${ADDITIONAL_PHP_PECL_EXTENSIONS} \ - && rm -rf /tmp/pear \ - && docker-php-ext-enable ${PHP_EXTENSIONS} ${PHP_PECL_EXTENSIONS} \ - && apk del --no-cache .php-build-deps - -# Related to https://github.com/docker-library/php/issues/240 -ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so - -# Blackfire -ENV BLACKFIRE_AGENT_SOCKET='' -RUN architecture=$(case ${TARGETPLATFORM} in "linux/amd64") echo "amd64" ;; linux/arm64) echo "arm64" ;; *) echo "amd64" ;; esac) \ - && curl -A "Docker" -o /tmp/blackfire.so -D - -L -s https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_${architecture}-php-${BLACKFIRE_PHP_VERSION}.so \ - && mv /tmp/blackfire.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so - -# New Relic -ENV NEWRELIC_ENABLED=0 -ENV NEWRELIC_LICENSE='' -ENV NEWRELIC_APPNAME='Spryker' -ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 -ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 -ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 - -RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ - && export NR_INSTALL_USE_CP_NOT_LN=1 \ - && export NR_INSTALL_SILENT=1 \ - && /tmp/newrelic-php5-*/newrelic-install install \ - && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ - && /usr/bin/install -d -m 777 /var/log/newrelic/ \ - && rm /usr/local/etc/php/conf.d/newrelic.ini \ - && ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2' - -# Tideways -ENV TIDEWAYS_APIKEY='' -ENV TIDEWAYS_DAEMON_URI='' -ENV TIDEWAYS_CLI_ENABLED=0 -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -# Opcache -RUN /usr/bin/install -d -m 777 /var/run/opcache - -# Remove default FPM pool -RUN rm /usr/local/etc/php-fpm.d/www.conf && \ - rm /usr/local/etc/php-fpm.d/docker.conf && \ - rm /usr/local/etc/php-fpm.d/zz-docker.conf - -# Add FPM configs -COPY context/php/php-fpm.d/worker.conf /usr/local/etc/php-fpm.d/worker.conf -COPY context/php/php-fpm.conf /usr/local/etc/php-fpm.conf - -# Copy php.ini configuration -COPY context/php/php.ini /usr/local/etc/php/ -COPY context/php/conf.d/90-opcache.ini /usr/local/etc/php/conf.d/ -COPY context/php/conf.d/92-session.ini /usr/local/etc/php/conf.d/ -COPY context/php/disabled /usr/local/etc/php/disabled - -WORKDIR /data - -# Install composer -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION} - -# Create application user 'spryker' -RUN addgroup spryker && \ - adduser -h /home/spryker -s /bin/sh -G www-data -D spryker && \ - chown spryker:spryker ${srcRoot} - -USER spryker -ENV COMPOSER_MEMORY_LIMIT=-1 -RUN mkdir -p /home/spryker/.composer -RUN bash -c '[[ $COMPOSER_VERSION == "1"* ]] && composer global require hirak/prestissimo && rm -rf /home/spryker/.composer/cache || true' - -USER root diff --git a/alpine/3.18/8.3/Dockerfile b/alpine/3.18/8.3/Dockerfile index 568277a8..31f2ee5d 100644 --- a/alpine/3.18/8.3/Dockerfile +++ b/alpine/3.18/8.3/Dockerfile @@ -5,7 +5,7 @@ FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.18 ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 +ARG BLACKFIRE_VERSION=1.92.28 ARG BLACKFIRE_PHP_VERSION=83 ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 diff --git a/alpine/3.19/8.2/Dockerfile b/alpine/3.19/8.2/Dockerfile index 89b1f570..59786635 100644 --- a/alpine/3.19/8.2/Dockerfile +++ b/alpine/3.19/8.2/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.2.24 +ARG SPRYKER_PHP_VERSION=8.2.25 FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.19 diff --git a/alpine/3.19/8.3/Dockerfile b/alpine/3.19/8.3/Dockerfile index d2a5cbd5..ef90f5c4 100644 --- a/alpine/3.19/8.3/Dockerfile +++ b/alpine/3.19/8.3/Dockerfile @@ -1,11 +1,11 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.3.12 +ARG SPRYKER_PHP_VERSION=8.3.13 FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.19 ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 +ARG BLACKFIRE_VERSION=1.92.28 ARG BLACKFIRE_PHP_VERSION=83 ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 diff --git a/alpine/3.20/8.2/Dockerfile b/alpine/3.20/8.2/Dockerfile index c949d75a..4d43162c 100644 --- a/alpine/3.20/8.2/Dockerfile +++ b/alpine/3.20/8.2/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.2.24 +ARG SPRYKER_PHP_VERSION=8.2.25 FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.20 ARG TARGETPLATFORM diff --git a/alpine/3.20/8.3/Dockerfile b/alpine/3.20/8.3/Dockerfile index 9e837b5c..fca96917 100644 --- a/alpine/3.20/8.3/Dockerfile +++ b/alpine/3.20/8.3/Dockerfile @@ -1,10 +1,10 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.3.12 +ARG SPRYKER_PHP_VERSION=8.3.13 FROM php:${SPRYKER_PHP_VERSION}-fpm-alpine3.20 ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 +ARG BLACKFIRE_VERSION=1.92.28 ARG BLACKFIRE_PHP_VERSION=83 ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 @@ -124,47 +124,47 @@ RUN architecture=$(case ${TARGETPLATFORM} in "linux/amd64") echo "amd64" ;; linu && curl -A "Docker" -o /tmp/blackfire.so -D - -L -s https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_${architecture}-php-${BLACKFIRE_PHP_VERSION}.so \ && mv /tmp/blackfire.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so -# New Relic -ENV NEWRELIC_ENABLED=0 -ENV NEWRELIC_LICENSE='' -ENV NEWRELIC_APPNAME='Spryker' -ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 -ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 -ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 -ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 - -RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ - && export NR_INSTALL_USE_CP_NOT_LN=1 \ - && export NR_INSTALL_SILENT=1 \ - && /tmp/newrelic-php5-*/newrelic-install install \ - && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ - && /usr/bin/install -d -m 777 /var/log/newrelic/ \ - && rm /usr/local/etc/php/conf.d/newrelic.ini' - -# Tideways -ENV TIDEWAYS_APIKEY='' -ENV TIDEWAYS_DAEMON_URI='' -ENV TIDEWAYS_CLI_ENABLED=0 -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ - wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ - && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -# GraphViz 7.0.5 -RUN cd /tmp && \ - curl -L https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/7.0.5/graphviz-7.0.5.tar.gz | tar -zx && \ - cd /tmp/graphviz-7.0.5 && \ - ./configure && \ - make && \ - make install && \ - rm -rf /tmp/graphviz-7.0.5 && \ - apk del --no-cache .graphviz-build-deps +## New Relic +#ENV NEWRELIC_ENABLED=0 +#ENV NEWRELIC_LICENSE='' +#ENV NEWRELIC_APPNAME='Spryker' +#ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 +#ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 +#ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 +#ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 +#ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 +# +#RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ +# && export NR_INSTALL_USE_CP_NOT_LN=1 \ +# && export NR_INSTALL_SILENT=1 \ +# && /tmp/newrelic-php5-*/newrelic-install install \ +# && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ +# && /usr/bin/install -d -m 777 /var/log/newrelic/ \ +# && rm /usr/local/etc/php/conf.d/newrelic.ini' + +## Tideways +#ENV TIDEWAYS_APIKEY='' +#ENV TIDEWAYS_DAEMON_URI='' +#ENV TIDEWAYS_CLI_ENABLED=0 +#RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ +# wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ +# && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ +# && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' +# +#RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ +# wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ +# && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ +# && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' + +## GraphViz 7.0.5 +#RUN cd /tmp && \ +# curl -L https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/7.0.5/graphviz-7.0.5.tar.gz | tar -zx && \ +# cd /tmp/graphviz-7.0.5 && \ +# ./configure && \ +# make && \ +# make install && \ +# rm -rf /tmp/graphviz-7.0.5 && \ +# apk del --no-cache .graphviz-build-deps # Opcache RUN /usr/bin/install -d -m 777 /var/run/opcache diff --git a/debian/bullseye/8.2/Dockerfile b/debian/bullseye/8.2/Dockerfile index 5dd008d6..09089500 100644 --- a/debian/bullseye/8.2/Dockerfile +++ b/debian/bullseye/8.2/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.2.24 +ARG SPRYKER_PHP_VERSION=8.2.25 FROM php:${SPRYKER_PHP_VERSION}-fpm-bullseye diff --git a/debian/bullseye/8.3/Dockerfile b/debian/bullseye/8.3/Dockerfile index c939630d..77f5f903 100644 --- a/debian/bullseye/8.3/Dockerfile +++ b/debian/bullseye/8.3/Dockerfile @@ -1,11 +1,11 @@ # syntax = docker/dockerfile:1.0.2-experimental -ARG SPRYKER_PHP_VERSION=8.3.12 +ARG SPRYKER_PHP_VERSION=8.3.13 FROM php:${SPRYKER_PHP_VERSION}-fpm-bullseye ARG TARGETPLATFORM ARG COMPOSER_VERSION=2.8.1 -ARG BLACKFIRE_VERSION=1.87.1 +ARG BLACKFIRE_VERSION=1.92.28 ARG BLACKFIRE_PHP_VERSION=83 ARG NEWRELIC_VERSION=11.2.0.15 ARG TIDEWAYS_VERSION=5.6.4 From 96c40e9b8410aec59fc6725ab93db8aef2c480fe Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Tue, 19 Nov 2024 17:50:07 +0100 Subject: [PATCH 3/7] Revert Alpine 3.20 instructions --- alpine/3.20/8.3/Dockerfile | 82 +++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/alpine/3.20/8.3/Dockerfile b/alpine/3.20/8.3/Dockerfile index fca96917..8a6c7bf5 100644 --- a/alpine/3.20/8.3/Dockerfile +++ b/alpine/3.20/8.3/Dockerfile @@ -124,47 +124,47 @@ RUN architecture=$(case ${TARGETPLATFORM} in "linux/amd64") echo "amd64" ;; linu && curl -A "Docker" -o /tmp/blackfire.so -D - -L -s https://packages.blackfire.io/binaries/blackfire-php/${BLACKFIRE_VERSION}/blackfire-php-alpine_${architecture}-php-${BLACKFIRE_PHP_VERSION}.so \ && mv /tmp/blackfire.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so -## New Relic -#ENV NEWRELIC_ENABLED=0 -#ENV NEWRELIC_LICENSE='' -#ENV NEWRELIC_APPNAME='Spryker' -#ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 -#ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 -#ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 -#ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 -#ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 -# -#RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ -# && export NR_INSTALL_USE_CP_NOT_LN=1 \ -# && export NR_INSTALL_SILENT=1 \ -# && /tmp/newrelic-php5-*/newrelic-install install \ -# && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ -# && /usr/bin/install -d -m 777 /var/log/newrelic/ \ -# && rm /usr/local/etc/php/conf.d/newrelic.ini' - -## Tideways -#ENV TIDEWAYS_APIKEY='' -#ENV TIDEWAYS_DAEMON_URI='' -#ENV TIDEWAYS_CLI_ENABLED=0 -#RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ -# wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ -# && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ -# && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' -# -#RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ -# wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ -# && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ -# && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' - -## GraphViz 7.0.5 -#RUN cd /tmp && \ -# curl -L https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/7.0.5/graphviz-7.0.5.tar.gz | tar -zx && \ -# cd /tmp/graphviz-7.0.5 && \ -# ./configure && \ -# make && \ -# make install && \ -# rm -rf /tmp/graphviz-7.0.5 && \ -# apk del --no-cache .graphviz-build-deps +# New Relic +ENV NEWRELIC_ENABLED=0 +ENV NEWRELIC_LICENSE='' +ENV NEWRELIC_APPNAME='Spryker' +ENV NEWRELIC_DISTRIBUTED_TRACING_ENABLED=0 +ENV NEWRELIC_TRANSACTION_TRACER_ENABLED=0 +ENV NEWRELIC_SPAN_EVENTS_ENABLED=0 +ENV NEWRELIC_TRANSACTION_TRACER_THRESHOLD=0 +ENV NEWRELIC_DISTRIBUTED_TRACING_EXCLUDE_NEWRELIC_HEADER=0 + +RUN bash -c 'curl -L "https://download.newrelic.com/php_agent/archive/${NEWRELIC_VERSION}/newrelic-php5-${NEWRELIC_VERSION}-linux-musl.tar.gz" | tar -C /tmp -zx \ + && export NR_INSTALL_USE_CP_NOT_LN=1 \ + && export NR_INSTALL_SILENT=1 \ + && /tmp/newrelic-php5-*/newrelic-install install \ + && rm -rf /tmp/newrelic-php5-* /tmp/nrinstall* \ + && /usr/bin/install -d -m 777 /var/log/newrelic/ \ + && rm /usr/local/etc/php/conf.d/newrelic.ini' + +# Tideways +ENV TIDEWAYS_APIKEY='' +ENV TIDEWAYS_DAEMON_URI='' +ENV TIDEWAYS_CLI_ENABLED=0 +RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/amd64" ]; then \ + wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ + && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine.tar.gz \ + && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' + +RUN bash -c 'if [ "${TARGETPLATFORM}" == "linux/arm64" ]; then \ + wget https://s3-eu-west-1.amazonaws.com/tideways/extension/${TIDEWAYS_VERSION}/tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ + && tar xvzf tideways-php-${TIDEWAYS_VERSION}-alpine-arm64.tar.gz \ + && cp ./build/dist/tideways-php-alpine-${TIDEWAYS_PHP_VERSION}.so $(php-config --extension-dir)/tideways.so; fi' + +# GraphViz 7.0.5 +RUN cd /tmp && \ + curl -L https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/7.0.5/graphviz-7.0.5.tar.gz | tar -zx && \ + cd /tmp/graphviz-7.0.5 && \ + ./configure && \ + make && \ + make install && \ + rm -rf /tmp/graphviz-7.0.5 && \ + apk del --no-cache .graphviz-build-deps # Opcache RUN /usr/bin/install -d -m 777 /var/run/opcache From a81cb6e0174c4b0919577604e914c5cd3974e4fc Mon Sep 17 00:00:00 2001 From: Aleksandr Myrnyi Date: Tue, 19 Nov 2024 17:56:23 +0100 Subject: [PATCH 4/7] Delete alpine/.DS_Store --- alpine/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 alpine/.DS_Store diff --git a/alpine/.DS_Store b/alpine/.DS_Store deleted file mode 100644 index 340ad9aae42fc6a1217a358a7c7a5ed15d5f3160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKu};G<5IvV51z0*V`U?=D1I?CJfuU;zL#L`#f}v5muxH`}_y$G>Bo;;{zJ%{U zytA#uCTT~6(4BOC&YjOsd5Ll{5vl3@Dj^yYQ4D7s9AM}%&a-!H;38bCc#rjMQruMK zrn6E4e^mi~b`g!}gc3RrpWkHe=gKP2m+NYYSo}2qdY)Z5&hZp&lw=chy_l!0~mqYIV7u(POVUb*k0;0gbQb0v{kxy|;uD5n>j(e?!FW_vvuC~~eU}9P^ f)^aO8h8sg%^8}bVtSuq}lOF*igAAg;uPX2jZewvW From cbc1769f089ada21a7ef6521db063106d435b22b Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Tue, 3 Dec 2024 09:13:36 +0100 Subject: [PATCH 5/7] Format the releae diff + Adjust the notification message --- .github/compare-images.sh | 8 +++++ .github/format-output.sh | 73 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 31 +++++++++++------ 3 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 .github/format-output.sh diff --git a/.github/compare-images.sh b/.github/compare-images.sh index ba70859d..004cb11c 100755 --- a/.github/compare-images.sh +++ b/.github/compare-images.sh @@ -9,6 +9,10 @@ IMAGE_TAG=$1 if [[ "$IMAGE_TAG" == *"debian"* ]]; then docker run -i --rm "$IMAGE_TAG" sh -s <<'EOF' + echo "=== PHP Version ===" + /usr/local/bin/php -v | awk 'NR==1 {print $1, $2}' + + echo "" echo "=== Debian Version ===" echo -n "Debian " && cat /etc/debian_version @@ -40,6 +44,10 @@ if [[ "$IMAGE_TAG" == *"debian"* ]]; then EOF else docker run -i --rm "$IMAGE_TAG" sh -s <<'EOF' + echo "=== PHP Version ===" + /usr/local/bin/php -v | awk 'NR==1 {print $1, $2}' + + echo "" echo "=== Alpine Version ===" echo -n "Alpine " && cat /etc/alpine-release diff --git a/.github/format-output.sh b/.github/format-output.sh new file mode 100644 index 00000000..cdc5a542 --- /dev/null +++ b/.github/format-output.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +diff_section() { + section="$1" + current_file="current-image-report.txt" + previous_file="previous-image-report.txt" + + current_section=$(sed -n "/=== $section ===/,/=== /p" "$current_file" | sed '1d;$d') + previous_section=$(sed -n "/=== $section ===/,/=== /p" "$previous_file" | sed '1d;$d') + + if [[ "$section" == "Installed System Packages" ]]; then + diff_output=$(diff <(echo "$previous_section") <(echo "$current_section") | awk ' + BEGIN { FS = " - "; OFS = ": "; } + function trim(s) { gsub(/^ +| +$/, "", s); return s } + function clean_marker(s) { gsub(/^< |^> /, "", s); return s } + function extract_pkg_and_description(line, pkg_version, description) { + line = clean_marker(line); + split(line, parts, " - "); + pkg_version = trim(parts[1]); + description = trim(parts[2]); + return pkg_version ":" description; + } + /^/ { + new_line = substr($0, 3); + pkg_desc = extract_pkg_and_description(new_line); + split(pkg_desc, parts, ":"); + new_pkg = parts[1]; + new_desc = parts[2]; + if (new_desc in old_versions) { + print new_desc ": " old_versions[new_desc] " -> " new_pkg; + delete old_versions[new_desc]; + } else { + print new_desc ": (new) -> " new_pkg; + } + } + END { + for (desc in old_versions) { + print desc ": " old_versions[desc] " -> (removed)"; + } + }') + else + diff_output=$(diff <(echo "$previous_section") <(echo "$current_section") | awk ' + /^/ { new_line = substr($0, 3); print old_line " -> " new_line; }') + fi + + echo "$diff_output" +} + +SECTIONS=("PHP Version" "Alpine Version" "Installed PHP Extensions" "Disabled PHP Extensions" "PECL Extensions" "Composer Version" "Installed System Packages") +FORMATTED_DIFF="" + +for section in "${SECTIONS[@]}"; do + section_diff=$(diff_section "$section") + if [[ -n "$section_diff" ]]; then + FORMATTED_DIFF+="=== $section ===\\n" + FORMATTED_DIFF+="${section_diff//[$'\n']/\\n}\\n" + fi +done + +echo -e "Formatted Diff Output:\n$FORMATTED_DIFF" + +echo "FORMATTED_DIFF<> $GITHUB_ENV +echo -e "$FORMATTED_DIFF" >> $GITHUB_ENV +echo "EOF" >> $GITHUB_ENV diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e091786..1ed07b69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,6 +124,7 @@ jobs: platforms: ${{ github.ref == 'refs/heads/master' && join(matrix.platforms) || 'linux/amd64' }} - name: Current image report + id: manifest run: | CURRENT_TAG=${{ matrix.tags[0] }} bash .github/compare-images.sh $CURRENT_TAG > current-image-report.txt || true @@ -135,14 +136,23 @@ jobs: bash .github/compare-images.sh $PREVIOUS_TAG > previous-image-report.txt || true cat previous-image-report.txt - - name: Run the diff - run: | - DIFF_OUTPUT=$(diff current-image-report.txt previous-image-report.txt | sed ':a;N;$!ba;s/\n/\\n/g' || true) - echo "$DIFF_OUTPUT" + - name: Run the diff and format output + id: diff + run: bash .github/format-output.sh - echo "DIFF_OUTPUT<> $GITHUB_ENV - echo "$DIFF_OUTPUT" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV + - name: Fetch Job ID + id: fetch_job_id + if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + JOBS_JSON=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ + "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs") + echo "$JOBS_JSON" > jobs-response.json + cat jobs-response.json + JOB_ID=$(echo "$JOBS_JSON" | jq -r '.jobs[0].id') + echo "Extracted Job ID: $JOB_ID" + echo "::set-output name=job_id::$JOB_ID" - name: Send Slack Notification if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} @@ -152,12 +162,11 @@ jobs: { "attachments": [ { - "pretext": "Release changes for *spryker/php:${{ matrix.tags[0] }}*", - "color": "good", + "color": "good", "fields": [ { - "title": "Image diff:", - "value": "${{ env.DIFF_OUTPUT }}", + "title": "New version of ${{ matrix.tags[0] }} has been published", + "value": "You can check the:\n- *Manifest*: \n- *Diff*: \n\nThis version was built out of .", "short": false } ] From 885694f60d191fe076cdd4dd85dd1bf7983e02ba Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Tue, 3 Dec 2024 09:21:09 +0100 Subject: [PATCH 6/7] Rename the file (remove space) + Change permissions --- .github/{format-output.sh => format-output.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{format-output.sh => format-output.sh} (100%) mode change 100644 => 100755 diff --git a/.github/format-output.sh b/.github/format-output.sh old mode 100644 new mode 100755 similarity index 100% rename from .github/format-output.sh rename to .github/format-output.sh From 5c75b7219abfb728a96476f8cf55a6facb85b2ee Mon Sep 17 00:00:00 2001 From: Aleksandr Myrnyi Date: Mon, 9 Dec 2024 03:29:45 +0100 Subject: [PATCH 7/7] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ed07b69..b96fa044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,5 +174,5 @@ jobs: ] } env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CE_RELEASE_WEBHOOK }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK