Skip to content

Commit

Permalink
Merge pull request #314 from docksal/feature/dependency-updates
Browse files Browse the repository at this point in the history
Stable PHP 8.3 + dependency updates
  • Loading branch information
lmakarov authored Feb 9, 2024
2 parents f18d5fa + e64dd5f commit 32a38a8
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 65 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand Down Expand Up @@ -92,14 +92,14 @@ jobs:
docker info
-
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
# Build and cache image in the registry
name: Build image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ${{ env.BUILD_DIR }}
file: ${{ env.BUILD_DIR }}/Dockerfile
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
bats-version: '1.3.0'
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand Down Expand Up @@ -201,10 +201,12 @@ jobs:
# Dynamic variable names cannot be used when mapping step outputs to job outputs.
# Step outputs cannot be accessed directly from other jobs. Dead end.
- name: Store test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results
name: test-results-${{ env.GIT_SHA7 }}-${{ env.VERSION_PREFIX }}${{ env.VERSION }}-${{ env.ARCH }}
path: ${{ github.workspace }}/test-results-*.txt
if-no-files-found: error
overwrite: true

push:
name: "Push: ${{ matrix.version }}/multi"
Expand All @@ -228,7 +230,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand All @@ -239,15 +241,16 @@ jobs:
-
# Login to Docker Hub
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Retrieve test results
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: test-results
pattern: test-results-${{ env.GIT_SHA7 }}-*
merge-multiple: true
-
# Generate persistent tags (edge, stable, release)
name: Docker image tags
Expand Down
34 changes: 17 additions & 17 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1.25-fpm-bookworm as cli
FROM php:8.1.27-fpm-bookworm as cli

ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -208,11 +208,9 @@ RUN set -xe; \

# MSSQL PHP client
RUN set -xe; \
# Repo for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
# TODO: Using Ubuntu 22.04 packages as a temporary fix (until addressed upstream in MS repos).
#curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list -o /etc/apt/sources.list.d/mssql.list; \
# Repo and key for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg; \
\
buildDeps=" \
unixodbc-dev \
Expand Down Expand Up @@ -246,11 +244,12 @@ ENV \
DRUSH_VERSION=8.4.12 \
DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.7 \
WPCLI_VERSION=2.9.0 \
PLATFORMSH_CLI_VERSION=4.10.4 \
ACQUIA_CLI_VERSION=2.18.0 \
TERMINUS_VERSION=3.2.2 \
JQ_VERSION=1.7 \
YQ_VERSION=4.35.2
# platformsh/legacy-cli
PLATFORMSH_CLI_VERSION=4.14.1 \
ACQUIA_CLI_VERSION=2.22.1 \
TERMINUS_VERSION=3.3.3 \
JQ_VERSION=1.7.1 \
YQ_VERSION=4.40.5
RUN set -xe; \
# Composer 1.x
curl -fsSL "https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar" -o /usr/local/bin/composer1; \
Expand Down Expand Up @@ -326,8 +325,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil

# Node.js (installed as user)
ENV \
NVM_VERSION=0.39.5 \
NODE_VERSION=18.17.0 \
NVM_VERSION=0.39.7 \
NODE_VERSION=20.11.0 \
# yarn releases above 1.22.19 don't install
YARN_VERSION=1.22.19
# Don't use -x here, as the output may be excessive
RUN set -e; \
Expand Down Expand Up @@ -414,9 +414,9 @@ USER docker
ARG HOME=/home/docker

ENV \
CODE_SERVER_VERSION=4.10.1 \
VSCODE_GITLENS_VERSION=13.2.2 \
VSCODE_XDEBUG_VERSION=1.32.0 \
CODE_SERVER_VERSION=4.20.1 \
VSCODE_GITLENS_VERSION=14.7.0 \
VSCODE_XDEBUG_VERSION=1.34.0 \
VSCODE_HOME="${HOME}/code-server"

# Install code-server
Expand All @@ -432,7 +432,7 @@ COPY --chown=docker:docker config/code-server ${VSCODE_HOME}
# Note: Have to use --user-data-dir with --install-extension instead of --config
RUN set -xe; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension eamodio.gitlens@${VSCODE_GITLENS_VERSION}; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension felixfbecker.php-debug@${VSCODE_XDEBUG_VERSION}
code-server --user-data-dir=${VSCODE_HOME} --install-extension xdebug.php-debug@${VSCODE_XDEBUG_VERSION}

# Switch back to root (IMPORTANT!)
USER root
35 changes: 18 additions & 17 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.2.12-fpm-bookworm as cli
FROM php:8.2.15-fpm-bookworm as cli

ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -164,6 +164,7 @@ RUN set -xe; \
bz2 \
calendar\
exif \
ftp \
gd \
gettext \
imap \
Expand Down Expand Up @@ -208,11 +209,9 @@ RUN set -xe; \

# MSSQL PHP client
RUN set -xe; \
# Repo for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
# TODO: Using Ubuntu 22.04 packages as a temporary fix (until addressed upstream in MS repos).
#curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list -o /etc/apt/sources.list.d/mssql.list; \
# Repo and key for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg; \
\
buildDeps=" \
unixodbc-dev \
Expand Down Expand Up @@ -246,11 +245,12 @@ ENV \
DRUSH_VERSION=8.4.12 \
DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.7 \
WPCLI_VERSION=2.9.0 \
PLATFORMSH_CLI_VERSION=4.10.4 \
ACQUIA_CLI_VERSION=2.18.0 \
TERMINUS_VERSION=3.2.2 \
JQ_VERSION=1.7 \
YQ_VERSION=4.35.2
# platformsh/legacy-cli
PLATFORMSH_CLI_VERSION=4.14.1 \
ACQUIA_CLI_VERSION=2.22.1 \
TERMINUS_VERSION=3.3.3 \
JQ_VERSION=1.7.1 \
YQ_VERSION=4.40.5
RUN set -xe; \
# Composer 1.x
curl -fsSL "https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar" -o /usr/local/bin/composer1; \
Expand Down Expand Up @@ -326,8 +326,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil

# Node.js (installed as user)
ENV \
NVM_VERSION=0.39.5 \
NODE_VERSION=18.17.0 \
NVM_VERSION=0.39.7 \
NODE_VERSION=20.11.0 \
# yarn releases above 1.22.19 don't install
YARN_VERSION=1.22.19
# Don't use -x here, as the output may be excessive
RUN set -e; \
Expand Down Expand Up @@ -414,9 +415,9 @@ USER docker
ARG HOME=/home/docker

ENV \
CODE_SERVER_VERSION=4.10.1 \
VSCODE_GITLENS_VERSION=13.2.2 \
VSCODE_XDEBUG_VERSION=1.32.0 \
CODE_SERVER_VERSION=4.20.1 \
VSCODE_GITLENS_VERSION=14.7.0 \
VSCODE_XDEBUG_VERSION=1.34.0 \
VSCODE_HOME="${HOME}/code-server"

# Install code-server
Expand All @@ -432,7 +433,7 @@ COPY --chown=docker:docker config/code-server ${VSCODE_HOME}
# Note: Have to use --user-data-dir with --install-extension instead of --config
RUN set -xe; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension eamodio.gitlens@${VSCODE_GITLENS_VERSION}; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension felixfbecker.php-debug@${VSCODE_XDEBUG_VERSION}
code-server --user-data-dir=${VSCODE_HOME} --install-extension xdebug.php-debug@${VSCODE_XDEBUG_VERSION}

# Switch back to root (IMPORTANT!)
USER root
47 changes: 27 additions & 20 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.3.0RC6-fpm-bookworm as cli
FROM php:8.3.2-fpm-bookworm as cli

ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -164,6 +164,7 @@ RUN set -xe; \
bz2 \
calendar\
exif \
ftp \
gd \
gettext \
imap \
Expand All @@ -185,15 +186,21 @@ RUN set -xe; \
pecl install >/dev/null </dev/null \
apcu \
gnupg \
# imagick does not install on Debian 12 / PHP 8.3
# imagick does not install on Debian 12 / PHP 8.3 via pecl (see below)
#imagick \
memcached \
redis \
ssh2 \
# xdebug PHP 8.3 compatibility is in beta \
xdebug-beta \
xdebug \
xhprof \
;\
# Install imagick@master using mlocati/docker-php-extension-installer
# https://github.com/mlocati/docker-php-extension-installer/pull/811#issuecomment-1906737373
curl -fsSL "https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions" -o /usr/local/bin/install-php-extensions; \
chmod +x /usr/local/bin/install-php-extensions; \
install-php-extensions imagick/imagick@master; \
# TODO: Use install-php-extensions across the board to install PHP extensions
\
docker-php-ext-enable \
apcu \
gnupg \
Expand All @@ -211,11 +218,9 @@ RUN set -xe; \

# MSSQL PHP client
RUN set -xe; \
# Repo for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
# TODO: Using Ubuntu 22.04 packages as a temporary fix (until addressed upstream in MS repos).
#curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list -o /etc/apt/sources.list.d/mssql.list; \
# Repo and key for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg; \
\
buildDeps=" \
unixodbc-dev \
Expand Down Expand Up @@ -249,11 +254,12 @@ ENV \
DRUSH_VERSION=8.4.12 \
DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.7 \
WPCLI_VERSION=2.9.0 \
PLATFORMSH_CLI_VERSION=4.10.4 \
ACQUIA_CLI_VERSION=2.18.0 \
TERMINUS_VERSION=3.2.2 \
JQ_VERSION=1.7 \
YQ_VERSION=4.35.2
# platformsh/legacy-cli
PLATFORMSH_CLI_VERSION=4.14.1 \
ACQUIA_CLI_VERSION=2.22.1 \
TERMINUS_VERSION=3.3.3 \
JQ_VERSION=1.7.1 \
YQ_VERSION=4.40.5
RUN set -xe; \
# Composer 1.x
curl -fsSL "https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar" -o /usr/local/bin/composer1; \
Expand Down Expand Up @@ -329,8 +335,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil

# Node.js (installed as user)
ENV \
NVM_VERSION=0.39.5 \
NODE_VERSION=18.17.0 \
NVM_VERSION=0.39.7 \
NODE_VERSION=20.11.0 \
# yarn releases above 1.22.19 don't install
YARN_VERSION=1.22.19
# Don't use -x here, as the output may be excessive
RUN set -e; \
Expand Down Expand Up @@ -417,9 +424,9 @@ USER docker
ARG HOME=/home/docker

ENV \
CODE_SERVER_VERSION=4.10.1 \
VSCODE_GITLENS_VERSION=13.2.2 \
VSCODE_XDEBUG_VERSION=1.32.0 \
CODE_SERVER_VERSION=4.20.1 \
VSCODE_GITLENS_VERSION=14.7.0 \
VSCODE_XDEBUG_VERSION=1.34.0 \
VSCODE_HOME="${HOME}/code-server"

# Install code-server
Expand All @@ -435,7 +442,7 @@ COPY --chown=docker:docker config/code-server ${VSCODE_HOME}
# Note: Have to use --user-data-dir with --install-extension instead of --config
RUN set -xe; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension eamodio.gitlens@${VSCODE_GITLENS_VERSION}; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension felixfbecker.php-debug@${VSCODE_XDEBUG_VERSION}
code-server --user-data-dir=${VSCODE_HOME} --install-extension xdebug.php-debug@${VSCODE_XDEBUG_VERSION}

# Switch back to root (IMPORTANT!)
USER root
2 changes: 2 additions & 0 deletions 8.3/tests/php-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ gettext
gnupg
hash
iconv
imagick
imap
intl
json
Expand Down Expand Up @@ -88,6 +89,7 @@ gettext
gnupg
hash
iconv
imagick
imap
intl
json
Expand Down
3 changes: 2 additions & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ _healthcheck_wait ()
unset output

# Check Terminus version
run docker exec -u docker "$NAME" bash -lc 'set -x; terminus --version | grep "^Terminus ${TERMINUS_VERSION}$"'
# --no-ansi is used to strip color codes from the output, otherwise the grep will fail
run docker exec -u docker "$NAME" bash -lc 'set -x; terminus --no-ansi --version | grep "^Terminus ${TERMINUS_VERSION}$"'
[[ ${status} == 0 ]]
unset output

Expand Down

0 comments on commit 32a38a8

Please sign in to comment.