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
Using workspace-base to create a custom gitpod env image #2576
Conversation
|
Able to run the project in the new custom workspace: Verifying that the workspace only has the tools installed through the custom @humphd Could you please take a look? |
.gitpod.Dockerfile
Outdated
| USER gitpod | ||
| RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - | ||
| RUN sudo apt-get install -y nodejs | ||
| RUN sudo npm install -g typescript yarn pnpm |
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'm not sure if we need typescript and yarn. The front-end installs typescript as one of its dependencies, and I think yarn has never been part of telescope (but I'd be happy if we started using it).
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 added yarn, as the readme.md in telescope/src/web/ mentions the use of yarn dev to run the development server. I'm not sure if we need typescript but I added these two while I was going through telescope after adding Node, Docker and pnpm, so I could definitely remove them if needed. Please let me know if they are not required for the environment.
d5396c7
to
8da5bf4
Compare
|
Installing Node through |
.gitpod.Dockerfile
Outdated
| && bash -c ". .nvm/nvm.sh \ | ||
| && nvm install $NODE_VERSION \ | ||
| && nvm alias default $NODE_VERSION \ | ||
| && npm install -g typescript yarn pnpm" |
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.
Why yarn?
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.
Also, why install TS globally? I think we install it as part of the web front-end, so this shouldn't be needed. Only pnpm is needed globally.
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 was just going off of yarn dev here: src/web/readme.md
Is it not needed?
.gitpod.Dockerfile
Outdated
| && bash -c ". .nvm/nvm.sh \ | ||
| && nvm install $NODE_VERSION \ | ||
| && nvm alias default $NODE_VERSION \ | ||
| && npm install -g typescript yarn pnpm" |
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.
Also, why install TS globally? I think we install it as part of the web front-end, so this shouldn't be needed. Only pnpm is needed globally.
8da5bf4
to
4310390
Compare
* Adding custom dockerfile to gitpod yml * Installing node through nvm instead of nodesource * Using LTS node from nvm and removing typescript * Removing yarn
4310390
to
ce15fc2
Compare
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 know very little about gitpod, so I can't comment on this deeply. But what I see looks good.
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.
LGTM. This saves us some time opening up a new workspace.




Issue This PR Addresses
Closes #2564
Type of Change
Description
As highlighted in #2564, a smaller, more optimized image for gitpod can be created rather than using the default
workspace-fullwhich contains a lot of tools that we are not using. So, I've added a custom.gitpod.Dockerfileusing thegitpod/workspace-baseimage.Changes
Installed the following on top of the
baseimage:Verified the installation by building and running the image locally:

Checklist