Skip to content

Commit

Permalink
v8.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisq committed Dec 6, 2022
1 parent 4eb982b commit c4d8897
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 20 deletions.
50 changes: 36 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
task:
only_if: $CIRRUS_TAG == ''
alias: build-linux-image
timeout_in: 120m
env:
Expand Down Expand Up @@ -36,6 +37,26 @@ task:
platform: linux
cpu: 4
memory: 4G
- name: linux-armv6
env:
LINUX_ARCH: armv6
LINUX_PLATFORM: linux/arm/v6
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder
platform: linux
cpu: 8
memory: 8G
- name: linux-armv7
env:
LINUX_ARCH: armv7
LINUX_PLATFORM: linux/arm/v7
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder
platform: linux
cpu: 8
memory: 8G
matrix:
- env:
PHP_VERSION: 7.4
Expand All @@ -53,30 +74,31 @@ task:
semver_aliases_script: |
if [[ -z "$CIRRUS_TAG" ]]; then echo "Script skipped!"
else
SEMVER=${CIRRUS_TAG##*v}
SEMVER=${##*v}
echo "SEMVER=${SEMVER}" >> $CIRRUS_ENV
echo "SEMVER_MAJOR=${SEMVER%.*.*}" >> $CIRRUS_ENV
echo "SEMVER_MINOR=${SEMVER%.*}" >> $CIRRUS_ENV
fi
build_script: |
docker buildx build \
--platform=${LINUX_PLATFORM} \
-t joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH} \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
-f ${PHP_VERSION}-fpm/Dockerfile .
login_script: |
if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then
docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
else
echo "Script skipped!"
fi
push_script: |
if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then
docker push joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH}
else
echo "Script skipped!"
fi
build_script: |
push=""
## if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then
## push="--push"
## echo "Docker image will be built and pushed!"
## else
## echo "Push skipped!"
## fi
docker buildx build \
--platform=${LINUX_PLATFORM} $push \
-t joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH} \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
-f ${PHP_VERSION}-fpm/Dockerfile .
cache_swap_script: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
145 changes: 145 additions & 0 deletions .github/workflows/release-8.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: release-v8.0
on:
push:
tags:
- 'v8.0.[0-9]+'
- 'v8.0.[0-9]+-beta.[0-9]+'

jobs:
docker-build:
runs-on: ubuntu-20.04
strategy:
matrix:
build:
- amd64
- 386
- arm64
- armv7
- armv6
include:
- build: amd64
platform: linux/amd64
- build: 386
platform: linux/386
- build: arm64
platform: linux/arm64
- build: armv6
platform: linux/arm/v6
- build: armv7
platform: linux/arm/v7
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: joseluisq/php-fpm
flavor: |
latest=false
tags: |
type=semver,pattern={{major}}.{{minor}}-${{ matrix.build }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: .
platforms: ${{ matrix.platform }}
file: 8.0-fpm/Dockerfile
tags: ${{ steps.meta.outputs.tags }}

docker-manifest:
needs: docker-build
runs-on: ubuntu-20.04
steps:
- name: Set envs
run: |
github_ref=${GITHUB_REF#refs/tags/}
SEMVER=${github_ref##*v}
echo "SEMVER=${SEMVER}" >> $GITHUB_ENV
echo "SEMVER_MAJOR=${SEMVER%.*.*}" >> $GITHUB_ENV
echo "SEMVER_MINOR=${SEMVER%.*}" >> $GITHUB_ENV
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Push latest per version
run: |
docker manifest create \
joseluisq/php-fpm:$SEMVER_MINOR \
--amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-386 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv7
docker manifest push joseluisq/php-fpm:$SEMVER_MINOR
# -
# name: Push latest (PHP 8.1+)
# run: |
# docker manifest create \
# joseluisq/php-fpm:latest \
# --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \
# --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \
# --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \
# --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \
# --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7
# docker manifest push joseluisq/php-fpm:latest
-
name: Pull all images
run: |
docker pull joseluisq/php-fpm:$SEMVER_MINOR-amd64
docker pull joseluisq/php-fpm:$SEMVER_MINOR-386
docker pull joseluisq/php-fpm:$SEMVER_MINOR-arm64
docker pull joseluisq/php-fpm:$SEMVER_MINOR-armv6
docker pull joseluisq/php-fpm:$SEMVER_MINOR-armv7
-
name: Push semver alias
run: |
docker manifest create \
joseluisq/php-fpm:${SEMVER} \
--amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-386 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv7
docker manifest push joseluisq/php-fpm:${SEMVER}
-
name: Push semver major alias
run: |
docker manifest create \
joseluisq/php-fpm:${SEMVER_MAJOR} \
--amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-386 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv7
docker manifest push joseluisq/php-fpm:${SEMVER_MAJOR}
-
name: Push semver minor alias
run: |
docker manifest create \
joseluisq/php-fpm:${SEMVER_MINOR} \
--amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-386 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \
--amend joseluisq/php-fpm:$SEMVER_MINOR-armv7
docker manifest push joseluisq/php-fpm:${SEMVER_MINOR}
15 changes: 9 additions & 6 deletions 8.0-fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.0.25-fpm-alpine3.16
FROM php:8.0.26-fpm-alpine3.16

LABEL Maintainer="Jose Quintana <git.io/joseluisq>" \
Description="PHP-FPM v8.0 with essential extensions on top of Alpine Linux."
Expand All @@ -22,6 +22,7 @@ RUN set -eux \
icu-libs \
imagemagick \
imap \
libexecinfo \
libffi \
libgmpxx \
libintl \
Expand Down Expand Up @@ -67,6 +68,7 @@ RUN set -eux \
imap-dev \
krb5-dev \
libc-dev \
libexecinfo-dev \
libjpeg-turbo-dev \
libmcrypt-dev \
libpng-dev \
Expand Down Expand Up @@ -205,11 +207,12 @@ RUN set -eux \
&& docker-php-ext-install -j$(nproc) pcntl \
&& true \
\
# Install phalcon
&& pecl install phalcon \
&& docker-php-ext-enable phalcon \
&& true \
\
# TEMPORARILY DDISABLED: https://github.com/joseluisq/alpine-php-fpm/issues/16#issuecomment-1338648898
# Install phalcon
# && pecl install phalcon \
# && docker-php-ext-enable phalcon \
# && true \
# \
# Install pdo_pgsql
&& docker-php-ext-install -j$(nproc) pdo_pgsql \
&& true \
Expand Down

0 comments on commit c4d8897

Please sign in to comment.