Skip to content

Commit 85cb868

Browse files
committed
Switched base images to Debian 13 (trixie)
Compatibility fixes
1 parent 5347952 commit 85cb868

File tree

6 files changed

+90
-130
lines changed

6 files changed

+90
-130
lines changed

8.2/Dockerfile

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22
# check=skip=SecretsUsedInArgOrEnv (ignore false positives in ARG/ENV)
33

4-
FROM php:8.2.30-fpm-bookworm AS cli
4+
FROM php:8.2.30-fpm-trixie AS cli
55

66
ARG TARGETARCH
77
ARG DEBIAN_FRONTEND=noninteractive
@@ -64,6 +64,7 @@ RUN set -xe; \
6464
procps \
6565
pv \
6666
rsync \
67+
sqlite3 \
6768
sudo \
6869
supervisor \
6970
unzip \
@@ -101,7 +102,7 @@ RUN set -xe; \
101102
# Configure sshd (for use PHPStorm's remote interpreters and tools integrations)
102103
# http://docs.docker.com/examples/running_ssh_service/
103104
RUN set -xe; \
104-
mkdir /var/run/sshd; \
105+
mkdir -p /var/run/sshd; \
105106
echo 'docker:docker' | chpasswd; \
106107
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config; \
107108
# SSH login fix. Otherwise user is kicked off after login
@@ -217,16 +218,6 @@ RUN set -xe; \
217218
# Cleanup
218219
apt-get clean; rm -rf /var/lib/apt/lists/*
219220

220-
# Install a newer SQLite version from Debian Trixie (testing) repo
221-
# Debian Bookworm (main) ships with sqlite v3.40. Drupal 11 requires SQLite v3.45+.
222-
# @see https://www.drupal.org/project/drupal/issues/3346338
223-
RUN set -xe; \
224-
echo "deb https://deb.debian.org/debian testing main" | tee /etc/apt/sources.list.d/testing.list; \
225-
apt-get update >/dev/null; \
226-
apt-get install -y -t testing sqlite3;\
227-
# Cleanup
228-
apt-get clean; rm -rf /var/lib/apt/lists/*; rm -f /etc/apt/sources.list.d/testing.list
229-
230221
# All further RUN commands will run as the "docker" user
231222
USER docker
232223
SHELL ["/bin/bash", "-c"]
@@ -238,49 +229,48 @@ RUN set -e; \
238229
# Add composer bin project level and global directories to PATH
239230
# Project level comes first and thus takes precedence over the global one
240231
echo -e "\n"'export PATH="$PATH:${PROJECT_ROOT:-/var/www}/vendor/bin"' >> $HOME/.profile; \
232+
echo -e "\n"'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> $HOME/.profile; \
233+
# Legacy composer global directory (for backward compatibility)
241234
echo -e "\n"'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> $HOME/.profile; \
242235
# Reload updated PATH from profile to make composer/etc. visible below
243-
. $HOME/.profile; \
236+
source $HOME/.profile; \
244237
# Drupal Coder & WP Coding Standards w/ a matching version of PHP_CodeSniffer
245238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
246239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
247240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
248241
# Don't fix the indentation or installed_paths will not be set correctly
249242
phpcs --config-set installed_paths \
250-
$HOME/.composer/vendor/drupal/coder/coder_sniffer/,\
251-
$HOME/.composer/vendor/wp-coding-standards/wpcs/,\
252-
$HOME/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
253-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
254-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
255248
# Cleanup
256249
composer clear-cache
257250

258251
# Node.js (installed as user)
259252
ENV \
260253
NVM_VERSION=0.40.3 \
261254
NODE_VERSION=22.20.0 \
262-
# Yarn (Classic v1)
263-
# https://github.com/yarnpkg/yarn/releases
255+
# yarn v1 (classic) https://github.com/yarnpkg/yarn/releases
264256
YARN_VERSION=1.22.22
265257
# Don't use -x here, as the output may be excessive
266258
RUN set -e; \
267-
# NVM and a defaut Node.js version
259+
# NVM and a default Node.js version
268260
export PROFILE="$HOME/.profile"; \
269-
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \
270-
# Reload profile to load nvm (needed by Yarn installation below)
271-
. $HOME/.profile; \
272-
# Yarn (Classic v1)
273-
# Installing via npm to allow fore override with never versions via corepack
274-
npm install -g yarn@${YARN_VERSION}; \
275-
# Enable corepack (allows installing project level yarn v2+ via yarn)
276-
corepack enable
261+
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash; \
262+
# Load nvm right away (needed by Yarn installation below)
263+
source $HOME/.profile; \
264+
# Enable corepack and install yarn v1 (classic) globally
265+
corepack enable; \
266+
corepack install -g yarn@${YARN_VERSION}
277267

278268
## Ruby bundler
279269
## Don't use -x here, as the output may be excessive
280270
RUN set -e; \
281271
# Export ruby gem bin path
282272
echo 'export PATH=$PATH:$(ruby -r rubygems -e "puts Gem.user_dir")/bin' >> $HOME/.profile; \
283-
. $HOME/.profile; \
273+
source $HOME/.profile; \
284274
gem install --user-install bundler; \
285275
# Have bundler install gems in the current directory (./.bundle) by default
286276
echo -e "\n"'export BUNDLE_PATH=.bundle' >> $HOME/.profile

8.3/Dockerfile

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22
# check=skip=SecretsUsedInArgOrEnv (ignore false positives in ARG/ENV)
33

4-
FROM php:8.3.30-fpm-bookworm AS cli
4+
FROM php:8.3.30-fpm-trixie AS cli
55

66
ARG TARGETARCH
77
ARG DEBIAN_FRONTEND=noninteractive
@@ -64,6 +64,7 @@ RUN set -xe; \
6464
procps \
6565
pv \
6666
rsync \
67+
sqlite3 \
6768
sudo \
6869
supervisor \
6970
unzip \
@@ -101,7 +102,7 @@ RUN set -xe; \
101102
# Configure sshd (for use PHPStorm's remote interpreters and tools integrations)
102103
# http://docs.docker.com/examples/running_ssh_service/
103104
RUN set -xe; \
104-
mkdir /var/run/sshd; \
105+
mkdir -p /var/run/sshd; \
105106
echo 'docker:docker' | chpasswd; \
106107
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config; \
107108
# SSH login fix. Otherwise user is kicked off after login
@@ -217,16 +218,6 @@ RUN set -xe; \
217218
# Cleanup
218219
apt-get clean; rm -rf /var/lib/apt/lists/*
219220

220-
# Install a newer SQLite version from Debian Trixie (testing) repo
221-
# Debian Bookworm (main) ships with sqlite v3.40. Drupal 11 requires SQLite v3.45+.
222-
# @see https://www.drupal.org/project/drupal/issues/3346338
223-
RUN set -xe; \
224-
echo "deb https://deb.debian.org/debian testing main" | tee /etc/apt/sources.list.d/testing.list; \
225-
apt-get update >/dev/null; \
226-
apt-get install -y -t testing sqlite3;\
227-
# Cleanup
228-
apt-get clean; rm -rf /var/lib/apt/lists/*; rm -f /etc/apt/sources.list.d/testing.list
229-
230221
# All further RUN commands will run as the "docker" user
231222
USER docker
232223
SHELL ["/bin/bash", "-c"]
@@ -238,49 +229,48 @@ RUN set -e; \
238229
# Add composer bin project level and global directories to PATH
239230
# Project level comes first and thus takes precedence over the global one
240231
echo -e "\n"'export PATH="$PATH:${PROJECT_ROOT:-/var/www}/vendor/bin"' >> $HOME/.profile; \
232+
echo -e "\n"'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> $HOME/.profile; \
233+
# Legacy composer global directory (for backward compatibility)
241234
echo -e "\n"'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> $HOME/.profile; \
242235
# Reload updated PATH from profile to make composer/etc. visible below
243-
. $HOME/.profile; \
236+
source $HOME/.profile; \
244237
# Drupal Coder & WP Coding Standards w/ a matching version of PHP_CodeSniffer
245238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
246239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
247240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
248241
# Don't fix the indentation or installed_paths will not be set correctly
249242
phpcs --config-set installed_paths \
250-
$HOME/.composer/vendor/drupal/coder/coder_sniffer/,\
251-
$HOME/.composer/vendor/wp-coding-standards/wpcs/,\
252-
$HOME/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
253-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
254-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
255248
# Cleanup
256249
composer clear-cache
257250

258251
# Node.js (installed as user)
259252
ENV \
260253
NVM_VERSION=0.40.3 \
261254
NODE_VERSION=22.20.0 \
262-
# Yarn (Classic v1)
263-
# https://github.com/yarnpkg/yarn/releases
255+
# yarn v1 (classic) https://github.com/yarnpkg/yarn/releases
264256
YARN_VERSION=1.22.22
265257
# Don't use -x here, as the output may be excessive
266258
RUN set -e; \
267-
# NVM and a defaut Node.js version
259+
# NVM and a default Node.js version
268260
export PROFILE="$HOME/.profile"; \
269-
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \
270-
# Reload profile to load nvm (needed by Yarn installation below)
271-
. $HOME/.profile; \
272-
# Yarn (Classic v1)
273-
# Installing via npm to allow fore override with never versions via corepack
274-
npm install -g yarn@${YARN_VERSION}; \
275-
# Enable corepack (allows installing project level yarn v2+ via yarn)
276-
corepack enable
261+
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash; \
262+
# Load nvm right away (needed by Yarn installation below)
263+
source $HOME/.profile; \
264+
# Enable corepack and install yarn v1 (classic) globally
265+
corepack enable; \
266+
corepack install -g yarn@${YARN_VERSION}
277267

278268
## Ruby bundler
279269
## Don't use -x here, as the output may be excessive
280270
RUN set -e; \
281271
# Export ruby gem bin path
282272
echo 'export PATH=$PATH:$(ruby -r rubygems -e "puts Gem.user_dir")/bin' >> $HOME/.profile; \
283-
. $HOME/.profile; \
273+
source $HOME/.profile; \
284274
gem install --user-install bundler; \
285275
# Have bundler install gems in the current directory (./.bundle) by default
286276
echo -e "\n"'export BUNDLE_PATH=.bundle' >> $HOME/.profile

8.4/Dockerfile

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22
# check=skip=SecretsUsedInArgOrEnv (ignore false positives in ARG/ENV)
33

4-
FROM php:8.4.17-fpm-bookworm AS cli
4+
FROM php:8.4.17-fpm-trixie AS cli
55

66
ARG TARGETARCH
77
ARG DEBIAN_FRONTEND=noninteractive
@@ -64,6 +64,7 @@ RUN set -xe; \
6464
procps \
6565
pv \
6666
rsync \
67+
sqlite3 \
6768
sudo \
6869
supervisor \
6970
unzip \
@@ -101,7 +102,7 @@ RUN set -xe; \
101102
# Configure sshd (for use PHPStorm's remote interpreters and tools integrations)
102103
# http://docs.docker.com/examples/running_ssh_service/
103104
RUN set -xe; \
104-
mkdir /var/run/sshd; \
105+
mkdir -p /var/run/sshd; \
105106
echo 'docker:docker' | chpasswd; \
106107
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config; \
107108
# SSH login fix. Otherwise user is kicked off after login
@@ -217,16 +218,6 @@ RUN set -xe; \
217218
# Cleanup
218219
apt-get clean; rm -rf /var/lib/apt/lists/*
219220

220-
# Install a newer SQLite version from Debian Trixie (testing) repo
221-
# Debian Bookworm (main) ships with sqlite v3.40. Drupal 11 requires SQLite v3.45+.
222-
# @see https://www.drupal.org/project/drupal/issues/3346338
223-
RUN set -xe; \
224-
echo "deb https://deb.debian.org/debian testing main" | tee /etc/apt/sources.list.d/testing.list; \
225-
apt-get update >/dev/null; \
226-
apt-get install -y -t testing sqlite3;\
227-
# Cleanup
228-
apt-get clean; rm -rf /var/lib/apt/lists/*; rm -f /etc/apt/sources.list.d/testing.list
229-
230221
# All further RUN commands will run as the "docker" user
231222
USER docker
232223
SHELL ["/bin/bash", "-c"]
@@ -238,49 +229,48 @@ RUN set -e; \
238229
# Add composer bin project level and global directories to PATH
239230
# Project level comes first and thus takes precedence over the global one
240231
echo -e "\n"'export PATH="$PATH:${PROJECT_ROOT:-/var/www}/vendor/bin"' >> $HOME/.profile; \
232+
echo -e "\n"'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> $HOME/.profile; \
233+
# Legacy composer global directory (for backward compatibility)
241234
echo -e "\n"'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> $HOME/.profile; \
242235
# Reload updated PATH from profile to make composer/etc. visible below
243-
. $HOME/.profile; \
236+
source $HOME/.profile; \
244237
# Drupal Coder & WP Coding Standards w/ a matching version of PHP_CodeSniffer
245238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
246239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
247240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
248241
# Don't fix the indentation or installed_paths will not be set correctly
249242
phpcs --config-set installed_paths \
250-
$HOME/.composer/vendor/drupal/coder/coder_sniffer/,\
251-
$HOME/.composer/vendor/wp-coding-standards/wpcs/,\
252-
$HOME/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
253-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
254-
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
255248
# Cleanup
256249
composer clear-cache
257250

258251
# Node.js (installed as user)
259252
ENV \
260253
NVM_VERSION=0.40.3 \
261254
NODE_VERSION=22.20.0 \
262-
# Yarn (Classic v1)
263-
# https://github.com/yarnpkg/yarn/releases
255+
# yarn v1 (classic) https://github.com/yarnpkg/yarn/releases
264256
YARN_VERSION=1.22.22
265257
# Don't use -x here, as the output may be excessive
266258
RUN set -e; \
267-
# NVM and a defaut Node.js version
259+
# NVM and a default Node.js version
268260
export PROFILE="$HOME/.profile"; \
269-
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \
270-
# Reload profile to load nvm (needed by Yarn installation below)
271-
. $HOME/.profile; \
272-
# Yarn (Classic v1)
273-
# Installing via npm to allow fore override with never versions via corepack
274-
npm install -g yarn@${YARN_VERSION}; \
275-
# Enable corepack (allows installing project level yarn v2+ via yarn)
276-
corepack enable
261+
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash; \
262+
# Load nvm right away (needed by Yarn installation below)
263+
source $HOME/.profile; \
264+
# Enable corepack and install yarn v1 (classic) globally
265+
corepack enable; \
266+
corepack install -g yarn@${YARN_VERSION}
277267

278268
## Ruby bundler
279269
## Don't use -x here, as the output may be excessive
280270
RUN set -e; \
281271
# Export ruby gem bin path
282272
echo 'export PATH=$PATH:$(ruby -r rubygems -e "puts Gem.user_dir")/bin' >> $HOME/.profile; \
283-
. $HOME/.profile; \
273+
source $HOME/.profile; \
284274
gem install --user-install bundler; \
285275
# Have bundler install gems in the current directory (./.bundle) by default
286276
echo -e "\n"'export BUNDLE_PATH=.bundle' >> $HOME/.profile

0 commit comments

Comments
 (0)