cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers

Home Page:https://on.cypress.io/continuous-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

MikeMcC399 opened this issue · comments

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

# The debian image the factory is based on
BASE_IMAGE='debian:bullseye-slim'

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

  • Debian 12 codenamed bookworm is the current stable release
  • Debian 11 codenamed bullseye is the current oldstable release

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

  • Debian 11.0 was initially released on August 14th, 2021
  • Debian 11 has been superseded by Debian 12 (bookworm).

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

  • Debian 12.5 was released on February 10th, 2024. Debian 12.0 was initially released on June 10th, 2023.

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

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

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

@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.

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

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?

@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.

@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?

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.

@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.

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.

is there any plan for when this will be implemented?

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.

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

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

@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! 🙂

@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!

@jennifer-shehane

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

  • In the process of working on this, I hit an issue with an obsolete version definition for Docker compose and I submitted #1054 for that. I'd like to rebase the Debian 12 PR on this fix.

  • In the meantime I have branch debian-12 sitting waiting.

  • PR #1057 submitted to resolve this enhancement request

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

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: