11#  Copyright (c) 2020 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:centos7-devtoolset8- x64 as dependencies_builder 
4+ FROM  gitpod/openvscode-server-linux-build-agent:focal- x64 as code_builder 
55
66ENV  TRIGGER_REBUILD 1
77
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
17- 
18- #  Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
19- ENV  DISABLE_V8_COMPILE_CACHE=1
20- 
21- RUN  yarn --cwd remote --frozen-lockfile --network-timeout 180000
22- 
23- FROM  gitpod/openvscode-server-linux-build-agent:focal-x64 as code_builder
24- 
258ENV  PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
269ENV  ELECTRON_SKIP_BINARY_DOWNLOAD=1
2710ENV  VSCODE_ARCH=x64
28- ENV  NPM_REGISTRY=https://registry.yarnpkg.com 
11+ ENV  NPM_REGISTRY=https://registry.npmjs.org 
2912
3013ARG  CODE_COMMIT
3114ARG  CODE_QUALITY
@@ -61,15 +44,10 @@ RUN apt-get install -y pkg-config dbus xvfb libgtk-3-0 libxkbfile-dev libkrb5-de
6144#  Disable v8 cache used by yarn v1.x, refs https://github.com/nodejs/node/issues/51555
6245ENV  DISABLE_V8_COMPILE_CACHE=1
6346
64- ENV  npm_config_arch=x64
47+ #   ENV npm_config_arch=x64
6548RUN  mkdir -p .build \
66-     && yarn config set registry "$NPM_REGISTRY"  \
67-     && yarn --cwd build --frozen-lockfile --check-files --network-timeout 180000 \
68-     && yarn --frozen-lockfile --check-files --network-timeout 180000
69- 
70- #  copy remote dependencies build in dependencies_builder image
71- RUN  rm -rf remote/node_modules/
72- COPY  --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/
49+     && npm config set registry "$NPM_REGISTRY"  \
50+     && npm ci
7351
7452#  check that the provided codeVersion is the correct one for the given codeCommit
7553RUN  commitVersion=$(cat package.json | jq -r .version) \
@@ -91,23 +69,23 @@ RUN nameShort=$(jq --raw-output '.nameShort' product.json) && \
9169    mv product.json.tmp product.json && \
9270    jq '{quality,nameLong,nameShort}'  product.json
9371
94- RUN  yarn  gulp compile-build \
95-     && yarn  gulp extensions-ci \
96-     && yarn  gulp minify-vscode-reh \
97-     && yarn  gulp vscode-web-min-ci \
98-     && yarn  gulp vscode-reh-linux-x64-min-ci
72+ RUN  npm run  gulp compile-build \
73+     && npm run  gulp extensions-ci \
74+     && npm run  gulp minify-vscode-reh \
75+     && npm run  gulp vscode-web-min-ci \
76+     && npm run  gulp vscode-reh-linux-x64-min-ci
9977
10078#  config for first layer needed by blobserve
10179#  this custom urls will be then replaced by blobserve.
10280#  Check pkg/blobserve/blobserve.go, `inlineVars` method
103- RUN  cp /vscode-web/out/vs/gitpod/browser/workbench/workbench.html /vscode-web/index.html \
104-      && cp /vscode-web/out/vs/gitpod/browser/workbench/callback.html /vscode-web/callback.html \
105-      && sed -i -e "s/{{VERSION}}/$CODE_QUALITY-$CODE_COMMIT/g"  /vscode-web/index.html
81+ RUN  cp /vscode-web/out/vs/gitpod/browser/workbench/workbench.esm. html /vscode-web/index.html \
82+ && cp /vscode-web/out/vs/gitpod/browser/workbench/callback.html /vscode-web/callback.html \
83+ && sed -i -e "s/{{VERSION}}/$CODE_QUALITY-$CODE_COMMIT/g"  /vscode-web/index.html
10684
10785#  cli config: alises to gitpod-code
10886RUN  cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/code \
109-      && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/gp-code \
110-      && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/open
87+ && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/gp-code \
88+ && cp /vscode-reh-linux-x64/bin/remote-cli/gitpod-code /vscode-reh-linux-x64/bin/remote-cli/open
11189
11290#  grant write permissions for built-in extensions
11391RUN  chmod -R ugo+w /vscode-reh-linux-x64/extensions
0 commit comments