Skip to content

Commit 03e438e

Browse files
committed
Fix
1 parent 951598b commit 03e438e

File tree

3 files changed

+67
-161
lines changed

3 files changed

+67
-161
lines changed

components/ide/code/BUILD.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ packages:
2525
- codeQuality
2626
- codeVersion
2727
config:
28-
dockerfile: leeway.nightly.Dockerfile
28+
dockerfile: leeway.Dockerfile
2929
metadata:
3030
helm-component: workspace.codeImage
3131
buildArgs:

components/ide/code/leeway.Dockerfile

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
1-
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
1+
# Copyright (c) 2024 Gitpod GmbH. All rights reserved.
22
# Licensed under the GNU Affero General Public License (AGPL).
33
# See License.AGPL.txt in the project root for license information.
4-
FROM gitpod/openvscode-server-linux-build-agent:focal-x64 as code_builder
4+
FROM gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8-x64 as dependencies_builder
5+
6+
ENV TRIGGER_REBUILD 1
7+
8+
ARG CODE_COMMIT
9+
10+
RUN mkdir /gp-code \
11+
&& cd /gp-code \
12+
&& git init \
13+
&& git remote add origin https://github.com/gitpod-io/openvscode-server \
14+
&& git fetch origin $CODE_COMMIT --depth=1 \
15+
&& git reset --hard FETCH_HEAD
16+
WORKDIR /gp-code/remote
17+
18+
RUN npm ci
19+
20+
FROM ubuntu:22.04 as code_builder
21+
22+
ARG DEBIAN_FRONTEND=noninteractive
523

624
ENV TRIGGER_REBUILD 1
725

@@ -15,6 +33,47 @@ ARG CODE_COMMIT
1533
ARG CODE_QUALITY
1634
ARG CODE_VERSION
1735

36+
# Latest stable git
37+
RUN apt-get update && apt-get install -y software-properties-common
38+
RUN add-apt-repository ppa:git-core/ppa -y
39+
40+
RUN apt-get update && apt-get install -y \
41+
apt-transport-https \
42+
ca-certificates \
43+
curl \
44+
file \
45+
git \
46+
gnome-keyring \
47+
iproute2 \
48+
libfuse2 \
49+
libgconf-2-4 \
50+
libgdk-pixbuf2.0-0 \
51+
libgl1 \
52+
libgtk-3.0 \
53+
libsecret-1-dev \
54+
libssl-dev \
55+
libx11-dev \
56+
libx11-xcb-dev \
57+
libxkbfile-dev \
58+
locales \
59+
lsb-release \
60+
lsof \
61+
python3-pip \
62+
sudo \
63+
wget \
64+
xvfb \
65+
tzdata \
66+
unzip \
67+
jq
68+
69+
# Set python3 as default
70+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
71+
RUN python --version
72+
73+
# Check compiler toolchain
74+
RUN gcc --version
75+
RUN g++ --version
76+
1877
RUN sudo mkdir -m 0755 -p /etc/apt/keyrings
1978
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
2079

@@ -37,11 +96,15 @@ RUN apt-get install -y pkg-config dbus xvfb libgtk-3-0 libxkbfile-dev libkrb5-de
3796
# Start dbus session
3897
&& mkdir -p /var/run/dbus
3998

40-
# ENV npm_config_arch=x64
99+
ENV npm_config_arch=x64
41100
RUN mkdir -p .build \
42101
&& npm config set registry "$NPM_REGISTRY" \
43102
&& npm ci
44103

104+
# copy remote dependencies build in dependencies_builder image
105+
RUN rm -rf remote/node_modules/
106+
COPY --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/
107+
45108
# check that the provided codeVersion is the correct one for the given codeCommit
46109
RUN commitVersion=$(cat package.json | jq -r .version) \
47110
&& if [ "$commitVersion" != "$CODE_VERSION" ]; then echo "Code version mismatch: $commitVersion != $CODE_VERSION"; exit 1; fi

components/ide/code/leeway.nightly.Dockerfile

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)