diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e3699ffc6d..3701c05d987 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: name: "Setup Node" uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Check existing tags run: | diff --git a/build/dockerfiles/README.md b/build/dockerfiles/README.md index 9894bba0f5e..509d4a205fe 100644 --- a/build/dockerfiles/README.md +++ b/build/dockerfiles/README.md @@ -1,6 +1,6 @@ ## Running Visual Studio Code - Open Source ("Code - OSS") in a UBI9-based container `Node.js` is required to run `Code-OSS` (see required version [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)). -This project includes [dockefiles](https://github.com/che-incubator/che-code/tree/main/build/dockerfiles) that based on the `ubi8/nodejs-16` image - an assembly contains `Node.js 16` that requires `OpenSSL 1`. +This project includes [dockefiles](https://github.com/che-incubator/che-code/tree/main/build/dockerfiles) that based on the `ubi8/nodejs-18` image - an assembly contains `Node.js 18` that requires `OpenSSL 1`. One of the differences between `UBI8` and `UBI9` image is: - `UBI8` image uses `OpenSSL 1` @@ -9,12 +9,12 @@ One of the differences between `UBI8` and `UBI9` image is: So, `Code-OSS` can be run in a `UBI8`-based container without additional requirements. In order to run `Code-OSS` in a `UBI9`-based container you'll need the following: -- install `Node.js 16` which statically links against `OpenSSL 3` +- install `Node.js 18` which statically links against `OpenSSL 3` - provide environment variable `VSCODE_NODEJS_RUNTIME_DIR` with the path to the installed node For example: ``` -FROM registry.access.redhat.com/ubi9/ubi:9.0.0-1576 +FROM registry.access.redhat.com/ubi9/ubi:9.2 RUN dnf install -y nodejs ENV VSCODE_NODEJS_RUNTIME_DIR="/usr/bin" diff --git a/build/dockerfiles/assembly.Dockerfile b/build/dockerfiles/assembly.Dockerfile index 5a05c2ef5ce..00db98d7a2f 100644 --- a/build/dockerfiles/assembly.Dockerfile +++ b/build/dockerfiles/assembly.Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Red Hat, Inc. +# Copyright (c) 2021-2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -14,7 +14,7 @@ FROM linux-musl-amd64 as linux-musl-content FROM quay.io/eclipse/che-machine-exec:7.56.0 as machine-exec # https://registry.access.redhat.com/ubi8/ubi -FROM registry.access.redhat.com/ubi8/ubi:8.6-990 AS ubi-builder +FROM registry.access.redhat.com/ubi8/ubi:8.9 AS ubi-builder RUN mkdir -p /mnt/rootfs RUN yum install --installroot /mnt/rootfs brotli libstdc++ coreutils glibc-minimal-langpack --releasever 8 --setopt install_weak_deps=false --nodocs -y && yum --installroot /mnt/rootfs clean all RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* diff --git a/build/dockerfiles/dev.Dockerfile b/build/dockerfiles/dev.Dockerfile index e83ebc51a62..17a3eb753f2 100644 --- a/build/dockerfiles/dev.Dockerfile +++ b/build/dockerfiles/dev.Dockerfile @@ -34,24 +34,22 @@ ENV ZSH_DISABLE_COMPFIX="true" USER 10001 -ENV NODEJS_VERSION=18.16.1 +ENV NODEJS_VERSION=18.18.2 ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1 \ - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 \ + PATH=$NVM_DIR/versions/node/v$NODEJS_VERSION/bin:$PATH RUN source $NVM_DIR/nvm.sh && \ nvm install v$NODEJS_VERSION && \ nvm alias default v$NODEJS_VERSION && \ - nvm use v$NODEJS_VERSION && \ - npm install --global npm@9.7.2 && \ - npm install --global yarn@v1.22.19 - -ENV PATH=$NVM_DIR/versions/node/v$NODEJS_VERSION/bin:$PATH + nvm use v$NODEJS_VERSION USER 0 +RUN npm install --global npm@9.7.2 yarn@v1 node-gyp@9 # Set permissions on /home/user/.cache to allow the user to write -RUN yarn global add node-gyp +RUN yarn global add node-gyp@9 RUN chgrp -R 0 /home/user/.cache && chmod -R g=u /home/user/.cache USER 10001 diff --git a/build/dockerfiles/linux-musl.Dockerfile b/build/dockerfiles/linux-musl.Dockerfile index df70650ba6d..d2f66a767d8 100644 --- a/build/dockerfiles/linux-musl.Dockerfile +++ b/build/dockerfiles/linux-musl.Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Red Hat, Inc. +# Copyright (c) 2021-2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -7,7 +7,7 @@ # # Make an assembly including both musl and libc variant to be able to run on all linux systems -FROM docker.io/node:18.16.1-alpine3.18 as linux-musl-builder +FROM docker.io/node:18.18.2-alpine3.18 as linux-musl-builder RUN apk add --update --no-cache \ # Download some files @@ -37,11 +37,14 @@ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 # Initialize a git repository for code build tools RUN git init . +# install node-gyp (yarn already installed) +RUN npm install --global node-gyp@9 + # change network timeout (slow using multi-arch build) RUN yarn config set network-timeout 600000 -g # Grab dependencies -RUN yarn +RUN yarn install # Rebuild platform specific dependencies RUN npm rebuild diff --git a/rebase.sh b/rebase.sh index a2ca9d0b03b..5ec5a07766b 100755 --- a/rebase.sh +++ b/rebase.sh @@ -146,6 +146,8 @@ apply_code_remote_yarn_lock_changes() { # reset the file from what is upstream git checkout --theirs code/remote/yarn.lock > /dev/null 2>&1 + yarn add node-gyp@9 + # update yarn lock yarn --ignore-scripts --cwd code/remote