diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml index 523392ce5dd940..1df154d07bd670 100644 --- a/WORKSPACE.yaml +++ b/WORKSPACE.yaml @@ -7,7 +7,7 @@ defaultArgs: jbMarketplacePublishTrigger: "false" publishToJBMarketplace: true localAppVersion: unknown - codeCommit: 543d66ff57b0b01f48d6f66fc2fa2fc64d26a848 + codeCommit: 6ee8dc4c04033fa549b2a2ce563434b5015bab9d intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2021.3.2.tar.gz" golandDownloadUrl: "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz" pycharmDownloadUrl: "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz" diff --git a/components/ide/code/leeway.Dockerfile b/components/ide/code/leeway.Dockerfile index 879d304a7b5e3d..6befb600bd65e7 100644 --- a/components/ide/code/leeway.Dockerfile +++ b/components/ide/code/leeway.Dockerfile @@ -16,9 +16,7 @@ WORKDIR /gp-code RUN yarn --cwd remote --frozen-lockfile --network-timeout 180000 -FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_installer - -USER root +FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_builder ARG CODE_COMMIT @@ -40,12 +38,15 @@ RUN mkdir /gp-code \ && git fetch origin $CODE_COMMIT --depth=1 \ && git reset --hard FETCH_HEAD WORKDIR /gp-code -RUN yarn --frozen-lockfile --network-timeout 180000 \ - && yarn --cwd remote/web --frozen-lockfile --network-timeout 180000 \ - && yarn --cwd extensions compile \ +RUN yarn --frozen-lockfile --network-timeout 180000 + +# copy remote dependencies build in dependencies_builder image +RUN rm -rf remote/node_modules/ +COPY --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/ + +RUN yarn --cwd extensions compile \ && yarn gulp vscode-web-min \ && yarn gulp vscode-reh-linux-x64-min -COPY --from=dependencies_builder /gp-code/remote/node_modules/ /vscode-reh-linux-x64/node_modules/ # config for first layer needed by blobserve # we also remove `static/` from resource urls as that's needed by blobserve, @@ -62,13 +63,14 @@ RUN chmod -R ugo+x /ide/bin # grant write permissions for built-in extensions RUN chmod -R ugo+w /vscode-reh-linux-x64/extensions + FROM scratch # copy static web resources in first layer to serve from blobserve -COPY --from=code_installer --chown=33333:33333 /vscode-web/ /ide/ -COPY --from=code_installer --chown=33333:33333 /vscode-reh-linux-x64/ /ide/ +COPY --from=code_builder --chown=33333:33333 /vscode-web/ /ide/ +COPY --from=code_builder --chown=33333:33333 /vscode-reh-linux-x64/ /ide/ COPY --chown=33333:33333 startup.sh supervisor-ide-config.json /ide/ -COPY --from=code_installer --chown=33333:33333 /ide/bin /ide/bin/remote-cli +COPY --from=code_builder --chown=33333:33333 /ide/bin /ide/bin/remote-cli ENV GITPOD_ENV_APPEND_PATH /ide/bin/remote-cli: