Skip to content

Commit fddc395

Browse files
jeanp413roboquat
authored andcommitted
Update code dockerfile
1 parent fcb3dd2 commit fddc395

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

WORKSPACE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defaultArgs:
77
jbMarketplacePublishTrigger: "false"
88
publishToJBMarketplace: true
99
localAppVersion: unknown
10-
codeCommit: 543d66ff57b0b01f48d6f66fc2fa2fc64d26a848
10+
codeCommit: 6ee8dc4c04033fa549b2a2ce563434b5015bab9d
1111
intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2021.3.2.tar.gz"
1212
golandDownloadUrl: "https://download.jetbrains.com/go/goland-2021.3.3.tar.gz"
1313
pycharmDownloadUrl: "https://download.jetbrains.com/python/pycharm-professional-2021.3.2.tar.gz"

components/ide/code/leeway.Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ WORKDIR /gp-code
1616
RUN yarn --cwd remote --frozen-lockfile --network-timeout 180000
1717

1818

19-
FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_installer
20-
21-
USER root
19+
FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_builder
2220

2321
ARG CODE_COMMIT
2422

@@ -40,12 +38,15 @@ RUN mkdir /gp-code \
4038
&& git fetch origin $CODE_COMMIT --depth=1 \
4139
&& git reset --hard FETCH_HEAD
4240
WORKDIR /gp-code
43-
RUN yarn --frozen-lockfile --network-timeout 180000 \
44-
&& yarn --cwd remote/web --frozen-lockfile --network-timeout 180000 \
45-
&& yarn --cwd extensions compile \
41+
RUN yarn --frozen-lockfile --network-timeout 180000
42+
43+
# copy remote dependencies build in dependencies_builder image
44+
RUN rm -rf remote/node_modules/
45+
COPY --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/
46+
47+
RUN yarn --cwd extensions compile \
4648
&& yarn gulp vscode-web-min \
4749
&& yarn gulp vscode-reh-linux-x64-min
48-
COPY --from=dependencies_builder /gp-code/remote/node_modules/ /vscode-reh-linux-x64/node_modules/
4950

5051
# config for first layer needed by blobserve
5152
# we also remove `static/` from resource urls as that's needed by blobserve,
@@ -62,13 +63,14 @@ RUN chmod -R ugo+x /ide/bin
6263
# grant write permissions for built-in extensions
6364
RUN chmod -R ugo+w /vscode-reh-linux-x64/extensions
6465

66+
6567
FROM scratch
6668
# copy static web resources in first layer to serve from blobserve
67-
COPY --from=code_installer --chown=33333:33333 /vscode-web/ /ide/
68-
COPY --from=code_installer --chown=33333:33333 /vscode-reh-linux-x64/ /ide/
69+
COPY --from=code_builder --chown=33333:33333 /vscode-web/ /ide/
70+
COPY --from=code_builder --chown=33333:33333 /vscode-reh-linux-x64/ /ide/
6971
COPY --chown=33333:33333 startup.sh supervisor-ide-config.json /ide/
7072

71-
COPY --from=code_installer --chown=33333:33333 /ide/bin /ide/bin/remote-cli
73+
COPY --from=code_builder --chown=33333:33333 /ide/bin /ide/bin/remote-cli
7274

7375
ENV GITPOD_ENV_APPEND_PATH /ide/bin/remote-cli:
7476

0 commit comments

Comments
 (0)