diff --git a/.github/workflows/docker-build-php-chain-web.yml b/.github/workflows/docker-build-php-chain-web.yml index 740d0cbf..7861c41f 100644 --- a/.github/workflows/docker-build-php-chain-web.yml +++ b/.github/workflows/docker-build-php-chain-web.yml @@ -4,10 +4,6 @@ name: "PHP Chain Web • Docker Build" on: workflow_dispatch: -concurrency: - group: "php-chain-web" - cancel-in-progress: true - jobs: php-fpm-rootless-magento2-web: runs-on: ubuntu-latest @@ -39,10 +35,19 @@ jobs: token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion: false - php-fpm-magento2-web: + milestone-php-fpm-rootless: runs-on: ubuntu-latest needs: - php-fpm-rootless-magento2-web + - php-fpm-rootless-shopware-web + - php-fpm-rootless-wordpress-web + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + + php-fpm-magento2-web: + runs-on: ubuntu-latest + needs: [ milestone-php-fpm-rootless ] steps: - name: "PHP-FPM Magento 2 Web • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -53,8 +58,7 @@ jobs: php-fpm-shopware-web: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-shopware-web + needs: [ milestone-php-fpm-rootless ] steps: - name: "PHP-FPM Shopware Web • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -65,8 +69,7 @@ jobs: php-fpm-wordpress-web: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-wordpress-web + needs: [ milestone-php-fpm-rootless ] steps: - name: "PHP-FPM Shopware Web • Docker Build" uses: the-actions-org/workflow-dispatch@v4 diff --git a/.github/workflows/docker-build-php-chain.yml b/.github/workflows/docker-build-php-chain.yml index 63ee2a45..6552553f 100644 --- a/.github/workflows/docker-build-php-chain.yml +++ b/.github/workflows/docker-build-php-chain.yml @@ -59,9 +59,20 @@ jobs: token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + phase1: + runs-on: ubuntu-latest + needs: + - php-cli + - php-cli-loaders + - php-fpm + - php-fpm-loaders + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + php-fpm-rootless-base: runs-on: ubuntu-latest - needs: [php-fpm-loaders] + needs: [phase1] steps: - name: "PHP-FPM Rootless Base • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -147,13 +158,25 @@ jobs: token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} - php-fpm-base: + phase2: runs-on: ubuntu-latest needs: - - php-fpm-loaders + - php-fpm-rootless-base + - php-fpm-rootless-magento1 + - php-fpm-rootless-magento2 + - php-fpm-rootless-shopware + - php-fpm-rootless-wordpress - php-fpm-rootless-magento2-web - php-fpm-rootless-shopware-web - php-fpm-rootless-wordpress-web + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + + php-fpm-base: + runs-on: ubuntu-latest + needs: + - phase2 steps: - name: "PHP-FPM Base • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -239,18 +262,27 @@ jobs: token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} -###### -# UTILITIES -###### - php-fpm-rootless-blackfire: + phase3: runs-on: ubuntu-latest needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web + - php-fpm-base + - php-fpm-magento1 + - php-fpm-magento2 + - php-fpm-shopware + - php-fpm-wordpress - php-fpm-magento2-web - php-fpm-shopware-web - php-fpm-wordpress-web + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + +###### +# UTILITIES +###### + php-fpm-rootless-blackfire: + runs-on: ubuntu-latest + needs: [ phase3 ] steps: - name: "PHP-FPM Rootless Blackfire • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -261,13 +293,7 @@ jobs: php-fpm-rootless-spx: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase3 ] steps: - name: "PHP-FPM Rootless SPX • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -278,13 +304,7 @@ jobs: php-fpm-rootless-xdebug2: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase3 ] steps: - name: "PHP-FPM Rootless Xdebug 2 • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -295,13 +315,7 @@ jobs: php-fpm-rootless-xdebug3: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase3 ] steps: - name: "PHP-FPM Rootless Xdebug 3 • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -310,15 +324,20 @@ jobs: token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} - php-fpm-blackfire: + phase4: runs-on: ubuntu-latest needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + - php-fpm-rootless-blackfire + - php-fpm-rootless-spx + - php-fpm-rootless-xdebug2 + - php-fpm-rootless-xdebug3 + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + + php-fpm-blackfire: + runs-on: ubuntu-latest + needs: [ phase4 ] steps: - name: "PHP-FPM Blackfire • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -329,13 +348,7 @@ jobs: php-fpm-spx: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase4 ] steps: - name: "PHP-FPM SPX • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -346,13 +359,7 @@ jobs: php-fpm-xdebug2: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase4 ] steps: - name: "PHP-FPM Xdebug 2 • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -363,13 +370,7 @@ jobs: php-fpm-xdebug3: runs-on: ubuntu-latest - needs: - - php-fpm-rootless-magento2-web - - php-fpm-rootless-shopware-web - - php-fpm-rootless-wordpress-web - - php-fpm-magento2-web - - php-fpm-shopware-web - - php-fpm-wordpress-web + needs: [ phase4 ] steps: - name: "PHP-FPM Xdebug 3 • Docker Build" uses: the-actions-org/workflow-dispatch@v4 @@ -377,3 +378,182 @@ jobs: workflow: docker-build-php-fpm-xdebug3.yml token: ${{ secrets.PERSONAL_TOKEN }} wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + phase5: + runs-on: ubuntu-latest + needs: + - php-fpm-blackfire + - php-fpm-spx + - php-fpm-xdebug2 + - php-fpm-xdebug3 + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + + php-fpm-rootless-magento1-apps: + runs-on: ubuntu-latest + needs: [ phase5 ] + steps: + - name: "PHP-FPM Rootless Magento 1 Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-magento1-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-magento2-apps: + runs-on: ubuntu-latest + needs: [ phase5 ] + steps: + - name: "PHP-FPM Rootless Magento 2 Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-magento2-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-shopware-apps: + runs-on: ubuntu-latest + needs: [ phase5 ] + steps: + - name: "PHP-FPM Rootless Shopware Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-shopware-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-wordpress-apps: + runs-on: ubuntu-latest + needs: [ phase5 ] + steps: + - name: "PHP-FPM Rootless WordPress Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-wordpress-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-magento2-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-rootless-magento2-apps ] + steps: + - name: "PHP-FPM Rootless Magento 2 Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-magento2-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-shopware-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-rootless-shopware-apps ] + steps: + - name: "PHP-FPM Rootless Shopware Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-shopware-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-rootless-wordpress-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-rootless-wordpress-apps ] + steps: + - name: "PHP-FPM Rootless WordPress Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-rootless-wordpress-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + phase6: + runs-on: ubuntu-latest + needs: + - php-fpm-rootless-magento1-apps + - php-fpm-rootless-magento2-apps + - php-fpm-rootless-shopware-apps + - php-fpm-rootless-wordpress-apps + - php-fpm-rootless-magento2-web-apps + - php-fpm-rootless-shopware-web-apps + - php-fpm-rootless-wordpress-web-apps + steps: + - name: dummy-action + uses: bitcoder/dummy-action@v9 + + php-fpm-magento1-apps: + runs-on: ubuntu-latest + needs: [ phase6 ] + steps: + - name: "PHP-FPM Magento 1 Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-magento1-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-magento2-apps: + runs-on: ubuntu-latest + needs: [ phase6 ] + steps: + - name: "PHP-FPM Magento 2 Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-magento2-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-shopware-apps: + runs-on: ubuntu-latest + needs: [ phase6 ] + steps: + - name: "PHP-FPM Shopware Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-shopware-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-wordpress-apps: + runs-on: ubuntu-latest + needs: [ phase6 ] + steps: + - name: "PHP-FPM WordPress Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-wordpress-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-magento2-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-magento2-apps ] + steps: + - name: "PHP-FPM Magento 2 Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-magento2-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-shopware-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-shopware-apps ] + steps: + - name: "PHP-FPM Shopware Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-shopware-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} + + php-fpm-wordpress-web-apps: + runs-on: ubuntu-latest + needs: [ php-fpm-wordpress-apps ] + steps: + - name: "PHP-FPM WordPress Web Apps • Docker Build" + uses: the-actions-org/workflow-dispatch@v4 + with: + workflow: docker-build-php-fpm-wordpress-web-apps.yml + token: ${{ secrets.PERSONAL_TOKEN }} + wait-for-completion-timeout: ${{ env.WAIT_FOR_COMPLETION_TIMEOUT }} diff --git a/.github/workflows/docker-build-php-cli-loaders.yml b/.github/workflows/docker-build-php-cli-loaders.yml index 48c07b43..775e23f4 100644 --- a/.github/workflows/docker-build-php-cli-loaders.yml +++ b/.github/workflows/docker-build-php-cli-loaders.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-loaders ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-cli.yml b/.github/workflows/docker-build-php-cli.yml index 958ffc08..975c65f6 100644 --- a/.github/workflows/docker-build-php-cli.yml +++ b/.github/workflows/docker-build-php-cli.yml @@ -94,7 +94,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }} ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-${{ matrix.IMAGE_NAME }}-${{ matrix.IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-${{ matrix.IMAGE_NAME }}-${{ matrix.IMAGE_TAG }} cache-to: type=inline @@ -108,6 +109,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-${{ matrix.IMAGE_NAME }}-${{ matrix.IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-${{ matrix.IMAGE_NAME }}-${{ matrix.IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-base.yml b/.github/workflows/docker-build-php-fpm-base.yml index 9c30ab59..b1e01fb2 100644 --- a/.github/workflows/docker-build-php-fpm-base.yml +++ b/.github/workflows/docker-build-php-fpm-base.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }} ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-blackfire.yml b/.github/workflows/docker-build-php-fpm-blackfire.yml index 51799d9a..33c6bc07 100644 --- a/.github/workflows/docker-build-php-fpm-blackfire.yml +++ b/.github/workflows/docker-build-php-fpm-blackfire.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-loaders.yml b/.github/workflows/docker-build-php-fpm-loaders.yml index 3677e599..e7d28d08 100644 --- a/.github/workflows/docker-build-php-fpm-loaders.yml +++ b/.github/workflows/docker-build-php-fpm-loaders.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-loaders ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-loaders-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento1-apps.yml b/.github/workflows/docker-build-php-fpm-magento1-apps.yml new file mode 100644 index 00000000..f6e50c06 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-magento1-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Magento 1 Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/magento1-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento1" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento1.yml b/.github/workflows/docker-build-php-fpm-magento1.yml index d893d297..e34dfef7 100644 --- a/.github/workflows/docker-build-php-fpm-magento1.yml +++ b/.github/workflows/docker-build-php-fpm-magento1.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1 ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - build-apps: - name: "Build magento 1 - apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "magento1" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }} - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento2-apps.yml b/.github/workflows/docker-build-php-fpm-magento2-apps.yml new file mode 100644 index 00000000..2fe50bc3 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-magento2-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Magento 2 Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/magento2-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento2" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento2-web-apps.yml b/.github/workflows/docker-build-php-fpm-magento2-web-apps.yml new file mode 100644 index 00000000..42c883a5 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-magento2-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Magento 2 Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/magento2-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento2-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento2-web.yml b/.github/workflows/docker-build-php-fpm-magento2-web.yml index 2d8784fe..def12c2b 100644 --- a/.github/workflows/docker-build-php-fpm-magento2-web.yml +++ b/.github/workflows/docker-build-php-fpm-magento2-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline - -# magento2-web-apps: -# name: php-fpm/magento2-web -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-magento2-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "magento2-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }} -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-magento2.yml b/.github/workflows/docker-build-php-fpm-magento2.yml index 00903753..3b336904 100644 --- a/.github/workflows/docker-build-php-fpm-magento2.yml +++ b/.github/workflows/docker-build-php-fpm-magento2.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2 ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - build-apps: - name: "Build magento 2 - apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "magento2" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }} - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-base.yml b/.github/workflows/docker-build-php-fpm-rootless-base.yml index 600e73ca..55988b15 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-base.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-base.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-blackfire.yml b/.github/workflows/docker-build-php-fpm-rootless-blackfire.yml index d781384c..a1ee7afc 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-blackfire.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-blackfire.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-blackfire-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento1-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-magento1-apps.yml new file mode 100644 index 00000000..4fa7b546 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-magento1-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Magento 1 Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/magento1-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento1" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento1.yml b/.github/workflows/docker-build-php-fpm-rootless-magento1.yml index ca000cb8..ebddb567 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-magento1.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-magento1.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - build-apps: - name: "Build php-fpm-rootless/magento1-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "magento1" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-rootless - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento1-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento2-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-magento2-apps.yml new file mode 100644 index 00000000..62b2106e --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-magento2-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Magento 2 Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/magento2-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento2" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento2-web-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-magento2-web-apps.yml new file mode 100644 index 00000000..39ad7883 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-magento2-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Magento 2 Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/magento2-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "magento2-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento2-web.yml b/.github/workflows/docker-build-php-fpm-rootless-magento2-web.yml index 0f5caf79..9a8e4e2e 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-magento2-web.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-magento2-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline - -# php-fpm-rootless-magento2-web-apps: -# name: php-fpm-rootless/magento2-web-apps -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-rootless-magento2-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "magento2-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-rootless -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-magento2.yml b/.github/workflows/docker-build-php-fpm-rootless-magento2.yml index 7d3d00c9..2363f809 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-magento2.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-magento2.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - build-apps: - name: "Build php-fpm-rootless/magento2-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "magento2" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-rootless - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-magento2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-shopware-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-shopware-apps.yml new file mode 100644 index 00000000..b2987bc0 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-shopware-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Shopware Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/shopware-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "shopware" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-shopware-web-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-shopware-web-apps.yml new file mode 100644 index 00000000..3784ac8d --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-shopware-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Shopware Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/shopware-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "shopware-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-shopware-web.yml b/.github/workflows/docker-build-php-fpm-rootless-shopware-web.yml index 73ad2e0e..f2198e4a 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-shopware-web.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-shopware-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline - -# php-fpm-rootless-shopware-web-apps: -# name: php-fpm-rootless/shopware-web-apps -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-rootless-shopware-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "shopware-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-rootless -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-shopware.yml b/.github/workflows/docker-build-php-fpm-rootless-shopware.yml index 4a786a82..d212acd8 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-shopware.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-shopware.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - build-apps: - name: "Build php-fpm-rootless/shopware-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "shopware" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-rootless - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-spx.yml b/.github/workflows/docker-build-php-fpm-rootless-spx.yml index 54faec07..31b9eda2 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-spx.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-spx.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-wordpress-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-wordpress-apps.yml new file mode 100644 index 00000000..78100701 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-wordpress-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Wordpress Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/wordpress-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "wordpress" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-wordpress-web-apps.yml b/.github/workflows/docker-build-php-fpm-rootless-wordpress-web-apps.yml new file mode 100644 index 00000000..1d3b2d9e --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-rootless-wordpress-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Rootless Wordpress Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm-rootless/wordpress-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "wordpress-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-rootless + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm-rootless/${{ matrix.APP }}/context + file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-wordpress-web.yml b/.github/workflows/docker-build-php-fpm-rootless-wordpress-web.yml index 363df0a8..65a3f3ff 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-wordpress-web.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-wordpress-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline - -# php-fpm-rootless-wordpress-web-apps: -# name: php-fpm-rootless/wordpress-web-apps -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-rootless-wordpress-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "wordpress-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-rootless -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm-rootless/${{ matrix.APP }}/context -# file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-wordpress.yml b/.github/workflows/docker-build-php-fpm-rootless-wordpress.yml index 9a39fed2..42d674a4 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-wordpress.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-wordpress.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - build-apps: - name: "Build php-fpm-rootless/wordpress-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm-rootless/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "wordpress" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-rootless - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm-rootless/${{ matrix.APP }}/context - file: images/php-fpm-rootless/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-xdebug2.yml b/.github/workflows/docker-build-php-fpm-rootless-xdebug2.yml index 5e8352f9..06260f94 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-xdebug2.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-xdebug2.yml @@ -75,7 +75,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -89,6 +90,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-rootless-xdebug3.yml b/.github/workflows/docker-build-php-fpm-rootless-xdebug3.yml index ecdc63c8..c1b9bcfc 100644 --- a/.github/workflows/docker-build-php-fpm-rootless-xdebug3.yml +++ b/.github/workflows/docker-build-php-fpm-rootless-xdebug3.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-rootless ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }}-rootless cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-shopware-apps.yml b/.github/workflows/docker-build-php-fpm-shopware-apps.yml new file mode 100644 index 00000000..dcc2e439 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-shopware-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Shopware Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/shopware-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "shopware" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-shopware-web-apps.yml b/.github/workflows/docker-build-php-fpm-shopware-web-apps.yml new file mode 100644 index 00000000..a885c628 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-shopware-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Shopware Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/shopware-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "shopware-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-shopware-web.yml b/.github/workflows/docker-build-php-fpm-shopware-web.yml index 699e6642..5f3bcb37 100644 --- a/.github/workflows/docker-build-php-fpm-shopware-web.yml +++ b/.github/workflows/docker-build-php-fpm-shopware-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline - -# shopware-web-apps: -# name: php-fpm/shopware-web-apps -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-shopware-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "shopware-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }} -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-shopware.yml b/.github/workflows/docker-build-php-fpm-shopware.yml index 9d39ff00..578eb890 100644 --- a/.github/workflows/docker-build-php-fpm-shopware.yml +++ b/.github/workflows/docker-build-php-fpm-shopware.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - build-apps: - name: "Build php-fpm/shopware-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "shopware" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }} - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-shopware-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-spx.yml b/.github/workflows/docker-build-php-fpm-spx.yml index 12e05a20..8ade2ce2 100644 --- a/.github/workflows/docker-build-php-fpm-spx.yml +++ b/.github/workflows/docker-build-php-fpm-spx.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-spx-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-wordpress-apps.yml b/.github/workflows/docker-build-php-fpm-wordpress-apps.yml new file mode 100644 index 00000000..fc1787b5 --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-wordpress-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Wordpress Apps • Docker Build" +on: + workflow_dispatch: +jobs: + build-apps: + name: "Build php-fpm/wordpress-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "wordpress" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-wordpress-web-apps.yml b/.github/workflows/docker-build-php-fpm-wordpress-web-apps.yml new file mode 100644 index 00000000..b2320e6a --- /dev/null +++ b/.github/workflows/docker-build-php-fpm-wordpress-web-apps.yml @@ -0,0 +1,128 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow +--- +name: "PHP-FPM Wordpress Web Apps • Docker Build" +on: + workflow_dispatch: +jobs: + wordpress-web-apps: + name: "Build php-fpm/wordpress-web-apps" + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + strategy: + matrix: + BASE_IMAGE_NAME: [ "debian", "ubuntu" ] + BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] + PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] + APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] + exclude: + # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "5.6" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.0" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.1" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.2" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.3" + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bookworm + PHP_VERSION: "7.4" + + # jammy is an ubuntu distro + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: jammy + + # bullseye and bookworm are debian distros + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bullseye + - BASE_IMAGE_NAME: ubuntu + BASE_IMAGE_TAG: bookworm + + # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 + - PHP_VERSION: "8.0" + APP: "xdebug2" + - PHP_VERSION: "8.1" + APP: "xdebug2" + - PHP_VERSION: "8.2" + APP: "xdebug2" + - PHP_VERSION: "8.3" + APP: "xdebug2" + + # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix + include: + - BASE_IMAGE_NAME: debian + BASE_IMAGE_TAG: bullseye + DEFAULT_IMAGE: "true" + steps: + - uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: mirror.gcr.io/tonistiigi/binfmt:latest + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: image=moby/buildkit:master + config-inline: | + [registry."docker.io"] + mirrors = ["${{ secrets.DOCKER_PROXY }}"] + + - uses: supplypike/setup-bin@v3 + with: + uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 + name: gomplate + version: latest + + - name: Generate Dockerfile + run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile + env: + BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} + BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} + PHP_VARIANT: "wordpress-web" + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE == 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }} + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline + + - name: Build and push default image + uses: docker/build-push-action@v5 + if: ${{ matrix.DEFAULT_IMAGE != 'true' }} + with: + context: images/php-fpm/${{ matrix.APP }}/context + file: images/php-fpm/${{ matrix.APP }}/Dockerfile + push: true + platforms: "linux/amd64,linux/arm64" + tags: | + ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-wordpress-web.yml b/.github/workflows/docker-build-php-fpm-wordpress-web.yml index 9db23211..88302ec4 100644 --- a/.github/workflows/docker-build-php-fpm-wordpress-web.yml +++ b/.github/workflows/docker-build-php-fpm-wordpress-web.yml @@ -112,7 +112,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -128,131 +129,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline - -# wordpress-web-apps: -# name: php-fpm/wordpress-web-apps -# runs-on: ubuntu-latest -# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} -# needs: -# - php-fpm-wordpress-web -# strategy: -# matrix: -# BASE_IMAGE_NAME: [ "debian", "ubuntu" ] -# BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] -# PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] -# APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] -# exclude: -# # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "5.6" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.0" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.1" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.2" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.3" -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bookworm -# PHP_VERSION: "7.4" -# -# # jammy is an ubuntu distro -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: jammy -# -# # bullseye and bookworm are debian distros -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bullseye -# - BASE_IMAGE_NAME: ubuntu -# BASE_IMAGE_TAG: bookworm -# -# # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 -# - PHP_VERSION: "8.0" -# APP: "xdebug2" -# - PHP_VERSION: "8.1" -# APP: "xdebug2" -# - PHP_VERSION: "8.2" -# APP: "xdebug2" -# - PHP_VERSION: "8.3" -# APP: "xdebug2" -# -# # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix -# include: -# - BASE_IMAGE_NAME: debian -# BASE_IMAGE_TAG: bullseye -# DEFAULT_IMAGE: "true" -# steps: -# - uses: actions/checkout@v4 -# -# - name: Login to DockerHub -# uses: docker/login-action@v3 -# with: -# username: ${{ secrets.DOCKER_USERNAME }} -# password: ${{ secrets.DOCKER_PASSWORD }} -# -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# image: mirror.gcr.io/tonistiigi/binfmt:latest -# -# - name: Set up Docker Buildx -# id: buildx -# uses: docker/setup-buildx-action@v3 -# with: -# driver-opts: image=moby/buildkit:master -# config-inline: | -# [registry."docker.io"] -# mirrors = ["${{ secrets.DOCKER_PROXY }}"] -# -# - uses: supplypike/setup-bin@v3 -# with: -# uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 -# name: gomplate -# version: latest -# -# - name: Generate Dockerfile -# run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile -# env: -# BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} -# BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} -# PHP_VARIANT: "wordpress-web" -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE == 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }} -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline -# -# - name: Build and push default image -# uses: docker/build-push-action@v5 -# if: ${{ matrix.DEFAULT_IMAGE != 'true' }} -# with: -# context: images/php-fpm/${{ matrix.APP }}/context -# file: images/php-fpm/${{ matrix.APP }}/Dockerfile -# push: true -# platforms: "linux/amd64,linux/arm64" -# tags: | -# ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# build-args: | -# PHP_VERSION=${{ matrix.PHP_VERSION }} -# cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-web-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} -# cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-wordpress.yml b/.github/workflows/docker-build-php-fpm-wordpress.yml index 31f7ac61..7c78ba92 100644 --- a/.github/workflows/docker-build-php-fpm-wordpress.yml +++ b/.github/workflows/docker-build-php-fpm-wordpress.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,131 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - build-apps: - name: "Build php-fpm/wordpress-apps" - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - needs: - - build - strategy: - matrix: - BASE_IMAGE_NAME: [ "debian", "ubuntu" ] - BASE_IMAGE_TAG: [ "bullseye", "bookworm", "jammy" ] - PHP_VERSION: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] - APP: [ "blackfire", "spx", "xdebug2", "xdebug3" ] - exclude: - # Exclude PHP 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 on Debian Bookworm - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "5.6" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.0" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.1" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.2" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.3" - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bookworm - PHP_VERSION: "7.4" - - # jammy is an ubuntu distro - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: jammy - - # bullseye and bookworm are debian distros - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bullseye - - BASE_IMAGE_NAME: ubuntu - BASE_IMAGE_TAG: bookworm - - # exclude xdebug2 on php 8.0, 8.1, 8.2, 8.3 - - PHP_VERSION: "8.0" - APP: "xdebug2" - - PHP_VERSION: "8.1" - APP: "xdebug2" - - PHP_VERSION: "8.2" - APP: "xdebug2" - - PHP_VERSION: "8.3" - APP: "xdebug2" - - # debian-bullseye images are the default and will be built with and without '-debian-bullseye' suffix - include: - - BASE_IMAGE_NAME: debian - BASE_IMAGE_TAG: bullseye - DEFAULT_IMAGE: "true" - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: mirror.gcr.io/tonistiigi/binfmt:latest - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: image=moby/buildkit:master - config-inline: | - [registry."docker.io"] - mirrors = ["${{ secrets.DOCKER_PROXY }}"] - - - uses: supplypike/setup-bin@v3 - with: - uri: https://github.com/hairyhenderson/gomplate/releases/latest/download/gomplate_linux-amd64 - name: gomplate - version: latest - - - name: Generate Dockerfile - run: gomplate -f images/php-fpm/${{ matrix.APP }}/tpl.Dockerfile -o images/php-fpm/${{ matrix.APP }}/Dockerfile - env: - BASE_IMAGE_NAME: ${{ matrix.BASE_IMAGE_NAME }} - BASE_IMAGE_TAG: ${{ matrix.BASE_IMAGE_TAG }} - PHP_VARIANT: "wordpress" - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE == 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }} - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} build-args: | PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - cache-to: type=inline - - - name: Build and push default image - uses: docker/build-push-action@v5 - if: ${{ matrix.DEFAULT_IMAGE != 'true' }} - with: - context: images/php-fpm/${{ matrix.APP }}/context - file: images/php-fpm/${{ matrix.APP }}/Dockerfile - push: true - platforms: "linux/amd64,linux/arm64" - tags: | - ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: | - PHP_VERSION=${{ matrix.PHP_VERSION }} - cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.APP }}-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} + cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-wordpress-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-xdebug2.yml b/.github/workflows/docker-build-php-fpm-xdebug2.yml index cc086ebe..91344da1 100644 --- a/.github/workflows/docker-build-php-fpm-xdebug2.yml +++ b/.github/workflows/docker-build-php-fpm-xdebug2.yml @@ -75,7 +75,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2 ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -89,6 +90,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug2-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm-xdebug3.yml b/.github/workflows/docker-build-php-fpm-xdebug3.yml index 5380b544..f0cc4d42 100644 --- a/.github/workflows/docker-build-php-fpm-xdebug3.yml +++ b/.github/workflows/docker-build-php-fpm-xdebug3.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3 ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php-fpm:${{ matrix.PHP_VERSION }}-xdebug3-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline diff --git a/.github/workflows/docker-build-php-fpm.yml b/.github/workflows/docker-build-php-fpm.yml index 7e3fd290..6d11d68f 100644 --- a/.github/workflows/docker-build-php-fpm.yml +++ b/.github/workflows/docker-build-php-fpm.yml @@ -95,7 +95,8 @@ jobs: tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline @@ -109,6 +110,7 @@ jobs: platforms: "linux/amd64,linux/arm64" tags: | ${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} - build-args: PHP_VERSION=${{ matrix.PHP_VERSION }} + build-args: | + PHP_VERSION=${{ matrix.PHP_VERSION }} cache-from: type=registry,ref=${{ vars.DOCKER_REPO }}/php:${{ matrix.PHP_VERSION }}-fpm-${{ matrix.BASE_IMAGE_NAME }}-${{ matrix.BASE_IMAGE_TAG }} cache-to: type=inline