Skip to content

Commit

Permalink
Merge pull request #36 from alexislefebvre/feat-add-php-8.2
Browse files Browse the repository at this point in the history
feat: add PHP 8.2
  • Loading branch information
alexislefebvre authored Feb 8, 2024
2 parents 156a8da + a5d3562 commit 8fa289f
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ updates:
commit-message:
include: "scope"
prefix: "docker"
- package-ecosystem: "docker"
directory: "/php-8.2-alpine-composer-gd"
schedule:
interval: "weekly"
commit-message:
include: "scope"
prefix: "docker"
- package-ecosystem: "docker"
directory: "/php-8.2-jakzal-phpqa-gd"
schedule:
interval: "weekly"
commit-message:
include: "scope"
prefix: "docker"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- alpine-wait-for-it
- php-8.1-alpine-composer-gd
- php-8.1-jakzal-phpqa-gd
- php-8.2-alpine-composer-gd
- php-8.2-jakzal-phpqa-gd

steps:
- name: Set up Docker Buildx
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- alpine-wait-for-it
- php-8.1-alpine-composer-gd
- php-8.1-jakzal-phpqa-gd
- php-8.2-alpine-composer-gd
- php-8.2-jakzal-phpqa-gd

steps:
-
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Images:
- [alpine-wait-for-it](alpine-wait-for-it/): Use this image with Drone to wait for another service
- [php-8.1-alpine-composer-gd](php-8.1-alpine-composer-gd): Use this image with GitHub actions or Drone
- [php-8.1-jakzal-phpqa-gd](php-8.1-jakzal-phpqa-gd): Use this image with GitHub actions or Drone
- [php-8.2-alpine-composer-gd](php-8.2-alpine-composer-gd): Use this image with GitHub actions or Drone
- [php-8.2-jakzal-phpqa-gd](php-8.2-jakzal-phpqa-gd): Use this image with GitHub actions or Drone
22 changes: 22 additions & 0 deletions php-8.2-alpine-composer-gd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM php:8.2-cli-alpine

ENV COMPOSER_ALLOW_SUPERUSER=1

# copy Composer from official image
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

# git and unzip are necessary for Composer, mysql-client will install “mysqldump” command
RUN apk add --no-cache git unzip mysql-client \
freetype-dev libjpeg-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo_mysql

RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS icu-dev \
&& apk add --no-cache libintl \
&& docker-php-ext-install intl

# necessary for code coverage
RUN apk add --no-cache autoconf gcc g++ make \
&& pecl install pcov && docker-php-ext-enable pcov \
&& echo "pcov.enabled=0" >> $PHP_INI_DIR/php.ini
14 changes: 14 additions & 0 deletions php-8.2-alpine-composer-gd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# PHP 8.1 from Alpine Linux with Composer and GD

Use this image with Drone by using this `.drone.yml`:

```yml
pipeline:
test:
image: ghcr.io/alexislefebvre/php-8.2-alpine-composer-gd
volumes:
- composer-cache:/root/.composer
commands:
- composer install -vv --profile --no-progress
- php vendor/bin/phpunit
```
5 changes: 5 additions & 0 deletions php-8.2-jakzal-phpqa-gd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM jakzal/phpqa:php8.2-alpine

RUN apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
12 changes: 12 additions & 0 deletions php-8.2-jakzal-phpqa-gd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# jakzal/pqpqa on PHP 8.1 with GD

Use this image with Drone by using this `.drone.yml`:

```yml
pipeline:
phpstan:
image: ghcr.io/alexislefebvre/php-8.2-jakzal-phpqa-gd
group: tests
commands:
- phpstan analyse --level 6 src/ --no-progress
```

0 comments on commit 8fa289f

Please sign in to comment.