Skip to content

Commit

Permalink
feat(docker): upgrade to PHP 8.2 (#111)
Browse files Browse the repository at this point in the history
* feat(docker): upgrade to PHP 8.2

* fix: bump xdebug

* chore: remove `5.3.0` locking
  • Loading branch information
JoshuaLicense authored May 21, 2024
1 parent 2832f47 commit cfc659f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
1 change: 0 additions & 1 deletion .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
inputs:
ref:
type: string
default: 5.3.0
required: false
version:
type: string
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
inputs:
ref:
type: string
default: 5.3.0
required: false
project:
type: string
Expand Down Expand Up @@ -41,7 +40,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: "8.2"
coverage: none
extensions: intl, pdo_mysql, redis, mbstring
- name: Get composer cache directory
Expand Down Expand Up @@ -76,7 +75,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: "8.2"
coverage: none
extensions: intl, pdo_mysql, redis, mbstring
- name: Get composer cache directory
Expand Down Expand Up @@ -128,7 +127,7 @@ jobs:
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: "7.4"
# php-version: "8.2"
# coverage: none
# extensions: intl, pdo_mysql, redis, mbstring
# tools: ${{ matrix.task.tools }}
Expand Down Expand Up @@ -167,7 +166,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: "8.2"
coverage: none
extensions: intl, pdo_mysql, redis, mbstring
- name: Get composer cache directory
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/security-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
inputs:
ref:
type: string
default: 5.3.0
required: false
project:
type: string
Expand Down
10 changes: 5 additions & 5 deletions infra/docker/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# hadolint global ignore=DL3018,SC2086
FROM ghcr.io/dvsa/dvsa-docker-images/php/7.4/fpm-nginx:0 AS api
FROM ghcr.io/dvsa/dvsa-docker-images/php/8.2/fpm-nginx:0 AS api

# hadolint ignore=DL3002
USER root

RUN apk add --no-cache pcre-dev~=8.45 $PHPIZE_DEPS \
&& pecl install igbinary apcu_bc apcu \
&& pecl install igbinary apcu \
&& pecl install -D "enable-redis-igbinary='yes' enable-redis-lzf='no' enable-redis-zstd='no'" redis \
&& docker-php-ext-enable igbinary apcu redis \
&& apk del pcre-dev $PHPIZE_DEPS
Expand Down Expand Up @@ -46,10 +46,10 @@ USER www-data

FROM api AS development

RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-3.1.5 \
RUN apk add --no-cache linux-headers $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del $PHPIZE_DEPS
&& apk del linux-headers $PHPIZE_DEPS

RUN echo "[xdebug]" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
&& echo "xdebug.log=/tmp/xdebug.log" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
Expand Down
8 changes: 4 additions & 4 deletions infra/docker/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint global ignore=DL3018,SC2086
FROM ghcr.io/dvsa/dvsa-docker-images/php/8.0/cli:0 AS cli
FROM ghcr.io/dvsa/dvsa-docker-images/php/8.2/cli:0 AS cli

# hadolint ignore=DL3002
USER root
Expand Down Expand Up @@ -40,10 +40,10 @@ USER www-data

FROM cli AS development

RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-3.1.5 \
RUN apk add --no-cache linux-headers $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del $PHPIZE_DEPS
&& apk del linux-headers $PHPIZE_DEPS

RUN echo "[xdebug]" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
&& echo "xdebug.log=/tmp/xdebug.log" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
Expand Down
8 changes: 4 additions & 4 deletions infra/docker/internal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint global ignore=DL3018,SC2086
FROM ghcr.io/dvsa/dvsa-docker-images/php/7.4/fpm-nginx:0 as internal
FROM ghcr.io/dvsa/dvsa-docker-images/php/8.2/fpm-nginx:0 AS internal

# hadolint ignore=DL3002
USER root
Expand Down Expand Up @@ -51,10 +51,10 @@ USER www-data

FROM internal AS development

RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-3.1.5 \
RUN apk add --no-cache linux-headers $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del $PHPIZE_DEPS
&& apk del linux-headers $PHPIZE_DEPS

RUN echo "[xdebug]" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
&& echo "xdebug.log=/tmp/xdebug.log" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
Expand Down
8 changes: 4 additions & 4 deletions infra/docker/selfserve/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint global ignore=DL3018,SC2086
FROM ghcr.io/dvsa/dvsa-docker-images/php/7.4/fpm-nginx:0 as selfserve
FROM ghcr.io/dvsa/dvsa-docker-images/php/8.2/fpm-nginx:0 AS selfserve

# hadolint ignore=DL3002
USER root
Expand Down Expand Up @@ -51,10 +51,10 @@ USER www-data

FROM selfserve AS development

RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-3.1.5 \
RUN apk add --no-cache linux-headers $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del $PHPIZE_DEPS
&& apk del linux-headers $PHPIZE_DEPS

RUN echo "[xdebug]" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
&& echo "xdebug.log=/tmp/xdebug.log" >> ${PHP_INI_DIR}/conf.d/1000-php.ini \
Expand Down

0 comments on commit cfc659f

Please sign in to comment.