Skip to content

Update code dockerfile #8110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WORKSPACE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 12 additions & 10 deletions components/ide/code/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand All @@ -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:

Expand Down