Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions build/dockerfiles/README.md
Original file line number Diff line number Diff line change
@@ -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`
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions build/dockerfiles/assembly.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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.*
Expand Down
14 changes: 6 additions & 8 deletions build/dockerfiles/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 6 additions & 3 deletions build/dockerfiles/linux-musl.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down