Skip to content

Commit cbfb575

Browse files
authored
Updata code build image (#19763)
* Updata code build image * Make build pass
1 parent 5880ca4 commit cbfb575

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

components/ide/code/leeway.Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ RUN mkdir /gp-code \
1212
&& git fetch origin $CODE_COMMIT --depth=1 \
1313
&& git reset --hard FETCH_HEAD
1414
WORKDIR /gp-code
15+
16+
# Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
17+
ENV DISABLE_V8_COMPILE_CACHE=1
18+
1519
RUN yarn --cwd remote --frozen-lockfile --network-timeout 180000
1620

1721
FROM gitpod/openvscode-server-linux-build-agent:focal-x64 as code_builder
@@ -27,7 +31,13 @@ ARG CODE_VERSION
2731

2832
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
2933
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
30-
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
34+
35+
RUN if dpkg --compare-versions "$CODE_VERSION" "ge" "1.90"; then \
36+
NODE_VERSION=20; \
37+
else \
38+
NODE_VERSION=18; \
39+
fi && \
40+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
3141
RUN apt-get update && apt-get install -y nodejs
3242

3343
RUN mkdir /gp-code \
@@ -46,6 +56,9 @@ RUN apt-get install -y pkg-config dbus xvfb libgtk-3-0 libxkbfile-dev libkrb5-de
4656
# Start dbus session
4757
&& mkdir -p /var/run/dbus
4858

59+
# Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
60+
ENV DISABLE_V8_COMPILE_CACHE=1
61+
4962
ENV npm_config_arch=x64
5063
RUN mkdir -p .build \
5164
&& yarn config set registry "$NPM_REGISTRY" \

0 commit comments

Comments
 (0)