From 1dfd740fc15029b6f07801e5d47637d375c0988d Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Wed, 4 Dec 2024 11:48:55 -0600 Subject: [PATCH] Bookworm2 (#142) * use 5g images * some dependency updates * stdout versions during tests * test for newer versions --- builders/php.js | 2 +- docs/config.md | 13 ++++++++++ examples/5.6/.lando.yml | 2 +- examples/7.0/.lando.yml | 2 +- examples/7.1/.lando.yml | 2 +- examples/7.2/.lando.yml | 2 +- examples/7.3/.lando.yml | 2 +- examples/7.4/.lando.yml | 2 +- examples/8.0/.lando.yml | 2 +- examples/8.1/.lando.yml | 2 +- examples/8.1/README.md | 10 ++++---- examples/8.2/.lando.yml | 2 +- examples/8.2/README.md | 10 ++++---- examples/8.3/.lando.yml | 2 +- examples/8.3/README.md | 10 ++++---- examples/8.4/.lando.yml | 2 +- examples/8.4/README.md | 10 ++++---- examples/custom/.lando.yml | 2 +- examples/custom/Dockerfile.node | 2 +- examples/php-extensions/Dockerfile.custom | 2 +- package-lock.json | 30 ++++++++++++----------- package.json | 8 +++--- 22 files changed, 68 insertions(+), 53 deletions(-) diff --git a/builders/php.js b/builders/php.js index e2bea9b..2942255 100644 --- a/builders/php.js +++ b/builders/php.js @@ -127,7 +127,7 @@ module.exports = { pool: '/usr/local/etc/php-fpm.d/zz-lando.conf', }, sources: [], - suffix: '4', + suffix: '5', ssl: false, via: 'apache', volumes: ['/usr/local/bin'], diff --git a/docs/config.md b/docs/config.md index 476ef4d..49c6bf4 100644 --- a/docs/config.md +++ b/docs/config.md @@ -287,3 +287,16 @@ proxy: ``` Lando proxying is actually pretty powerful so definitely check out [the rest](https://docs.lando.dev/landofile/proxy.html) of its cool features. + +## Advanced Image Configuration + +Starting with version 5 of our Docker images (eg devwithlando/php:8.2-fpm-5), we now use Debian 12 (Bookworm) as the base image. If you need to use the previous Debian 11-based images, you can set the `suffix` option to `4` to use those older image versions (eg devwithlando/php:8.2-fpm-4): + +```yaml +services: + myservice: + type: php:8.2 + suffix: 4 +``` + +Most users will never need to modify this setting, as it's primarily useful when specific dependency versions from Debian 11 are required. diff --git a/examples/5.6/.lando.yml b/examples/5.6/.lando.yml index 099b162..e6bcef5 100644 --- a/examples/5.6/.lando.yml +++ b/examples/5.6/.lando.yml @@ -25,7 +25,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:5.6-fpm-4 + image: devwithlando/php:5.6-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/7.0/.lando.yml b/examples/7.0/.lando.yml index 870ce6d..2066ec5 100644 --- a/examples/7.0/.lando.yml +++ b/examples/7.0/.lando.yml @@ -30,7 +30,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:7.0-fpm-4 + image: devwithlando/php:7.0-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/7.1/.lando.yml b/examples/7.1/.lando.yml index d1956be..1dcc2ed 100644 --- a/examples/7.1/.lando.yml +++ b/examples/7.1/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:7.1-fpm-4 + image: devwithlando/php:7.1-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/7.2/.lando.yml b/examples/7.2/.lando.yml index 82a31aa..7606cce 100644 --- a/examples/7.2/.lando.yml +++ b/examples/7.2/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:7.2-fpm-4 + image: devwithlando/php:7.2-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/7.3/.lando.yml b/examples/7.3/.lando.yml index fd4eb34..d710e30 100644 --- a/examples/7.3/.lando.yml +++ b/examples/7.3/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:7.3-fpm-4 + image: devwithlando/php:7.3-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/7.4/.lando.yml b/examples/7.4/.lando.yml index 981b7c5..1c06da6 100644 --- a/examples/7.4/.lando.yml +++ b/examples/7.4/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:7.4-fpm-4 + image: devwithlando/php:7.4-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.0/.lando.yml b/examples/8.0/.lando.yml index 406c39f..dc61acc 100644 --- a/examples/8.0/.lando.yml +++ b/examples/8.0/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:8.0-fpm-4 + image: devwithlando/php:8.0-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.1/.lando.yml b/examples/8.1/.lando.yml index 7fefbff..36917c1 100644 --- a/examples/8.1/.lando.yml +++ b/examples/8.1/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:8.1-fpm-4 + image: devwithlando/php:8.1-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.1/README.md b/examples/8.1/README.md index 5a5f3e0..b6fc7dd 100644 --- a/examples/8.1/README.md +++ b/examples/8.1/README.md @@ -22,13 +22,13 @@ Run the following commands to validate things are rolling as they should. ```bash # Should use 8.1 as the default php version -lando exec defaults -- php -v | grep "PHP 8.1" +lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.1" # Should use 13.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "13." +lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." # Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." +lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." # Should only serve over http by default lando exec defaults -- curl https://localhost || echo $? | grep 7 @@ -57,7 +57,7 @@ lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED # Should use specified php version if given -lando exec custom -- php -v | grep "PHP 8.1" +lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.1" # Should install composer 2.1.12 if version number is set lando exec custom -- composer --version --no-ansi | grep "Composer version 2.1.12" @@ -114,7 +114,7 @@ lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity lando exec cliworker -- composer --version --no-ansi | grep "Composer version 2." # Should have node14 installed in cli service -lando node -v | grep v14. +lando node -v | tee >(cat 1>&2) | grep v18. ``` ## Destroy tests diff --git a/examples/8.2/.lando.yml b/examples/8.2/.lando.yml index e5b7461..c100081 100644 --- a/examples/8.2/.lando.yml +++ b/examples/8.2/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:8.2-fpm-4 + image: devwithlando/php:8.2-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.2/README.md b/examples/8.2/README.md index d78fa99..5e1866c 100644 --- a/examples/8.2/README.md +++ b/examples/8.2/README.md @@ -22,13 +22,13 @@ Run the following commands to validate things are rolling as they should. ```bash # Should use 8.2 as the default php version -lando exec defaults -- php -v | grep "PHP 8.2" +lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.2" # Should use 13.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "13." +lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." # Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." +lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." # Should only serve over http by default lando exec defaults -- curl https://localhost || echo $? | grep 7 @@ -57,7 +57,7 @@ lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED # Should use specified php version if given -lando exec custom -- php -v | grep "PHP 8.2" +lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.2" # Should install composer 2.2.18 if version number is set lando exec custom -- composer --version --no-ansi | grep "Composer version 2.2.18" @@ -114,7 +114,7 @@ lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity lando exec cliworker -- composer --version --no-ansi | grep "Composer version 2." # Should have node14 installed in cli service -lando node -v | grep v14. +lando node -v | tee >(cat 1>&2) | grep v18. ``` ## Destroy tests diff --git a/examples/8.3/.lando.yml b/examples/8.3/.lando.yml index 4229171..59d162d 100644 --- a/examples/8.3/.lando.yml +++ b/examples/8.3/.lando.yml @@ -29,7 +29,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:8.3-fpm-4 + image: devwithlando/php:8.3-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.3/README.md b/examples/8.3/README.md index fc1ce3c..20930a7 100644 --- a/examples/8.3/README.md +++ b/examples/8.3/README.md @@ -22,13 +22,13 @@ Run the following commands to validate things are rolling as they should. ```bash # Should use 8.3 as the default php version -lando exec defaults -- php -v | grep "PHP 8.3" +lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.3" # Should use 13.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "13." +lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." # Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." +lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." # Should only serve over http by default lando exec defaults -- curl https://localhost || echo $? | grep 7 @@ -57,7 +57,7 @@ lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED # Should use specified php version if given -lando exec custom -- php -v | grep "PHP 8.3" +lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.3" # Should install composer 2.5.6 if version number is set lando exec custom -- composer --version --no-ansi | grep "Composer version 2.5.6" @@ -114,7 +114,7 @@ lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity lando exec cliworker -- composer --version --no-ansi | grep "Composer version 2." # Should have node14 installed in cli service -lando node -v | grep v14. +lando node -v | tee >(cat 1>&2) | grep v18. ``` ## Destroy tests diff --git a/examples/8.4/.lando.yml b/examples/8.4/.lando.yml index 7261c32..ea1ba1e 100644 --- a/examples/8.4/.lando.yml +++ b/examples/8.4/.lando.yml @@ -28,7 +28,7 @@ services: config: php: config/php.ini overrides: - image: devwithlando/php:8.4-fpm-4 + image: devwithlando/php:8.4-fpm-5 environment: DUALBLADE: maxim OTHER: thing diff --git a/examples/8.4/README.md b/examples/8.4/README.md index ac252ae..d63eb7f 100644 --- a/examples/8.4/README.md +++ b/examples/8.4/README.md @@ -22,13 +22,13 @@ Run the following commands to validate things are rolling as they should. ```bash # Should use 8.4 as the default php version -lando exec defaults -- php -v | grep "PHP 8.4" +lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.4" # Should use 15.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "15." +lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." # Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." +lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." # Should only serve over http by default lando exec defaults -- curl https://localhost || echo $? | grep 7 @@ -57,7 +57,7 @@ lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED # Should use specified php version if given -lando exec custom -- php -v | grep "PHP 8.4" +lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.4" # Should install composer 2.5.6 if version number is set lando exec custom -- composer --version --no-ansi | grep "Composer version 2.5.6" @@ -111,7 +111,7 @@ lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity lando exec cliworker -- composer --version --no-ansi | grep "Composer version 2." # Should have node 18 installed in cli service -lando node -v | grep v18. +lando node -v | tee >(cat 1>&2) | grep v18. ``` ## Destroy tests diff --git a/examples/custom/.lando.yml b/examples/custom/.lando.yml index d96d40a..ca07026 100644 --- a/examples/custom/.lando.yml +++ b/examples/custom/.lando.yml @@ -18,7 +18,7 @@ services: pool: config/www.conf composer_version: '2.1.14' overrides: - image: devwithlando/php:8.1-fpm-4 + image: devwithlando/php:8.1-fpm-5 tooling: node: service: :host diff --git a/examples/custom/Dockerfile.node b/examples/custom/Dockerfile.node index 3f73dff..e7b4818 100644 --- a/examples/custom/Dockerfile.node +++ b/examples/custom/Dockerfile.node @@ -1,4 +1,4 @@ -FROM devwithlando/php:7.4-apache-4 +FROM devwithlando/php:7.4-apache-5 # Choose the major node version ENV NODE_VERSION=12 diff --git a/examples/php-extensions/Dockerfile.custom b/examples/php-extensions/Dockerfile.custom index e63c32b..f778a47 100644 --- a/examples/php-extensions/Dockerfile.custom +++ b/examples/php-extensions/Dockerfile.custom @@ -1,4 +1,4 @@ -FROM devwithlando/php:7.4-apache-4 +FROM devwithlando/php:7.4-apache-5 # Add php extension helper ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ diff --git a/package-lock.json b/package-lock.json index 90915ea..3101b09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "1.6.1", "license": "GPL-3.0", "dependencies": { - "@lando/nginx": "^1.3.0", + "@lando/nginx": "^1.4.1", "lodash": "^4.17.21", - "semver": "^7.3.7" + "semver": "^7.6.3" }, "devDependencies": { - "@babel/eslint-parser": "^7.16.0", - "@lando/leia": "0.6.5", + "@babel/eslint-parser": "^7.25.9", + "@lando/leia": "0.6.7", "@lando/vitepress-theme-default-plus": "^1.1.0-beta.24", "chai": "^4.3.4", "command-line-test": "^1.0.10", @@ -424,10 +424,11 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz", - "integrity": "sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz", + "integrity": "sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==", "dev": true, + "license": "MIT", "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", @@ -438,7 +439,7 @@ }, "peerDependencies": { "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0" + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@babel/eslint-parser/node_modules/semver": { @@ -1360,10 +1361,11 @@ } }, "node_modules/@lando/leia": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/@lando/leia/-/leia-0.6.5.tgz", - "integrity": "sha512-CssUrscDgc7ruw4IRkdmPHumgK7X6THBD71XUgyUREEi2sx5nkgL828hqJHwm8VOLCWm5ZIQxLsprstjai69MA==", + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/@lando/leia/-/leia-0.6.7.tgz", + "integrity": "sha512-1ldWSeDABuELs4mDcmIFVbl3yB/hVWDjk1f8SFtNGwouR3SAPezoQ67EpCM+4WVnuLk4e2Q0y4dkOeNf14b6wg==", "dev": true, + "license": "GPL-3.0", "dependencies": { "@lando/argv": "^1.0.6", "@oclif/command": "^1.8.0", @@ -1567,9 +1569,9 @@ } }, "node_modules/@lando/nginx": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@lando/nginx/-/nginx-1.3.0.tgz", - "integrity": "sha512-ln1pxPOLvX+eK7LDTqTKbwAGPdHoL3o1WBA2cKCP/czsTbAAjQauwtZ7YNGzFjmQgxV6ZxHFpMJvYGezPI9MQw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@lando/nginx/-/nginx-1.4.1.tgz", + "integrity": "sha512-9wY/dp9mYTQvQIMBFUdVQN7pC3uP0oLfVITF5W9sPqGytVPDZYZl2UescD74+Omy9A2h+AfUW87YXJDLCNNh2A==", "bundleDependencies": [ "lodash" ], diff --git a/package.json b/package.json index 27b0557..906917e 100644 --- a/package.json +++ b/package.json @@ -43,13 +43,13 @@ "test": "npm run lint && npm run test:unit" }, "dependencies": { - "@lando/nginx": "^1.3.0", + "@lando/nginx": "^1.4.1", "lodash": "^4.17.21", - "semver": "^7.3.7" + "semver": "^7.6.3" }, "devDependencies": { - "@babel/eslint-parser": "^7.16.0", - "@lando/leia": "0.6.5", + "@babel/eslint-parser": "^7.25.9", + "@lando/leia": "0.6.7", "@lando/vitepress-theme-default-plus": "^1.1.0-beta.24", "chai": "^4.3.4", "command-line-test": "^1.0.10",