-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[code] support previous and current ubuntu LTS #3969
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,10 @@ | |
|
||
# we use latest major version of Node.js distributed VS Code. (see about dialog in your local VS Code) | ||
# ideallay we should use exact version, but it has criticla bugs in regards to grpc over http2 streams | ||
FROM node:12.21.0 AS node_installer | ||
ARG NODE_VERSION=12.21.0 | ||
|
||
|
||
FROM node:${NODE_VERSION} AS node_installer | ||
RUN mkdir -p /ide/node/bin \ | ||
/ide/node/include/node/ \ | ||
/ide/node/lib/node_modules/npm/ \ | ||
|
@@ -19,17 +22,26 @@ RUN mkdir -p /ide/node/bin \ | |
RUN cp /ide/node/bin/node /ide/node/bin/gitpod-node && rm /ide/node/bin/node | ||
|
||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12 as code_installer | ||
|
||
FROM ubuntu:18.04 as code_installer | ||
|
||
# see https://github.com/gitpod-io/vscode/blob/bdeca3f8709b70b339f41fc2a14e94f83d6475ac/.github/workflows/ci.yml#L130 | ||
RUN sudo apt-get update \ | ||
&& sudo apt-get -y install --no-install-recommends libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 \ | ||
RUN apt-get update \ | ||
# see https://github.com/microsoft/vscode/blob/42e271dd2e7c8f320f991034b62d4c703afb3e28/.github/workflows/ci.yml#L94 | ||
&& apt-get -y install --no-install-recommends libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 \ | ||
&& apt-get -y install --no-install-recommends git curl build-essential libssl-dev ca-certificates python \ | ||
# Clean up | ||
&& sudo apt-get autoremove -y \ | ||
&& sudo apt-get clean -y \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG NODE_VERSION | ||
ENV NVM_DIR /root/.nvm | ||
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | sh \ | ||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& npm install -g yarn node-gyp | ||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||
Comment on lines
+36
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: Why re-install Node.js via NVM here (with COPY --from=node_installer /ide/node /ide/node
ENV PATH="/ide/node/bin:$PATH" This is unimportant though, as this NVM/Node.js install doesn't seem to be captured in the final Since this works it's good as is. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just did not think about it |
||
|
||
ENV GP_CODE_COMMIT cbe1690286445dde2260d88e6de5bce1413465c6 | ||
RUN mkdir gp-code \ | ||
&& cd gp-code \ | ||
|
@@ -48,6 +60,7 @@ RUN chmod -R ugo+w /gitpod-pkg-server/extensions | |
COPY bin /ide/bin | ||
RUN chmod -R ugo+x /ide/bin | ||
|
||
|
||
FROM scratch | ||
# copy static web resources in first layer to serve from blobserve | ||
COPY --from=code_installer /gitpod-pkg-web/ /ide/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Why not
12.22.1
? https://nodejs.org/dist/latest-v12.x/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will bump it up with next vscode upgrade in May, ok?