Skip to content

Commit

Permalink
Fix Theia Docker build for Node 20
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
  • Loading branch information
t1m0thyj committed Nov 15, 2023
1 parent 35a3551 commit 50168ba
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ze/theia-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 && \
Expand Down

0 comments on commit 50168ba

Please sign in to comment.