cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1.03k stars 380 forks source link

Update from Debian 11 `bullseye` to Debian 12 `bookworm` #937

Closed MikeMcC399 closed 6 months ago

MikeMcC399 commented 1 year ago

This is an enhancement suggestion to migrate Cypress Docker Image generation from Debian 11 bullseye to Debian 12 bookworm.

Background

Cypress Docker Images are currently built based on debian:bullseye-slim from https://hub.docker.com/_/debian

https://github.com/cypress-io/cypress-docker-images/blob/103e75de45825c63a83a0b9c2db77e14682fd160/factory/.env#L7-L8

According to https://www.debian.org/releases/

https://www.debian.org/releases/bullseye/ states

https://www.debian.org/releases/bookworm/ states

https://endoflife.date/debian has an overview of relevant end-of-life dates.

MikeMcC399 commented 1 year ago

Docker Hub > debian offers an image with the tag debian:bookworm-slim for Debian 12.

jherkel commented 1 year ago

Is there any time schedule when this transition from old LTS to current LTS shall be finished?

MikeMcC399 commented 10 months ago

@jherkel

Is there any time schedule when this transition from old LTS to current LTS shall be finished?

I cannot see any planning for this so far. The Cypress.io team might like to give feedback.

MikeMcC399 commented 10 months ago

To update future Cypress Docker images to use Debian 12 would need changes to https://github.com/cypress-io/cypress-docker-images/blob/master/factory/.env

BASE_IMAGE='debian:12-slim'  

other versions should be updated at the same time

# Node Versions: https://nodejs.org/en/download/releases/
# using LTS version from https://nodejs.org/
FACTORY_DEFAULT_NODE_VERSION
FACTORY_VERSION
# Chrome versions: https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
CHROME_VERSION
# Cypress versions: https://www.npmjs.com/package/cypress
CYPRESS_VERSION
# Edge versions: https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/
EDGE_VERSION
# Firefox versions: https://download-installer.cdn.mozilla.net/pub/firefox/releases/
FIREFOX_VERSION
# Yarn versions: https://www.npmjs.com/package/yarn
YARN_VERSION
# WEBKIT_VERSION # currently not defined

Schedule

Users may like to have Cypress Docker images based on the current stable release. That would favor Cypress adopting Debian 12 "Bookworm" now.

According to https://wiki.debian.org/LTS

Release End of LTS Support
Debian 10 "Buster" June 30, 2024
Debian 11 "Bullseye" June 30, 2026
Debian 12 "Bookworm" June 30, 2028

So the latest date for a migration to a later Debian version after Debian 11 "Bullseye" would be June 30, 2026

gerwinbrunner commented 9 months ago

For us this is a little more pressing since we need to run mongo in the image and that now requires libcrypto.so.3 which is only available in Debian 12 :(

Any idea when usage of Debian 12 would be possible?

MikeMcC399 commented 9 months ago

@jennifer-shehane

Can you say if there are plans to migrate Cypress Docker images to a base of Debian 12? There hasn't been any reaction here so far from the Cypress.io team.

MikeMcC399 commented 9 months ago

@gerwinbrunner

For us this is a little more pressing since we need to run mongo in the image and that now requires libcrypto.so.3 which is only available in Debian 12 :(

Looking at Mongo Platform Support it seems that both Debian 11 and 12 should be supported. Could you share any reference which describes about the need for Debian 12?

gerwinbrunner commented 9 months ago

Hmmm.... I just get the error output when running the image:

/root/.meteor/packages/meteor-tool/.2.15.0.m6soqv.cbqtg++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongod:
error while loading shared libraries: libcrypto.so.3: cannot open shared object
file: No such file or directory
Unexpected mongo exit code 127. Restarting.
MikeMcC399 commented 9 months ago

@gerwinbrunner

Hmmm.... I just get the error output when running the image:

I'm not familiar with this, but it sounds like it is due to meteor-tool v2 which runs on the deprecated Node.js 14 version.

gerwinbrunner commented 8 months ago

indirectly you are right - but the actual issue is that it depends in the mongo client and that one needs newer os dependencies it seems.

libcrypto.so.3 is only avaliable in Debian 12 - not 11

And that causes the issue.

rafi0101 commented 7 months ago

is there any plan for when this will be implemented?

qskypl commented 7 months ago

Also looking for it, with the Debian 11 version I'm not able to upgrade openssl to version 3, as the max one is for 1.1.1, which is already EoL and does not provide required functions.

fabide commented 7 months ago

we would be more than happy as well to see the upgrade to debian 12. Thanks for your hard work!

jennifer-shehane commented 6 months ago

@MikeMcC399 We'd be open to this upgrade to Debian 12 and can help if any issues are encountered.

MikeMcC399 commented 6 months ago

@jennifer-shehane

We'd be open to this upgrade to Debian 12 and can help if any issues are encountered.

The change itself should be straightforward. The effort needs to go into testing to make sure that there are no surprises and nothing gets broken.

I'm willing to tackle this after I clear my plate of other work I'm doing. I'm also happy if somebody else wants to pick it up though! 🙂

MikeMcC399 commented 6 months ago

@jennifer-shehane

I had a preliminary look at this and it seems that I can't successfully run docker compose build on Windows where I have Docker Desktop installed. My Linux environments are all virtual under VMware Workstation (or WSL2) and I don't use or have macOS available.

So I'm most probably going to have to decline submitting a Debian 12 PR. Sorry about that!

MikeMcC399 commented 6 months ago

@jennifer-shehane

You can assign this issue to me and I will submit a PR to update to Debian 12.

MikeMcC399 commented 6 months ago
MikeMcC399 commented 6 months ago

cypress/factory:4.0.0 has now been published to Docker Hub cypress/factory

The version of Debian is confirmed updated to Debian 12.5 (bookworm):

docker pull cypress/factory:4.0.0
docker run -it cypress/factory:4.0.0
$ docker run -it cypress/factory:4.0.0
root@14b671476f0a:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@14b671476f0a:# cat /etc/debian_version
12.5

cypress/factory is not intended to be run stand-alone and is the base for building other Cypress Docker images.

By default, any newly generated Cypress Docker images (cypress/base, cypress/browsers and cypress/included) will be based on Debian 12 (bookworm).

Edit:

docker run --entrypoint cat cypress/base /etc/debian_version

also displays the Debian version

MikeMcC399 commented 6 months ago

Update info

On Cypress at dockerhub, images tagged with latest (default tag) are now all based on Debian 12.5 (bookworm). This is due to the release of Cypress 13.11.0 which in turn triggered releases for cypress/base, cypress/browsers and cypress/included..

Verification

docker run --entrypoint cat cypress/factory /etc/debian_version
docker run --entrypoint cat cypress/factory:4.0.2 /etc/debian_version
docker run --entrypoint cat cypress/base /etc/debian_version
docker run --entrypoint cat cypress/base:20.14.0 /etc/debian_version
docker run --entrypoint cat cypress/browsers /etc/debian_version
docker run --entrypoint cat cypress/browsers:node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1 /etc/debian_version
docker run --entrypoint cat cypress/included /etc/debian_version
docker run --entrypoint cat cypress/included:13.11.0 /etc/debian_version
docker run --entrypoint cat cypress/included:cypress-13.11.0-node-20.14.0-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1 /etc/debian_version

Each image outputs 12.5 as the contents of /etc/debian_version confirming that Debian 12.5 (bookworm) is installed.

Other updates

Thanks to @AtofStryker 🚀 the images are not only updated to the latest Debian version, but also to: