che
che copied to clipboard
Make it possible to run Che-Code on UBI 9
Is your task related to a problem? Please describe
When running Che-Code in a UBI9-based container, it fails with the following error:
./node: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
Describe the solution you'd like
Probably, it requires adding some libs to Che-Code image.
Describe alternatives you've considered
There was an internal discussion on the possibility of running Che-Code in any image. It requires reviewing how we package the VS Code. Also, there were some ideas to check about using the statically linked libraries.
Additional context
No response
on ubi9 there are different libcrypto versions
/usr/lib64/libcrypto.so.3.0.1
/usr/lib64/libcrypto.so.3
so maybe copying nodejs binary from ubi9/nodejs-16
in addition to ubi8
or we grab a nodejs binary with a different openssl version
In order for this to work downstream we would need to start from https://catalog.redhat.com/software/containers/ubi9/nodejs-16/61a60604c17162a20c1c6a2e or https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5 and adjust the image as needed.
In order for this to work downstream we would need to start from catalog.redhat.com/software/containers/ubi9/nodejs-16/61a60604c17162a20c1c6a2e or catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5 and adjust the image as needed.
@nickboldt are you sure? This is not about using UBI 9 image for UDI (or for VS Code). This is to allow a user to specify an UBI 9 based custom image in a devfile and VS Code as an editor.
UBI 8
image uses 1.1.1
version of openssl

UBI 9
image uses 3.0.1
version of openssl

For che-code
we use node
that requires 1.1.1
version of openssl
@l0rd @benoitf we're going to apply the solution proposed in https://github.com/che-incubator/che-code/pull/120. See more details in the comment. It's simple and allows to work around the original problem while we're not migrated to UBI9.
I would have added a nodejs ubi9 binary in the image and pick-up at runtime the correct nodejs binary.
if ssl 1.1, pick-up nodejs from ubi8 else if ssl 3, use nodejs from ubi9 (we already have a nodejs for alpine and another one for ubi8)
Also the active nodejs LTS version will be switched to nodejs 18 at the end of this month (and since nodejs17, openssl to use is v3) so more and more people will expect to have openssl 3
I would have added a nodejs ubi9 binary in the image and pick-up at runtime the correct nodejs binary.
hello, Florent!
Agree, it would be good solution and I tried it some time ago.
I took Node.js 16
which statically links against OpenSSL 3
from ubi9/nodejs-16
image and tried to use it here to run VS Code.
But I faced with the error like: Error: libnode.so.93: cannot open shared object file: No such file or directory
.
I guess the problem is:
- I took installed node file
- but there is no
/usr/lib64/libnode.so.93
file in the customer's runtime image
A possible solution is: a user who is using the UBI 9 based custom image as UDI should provide two things:
- install
Node.js 16
which statically links againstOpenSSL 3
- provide environment variable with path to the installed node
On the che-code
side we use that node to run VS Code, please see my draft PR to che-code
.
Also the active nodejs LTS version will be switched to nodejs 18 at the end of this month (and since nodejs17, openssl to use is v3) so more and more people will expect to have openssl 3
I commented about it 5 days ago in another issue (Artem posted the corresponding link above, but you should be logged in).
In short, right now we can not switch from Node.js 16
to another version as VS Code requires a version >=16.14.x and <17.
Downstream link: https://issues.redhat.com/browse/CRW-3261
@azatsarynnyy can we close this? Asking to decide if we can include it in the 7.55 release notes
@RomanNikitenko @azatsarynnyy I have changed the title to reflect the actual new feature as it will be mentioned in the release notes. Can you please confirm it's correct?
VS Code for Eclipse Che is bundled with OpenSSL 3 (and works with both UBI 8 and 9)
@l0rd VS Code for Eclipse Che is not bundled with OpenSSL 3 after fixing this issue. But OpenSSL 3 is already provided in UBI 9 image. @RomanNikitenko please, correct me if I'm wrong.
I'd restate the title as VS Code for Eclipse Che works with both UBI 8 and 9
.
The issue has been fixed by the PR:
- https://github.com/che-incubator/che-code/pull/120
Also, we're going to extend the Che-Code readme docs with instructions for running VS Code in a UBI 9-based container.
The instructions on how to run VS Code in a UBI9-based container: https://github.com/che-incubator/che-code/tree/main/build/dockerfiles#running-visual-studio-code---open-source-code---oss-in-a-ubi9-based-container
Sync'd with Red Hat JIRA https://issues.redhat.com/browse/CRW-3633
@SDawley Are there any plans for 2024 to move Dev Spaces from UBI8 to UBI9 base images? FYI @nickboldt