Running Theia as a binary

Today I’ve started a repo where I attempt to build Theia as a binary and build a Docker image with that binary. My main goal is to be able to ship a build of Theia in a Docker container that’s running a different Node version, or even a Docker container that does not ship Node at all.

In this repo I’ve created a simple demo app (browser only for now) and created scripts to build it using nexe and pkg.

There is a related issue on GitHub.

Currently I have not managed to create a working build yet, but it gives a starting point with some structure to try and get it running. I will update this thread as I make progress.

[original thread by beeman :honeybee:]

Thas’s very cool, thanks for looking into it :slight_smile:

[Josh Bradley]

I tried to get pkg to work. I had trouble figuring out what the proper pkg build configuration options are in order to work with the repo structure.

It does not make sense to apply in Theia repo, but on end user applications, then it should be just one package.json with listed extensions, not yarn workspace.

[Josh Bradley]

Sorry, I didn’t mean the main Theia repo. I was referring to a repo structure like one of the theia-apps. Ideally, there should be a one-line script in package.json that bundles everything up nicely.

[Josh Bradley]

@beeman @anton-kosyakov I left updates on the GH issue but over the last couple days, I’ve been able to develop rpm and deb packages of Theia. It’s not the compiled executable solution I originally imagined but this will make it easier for users to distribute their Theia build and achieves the same goal. I like this approach more because it preserves the nodejs folder structure and will not require the same type of fixes be applied to the codebase like nexe/pkg did.