From 50168ba01038a2432d5ee070aeb23a46a58a4dc5 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 15 Nov 2023 15:22:35 -0500 Subject: [PATCH 1/2] Fix Theia Docker build for Node 20 Signed-off-by: Timothy Johnson --- ze/theia-slim/Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ze/theia-slim/Dockerfile b/ze/theia-slim/Dockerfile index 5aab3cd..cd574a9 100644 --- a/ze/theia-slim/Dockerfile +++ b/ze/theia-slim/Dockerfile @@ -12,12 +12,10 @@ FROM node:${NODE_VERSION}-alpine RUN apk add --no-cache curl make pkgconfig gcc g++ python3 libx11-dev libxkbfile-dev libsecret-dev chromium WORKDIR /home/theia ADD buildPackageJson.js ./buildPackageJson.js -RUN node --experimental-fetch buildPackageJson.js ${THEIA_VERSION} > package.json +RUN echo $(node buildPackageJson.js ${THEIA_VERSION}) > package.json ARG GITHUB_TOKEN - -# First yarn generates the lockfile, second one installs things. Don't ask why this is necessary, I don't know either -_- -RUN yarn && \ - yarn && \ +RUN yarn global add node-gyp && \ + yarn --pure-lockfile && \ NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \ yarn theia download:plugins && \ yarn --production && \ @@ -26,8 +24,7 @@ RUN yarn && \ echo *.ts.map >> .yarnclean && \ echo *.spec.* >> .yarnclean && \ yarn autoclean --force && \ - yarn cache clean && \ - rm -f yarn.lock + yarn cache clean # Uncomment the following lines to install Zowe Explorer in the container # ARG ZOWE_EXPLORER_VERSION=2.9.2 # RUN cd /home/theia/plugins && \ From 89be5b11b6c1571e881658270f88fb4496004d0a Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Thu, 16 Nov 2023 09:10:41 -0500 Subject: [PATCH 2/2] Fix THEIA_VERSION arg being empty in Docker build Signed-off-by: Timothy Johnson --- ze/theia-slim/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ze/theia-slim/Dockerfile b/ze/theia-slim/Dockerfile index cd574a9..ecf4431 100644 --- a/ze/theia-slim/Dockerfile +++ b/ze/theia-slim/Dockerfile @@ -7,12 +7,12 @@ # Copyright Contributors to the Zowe Project. ARG NODE_VERSION=lts -ARG THEIA_VERSION=latest FROM node:${NODE_VERSION}-alpine RUN apk add --no-cache curl make pkgconfig gcc g++ python3 libx11-dev libxkbfile-dev libsecret-dev chromium WORKDIR /home/theia ADD buildPackageJson.js ./buildPackageJson.js -RUN echo $(node buildPackageJson.js ${THEIA_VERSION}) > package.json +ARG THEIA_VERSION=latest +RUN echo "$(node buildPackageJson.js ${THEIA_VERSION})" > package.json ARG GITHUB_TOKEN RUN yarn global add node-gyp && \ yarn --pure-lockfile && \