-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
Che theia image may be optimized a little further
-
size of the image
- investigating a little, image contains big data of "electron" packages. For che usecase we shouldn't have electron as we're browser based.
- node_modules and /usr/local/share/.cache/yarn have pretty much the same size. We could drop the yarn cache (or keep only
@theia/pluginpackage inside) to divide the average size of the image by two
-
GITHUB_TOKEN
For now this parameter is mandatory. Not providing it through./build.sh --build-arg GITHUB_TOKEN=....is making the build always fail. It should be an optional parameter that should be mandatory only if we're forced to provide it because for example we share a network with other ppl making a lot of github requests.- token should be optional (if not provided, we shouldn't send an empty token inside theia)
- we could throw a nicely friendly error message if we know that build will fail due to rate limit.
curl https://api.github.com/rate_limitallow to get the current limit
-
Dockerfile commands
It was suggested that as we've a lot of commands in the Dockerfile, that we could move some parts of the command to scripts.
so Dockerfile could be shorter and we delegate some 'useful actions' to scripts.
for example : RUN fork-theia && compile-theia && update-extensions -
provided extensions
Today, the list of extensions is hardcoded in the Dockerfile like
git clone --depth=1 -b latest-deps https://github.com/eclipse/che-theia-hosted-plugin-manager-extension /tmp/hosted-plugin-extension && \
node ${HOME}/add-extensions.js \
@eclipse-che/che-theia-hosted-plugin-manager-extension:file:///tmp/hosted-plugin-extension \
#che-theia-ssh-extension:https://github.com/eclipse/che-theia-ssh-plugin.git \
it could me more maintainable if the list of extensions could be in a separated file (like yaml or json file) and then we only need to insert one extension in that file to have it included in the final docker image. Internal script being in charge of grabbing extension and installing it.
- Nightly image
There are images that are for current tags of Theia (like 0.3.10, 0.3.11, etc)
It would be nice to have a nightly image based on@nexttag of Theia. It could allow to test the latest theia and also check that extensions are not broken with that new version early.