Skip to content
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

unable to build docker image in mac #2

Open
Jay-Bhatt98 opened this issue Jun 30, 2023 · 3 comments
Open

unable to build docker image in mac #2

Jay-Bhatt98 opened this issue Jun 30, 2023 · 3 comments

Comments

@Jay-Bhatt98
Copy link

hi @raonigabriel i want a docker image with theia ide with java and maven and i am trying to build with your dockerfile and package.json but somehow i am failing to create a build could you please help me regarding the steps or any update that i can add in my docker file so that it will create a build.

@raonigabriel
Copy link
Owner

raonigabriel commented Jun 30, 2023

One possible issue could be that the "latest.json" file is missing.
To build the project (I am using Linux, x64) it require some of the file from this repository: that means you need to checkout the whole thing.

Another possibility is that the docker build process knows which version of the node image to use as a base, so you need to pass the node version in a argument like so:

docker build . --build-arg NODE_VERSION=14-alpine -t your-cool-theia
See this for an explanation: https://blog.bitsrc.io/how-to-pass-environment-info-during-docker-builds-1f7c5566dd0e
Remarks: it needs to be a nodejs image that is based on Alpine. And it need to be node >= 14.

If that dont help, can provide more info? Like the error logs?

@Jay-Bhatt98
Copy link
Author

Jay-Bhatt98 commented Jun 30, 2023

this error i am getting
#0 484.1 at ChildProcess. (/home/theia/node_modules/@theia/application-manager/lib/application-process.js:66:28)
#0 484.1 at ChildProcess.emit (events.js:400:28)
#0 484.1 at maybeClose (internal/child_process.js:1088:16)
#0 484.1 at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
#0 484.5 error Command failed with exit code 1.
#0 484.5 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Dockerfile:9

8 |
9 | >>> RUN yarn --pure-lockfile &&
10 | >>> NODE_OPTIONS="--max_old_space_size=4096" yarn theia build &&
11 | >>> yarn theia download:plugins &&
12 | >>> yarn --production &&
13 | >>> yarn autoclean --init &&
14 | >>> echo *.ts >> .yarnclean &&
15 | >>> echo *.ts.map >> .yarnclean &&
16 | >>> echo .spec. >> .yarnclean &&
17 | >>> yarn autoclean --force &&
18 | >>> yarn cache clean
19 |

ERROR: failed to solve: process "/bin/sh -c yarn --pure-lockfile && NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && yarn theia download:plugins && yarn --production && yarn autoclean --init && echo *.ts >> .yarnclean && echo *.ts.map >> .yarnclean && echo .spec. >> .yarnclean && yarn autoclean --force && yarn cache clean" did not complete successfully: exit code: 1

@ikoyski
Copy link

ikoyski commented May 10, 2024

I also encountered similar error.. i am trying to change java version from 11 to 17. i simply changed 11 to 17 inside the Dockerfile. Please help. Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants