-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to php 8.3, add pipeline to build image, update php extensions
Signed-off-by: Pascal Sthamer <[email protected]>
- Loading branch information
Showing
2 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Build php-fpm image" | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * 0 | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
PHP_VERSION: "8.3" | ||
|
||
jobs: | ||
build-and-deploy: | ||
name: Build and push Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
build-args: | | ||
PHP_VERSION={{ env.PHP_VERSION }} | ||
tags: >- | ||
ghcr.io/Einfach-Gaming/php-fpm:{{ env.PHP_VERSION }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
FROM php:7.4-fpm-alpine | ||
ARG PHP_VERSION=8.1 | ||
|
||
# Install required packages. | ||
RUN apk add --update --no-cache \ | ||
freetype-dev \ | ||
libjpeg-turbo-dev \ | ||
libpng-dev \ | ||
libzip-dev \ | ||
autoconf \ | ||
g++ \ | ||
make | ||
FROM php:${PHP_VERSION}-fpm | ||
|
||
# Configure gd to support jpeg. | ||
RUN docker-php-ext-configure gd --with-jpeg | ||
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | ||
|
||
# Install PHP extensions. | ||
RUN docker-php-ext-install pdo_mysql gd bcmath mysqli zip exif | ||
|
||
# Install PHP Redis. | ||
RUN docker-php-source extract && \ | ||
pecl install redis && \ | ||
docker-php-ext-enable redis && \ | ||
docker-php-source delete | ||
|
||
# Remove packages only required for building. | ||
RUN apk del g++ make | ||
# Install required PHP extensions | ||
# https://manual.woltlab.com/en/requirements/ | ||
RUN install-php-extensions ctype dom exif gmp intl libxml mbstring openssl pdo pdo_mysql zlib imagick |