eclipse-theia / theia-ide

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
343 stars 129 forks source link

DockerHub image for Theia IDE #338

Closed dannaf closed 6 months ago

dannaf commented 7 months ago

Feature Description:

A DockerHub image of Theia IDE would be useful as an out-of-the-box usable browser IDE product.

(Discussed with @JonasHelming here: https://github.com/eclipse-theia/theia-website/pull/524#issuecomment-1984632458 (updated to exqct comment))

jfaltermeier commented 7 months ago

Thank you for opening this issue. I haven't had the chance to read the entire discussion yet, but I wanted to point out that we have a Theia IDE docker image available on the public GitHub registry, which you can find here: https://github.com/eclipse-theia/theia-blueprint/pkgs/container/theia-blueprint%2Ftheia-ide

JonasHelming commented 7 months ago

We should link this on a good position, I will get back to this

dannaf commented 7 months ago

Thanks @jfaltermeier for mentioning the GitHub registry docker image, I hadn't noticed that. I suggest that a good place to mention it, for starters, is at the very bottom of the README of Theia IDE, where it discusses building a docker image. At least a quick mention that for use it is not necessary to build because there already exists an image would be helpful. (This gets into the use vs. development conversation at https://github.com/eclipse-theia/theia-website/pull/524.)

madamedefarge commented 7 months ago

I have tried running the above linked Docker image on a macOS machine with an m2 chip and get the following message;-

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Is there a Docker image for macOS available?

madamedefarge commented 7 months ago

Thank you. Please can you tell me how I can either access a Docker image for macOS or build one myself?

I couldn't see a new Docker image. I have also tried using the build command;-

docker build -t theia-ide -f browser.Dockerfile .

but get an error message;-

49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-electron-app > wdio-chromedriver-service@6.0.4" has unmet peer dependency "chromedriver@*". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react@>=16.3.3". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react-dom@>=16.3.3". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/process > node-pty@0.11.0-beta17" has unmet peer dependency "node-gyp@^8.3.0". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0". 49.79 warning "workspace-aggregator-73098096-ef4a-467e-84ab-8b0c0f040053 > theia-ide-browser-app > @theia/getting-started > @theia/preview > markdown-it-anchor@5.0.2" has unmet peer dependency "markdown-it@^8.4.1". 60.50 [5/5] Building fresh packages... 60.89 error /home/theia/node_modules/puppeteer: Command failed. 60.89 Exit code: 1 60.89 Command: node install.js 60.89 Arguments: 60.89 Directory: /home/theia/node_modules/puppeteer 60.89 Output: 60.89 The chromium binary is not available for arm64. 60.89 If you are on Ubuntu, you can install with: 60.89 60.89 sudo apt install chromium 60.89 60.89 60.89 sudo apt install chromium-browser

I currently have an Eclipse RCP app based on Xtext and GEF/GMF and am considering migrating to LSP/GLSP. Currently facing a huge learning curve for Docker/Theia. To start with I want to run Theia as a browser app on my macBook and not use Electron Thank you.

marcdumais-work commented 7 months ago

Hi @madamedefarge ,

I do not have an Apple M2 chip to test this, but maybe something to try: https://stackoverflow.com/questions/76848446/running-docker-containers-on-mac-apple-silicon-m2-platform-compatibility-and-ex

madamedefarge commented 7 months ago

Hi @madamedefarge ,

I do not have an Apple M2 chip to test this, but maybe something to try: https://stackoverflow.com/questions/76848446/running-docker-containers-on-mac-apple-silicon-m2-platform-compatibility-and-ex

Thank you! I already have Rosetta installed so whilst that post didn't have the answer it gave me enough clues to work out how to get it working.

On macOS M1/M2 chips etc Docker needs to have the emulation platform specified. Thus the command to build the docker image is;-

docker build --platform linux/amd64 -t theia-ide -f browser.Dockerfile .

and the command to run is;-

docker run -p 3000:3000 --platform linux/amd64 --rm theia-ide

Just in case this helps anyone else. :-)

dannaf commented 7 months ago

@JonasHelming regarding where to document this:

We should link this on a good position, I will get back to this

I suggest at the end of the first paragraph in the README section titled What is this?, right after it says:

The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. The online test version is limited to 30 minutes per session and hosted via Theia.cloud.

Or/and at the bottom of the README, like I mentioned above https://github.com/eclipse-theia/theia-blueprint/issues/338#issuecomment-1991710503.

(There may be additional important locations, in the docs or elsewhere.)

JonasHelming commented 6 months ago

@dannaf : Yes, what we will do is:

  1. Link the published Docker container at the end of the readme, next to the instructions on how to create it.
  2. Link this section in the beginning of the readme and here under download

@jfaltermeier Will create the first, once this is done, I will create the other two links

JonasHelming commented 6 months ago

see https://github.com/eclipse-theia/theia-blueprint/pull/355

JonasHelming commented 6 months ago

See https://github.com/eclipse-theia/theia-website/pull/542

JonasHelming commented 6 months ago

Both PRs above are merged, I would close this issue now.

JonasHelming commented 6 months ago

I am closing this issue, as the Docker build is linked (in the docs, on the front page and in the readme). If you have remaining isues with runnin the Docker image, please open dedicated issues.