workspace-images
workspace-images copied to clipboard
Refactor installation of Chrome on the VNC image
Description
I feel really unconveninent without it in full image. I checked the size, it's only around 130m increase. It should be in full in the long run. This will make frontend e2e testing like cypress and Puppeteer more out of the box. Also benefit for development like qt, jetbrains plugin development, gitbook generating.
context: https://github.com/gitpod-io/workspace-images/pull/471/
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Hi @gengjiawen, just curious, whats the usecase? Headless chrome? Puppeteer?
Another thing, we're also installing and configuring chrome on the tool-vnc
chunk. I think it would be beneficial to decouple it from there into tool-chrome
and add tool-chrome
as a chunk for the tool-vnc
combination. Would probably reduce the dazzle build time a lot.
Hi @gengjiawen, just curious, whats the usecase? Headless chrome? Puppeteer?
Mostly frontend e2e testing like cypress and Puppeteer. Recently wasm (wasm-bindgen pretty lame on testing). Another usecase is that ebook generating, in my case, gitbook.
Thanks for taking the step forward for the new change, but I think it's not exactly what I was talking about. Perhaps my message was a bit unclear, will try to collaborate with you on this one π
I think it would be beneficial to decouple it from there into
tool-chrome
and addtool-chrome
as a chunk for thetool-vnc
combination.
You mean this part ? I am not familiar with dazzle tbh. Feel free to push any changes you like.
ping @axonasif
Hey @gengjiawen, thanks a lot for your patience, could you please toggle on Allow edits from maintainers
on your PR right-side-bar? I want to push some commits into your branch.
Hey @gengjiawen, thanks a lot for your patience, could you please toggle on
Allow edits from maintainers
on your PR right-side-bar? I want to push some commits into your branch.
I already checked last week. Maybe something wrong on your side ?
Thank you for the contribution @gengjiawen! π
Could you share a bit more about why you think this should be included? π I'm concerned that the full image is already very big and that not a lot of users would actually use it.
Thank you for the contribution @gengjiawen! π
Could you share a bit more about why you think this should be included? π I'm concerned that the full image is already very big and that not a lot of users would actually use it.
I update pr description with more info.
Hey @gengjiawen, thanks a lot for your patience, could you please toggle on
Allow edits from maintainers
on your PR right-side-bar? I want to push some commits into your branch.I already checked last week. Maybe something wrong on your side ?
my https://gitpod.io/integrations > github was somehow reset, weird π commits are pushed now.
@axonasif CI passed. Can you merge this ? thx.
@gengjiawen as also mentioned previously by @kylos101 [1], we are not convinced that workspace-full should also contain chrome given it's size.
I think it's a balance, and it's worth it. With all due respect It's much more useful and make basic function out of the box.
It's just make gitpod more intuitive
.
And for size, in my humble experience, this is more deserve it in full than closure or nginx.
I understand your point of view. Currently we are very wary of increasing the size of the image and do so only if really needed as it negatively impacts workspace startup times for all, and we can't really remove langs/tools later as we risk breaking users' workspaces.
The image is already at 7.1GB, chrome would actually add 648MB to it. π₯

Hey @gengjiawen, since our workspace team suggests that we may not add chrome to the full image, you could utilize the dotfiles feature π
In your dotfiles install.sh
, you could have this (I basically copy pasted from the chrome dockerfile):
#!/usr/bin/env bash
(
cd /tmp && glink="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \
&& wget -q "$glink" \
&& sudo install-packages libasound2-dev libgtk-3-dev libnss3-dev \
fonts-noto fonts-noto-cjk ./"${glink##*/}" \
&& ln -srf /usr/bin/google-chrome /usr/bin/chromium \
&& t="$HOME/.config/google-chrome/First Run" && sudo -u gitpod mkdir -p "${t%/*}" && sudo -u gitpod touch "$t" \
&& t="/etc/opt/chrome/policies/managed/managed_policies.json" && mkdir -p "${t%/*}" && printf '{ "%s": %s }\n' DefaultBrowserSettingEnabled false > "$t"
) & disown
echo "export QTWEBENGINE_DISABLE_SANDBOX=1" >> $HOME/.bashrc
This will install chrome for each of your personal workspaces π
Or if you need an even more concrete solution, you can use image: gitpod/workspace-full-vnc:latest
on your .gitpod.yml
for appropriate projects.
For example, even our website project follows the same pattern:
https://github.com/gitpod-io/website/blob/main/.gitpod.Dockerfile
I understand your point of view. Currently we are very wary of increasing the size of the image and do so only if really needed as it negatively impacts workspace startup times for all, and we can't really remove langs/tools later as we risk breaking users' workspaces.
The image is already at 7.1GB, chrome would actually add 648MB to it. π₯
![]()
Thx for this detailed info, I take a bit of more into this, looks like chrome is only 300mb, the other 300m is mainly font (electron likely to use, this can keep only in vnc)
Is 300mb acceptable for full ?
@axonasif I removed chrome from full, I think it is still worth it in tool-vnc.
@axonasif Can you merge this ?
Changed the title to be more inline with what the code is now doing. Does it make sense to you?
Changed the title to be more inline with what the code is now doing. Does it make sense to you?
More like βRefactor install chrome on vncβ
hi @gengjiawen and thank you for this and all you past contributions! We just noticed that we don't have a singed CLA from you on file yet. Would you mind signing this CLA via this DocuSign form? If there are any questions, you can reach me via [email protected].
hi @gengjiawen and thank you for this and all you past contributions! We just noticed that we don't have a singed CLA from you on file yet. Would you mind signing this CLA via this DocuSign form? If there are any questions, you can reach me via [email protected].
done. But the process is so verbose. I hope you can adopt solution like facebook cla or google cla, which is clean and fast.
Can anyone merge this ? thx.
:wave: @gengjiawen @axonasif this should be live now :smile: