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

No access to NodeJS in jsii/superchain when overriding the default container image command #2734

Closed
1 of 5 tasks
jusiskin opened this issue Mar 22, 2021 · 6 comments · Fixed by #2736
Closed
1 of 5 tasks
Assignees
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@jusiskin
Copy link

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

  • JSII Version: latest jsii/superchain image (Image ID: 53fcfbbc6bda)
  • Platform: N/A

What is the problem?

In #2718, NVM was added instead of directly installing NodeJS 10.x in the jsii/superchain image. The default Docker CMD was changed to use a bash login shell:

CMD ["/bin/bash", "--login"]

This works when you use the container without specifying an override command. When a command is specified, for example:

docker run --rm -it jsii/superchain node

this code is bypassed and NodeJS is no longer available:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "node": executable file not found in $PATH: unknown.
@jusiskin jusiskin added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 22, 2021
@RomainMuller
Copy link
Contributor

I wonder if we can work around this by setting ENTRYPOINT instead of CMD?

@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 23, 2021

Otherwise we make NVM do symlink manipulation on disk (instead of changing environment variables in a sourced shell script).

That'd also be more robust.

@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 23, 2021

bash -c as entrypoint might also do it.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@udondan
Copy link
Contributor

udondan commented Mar 23, 2021

Thank you @RomainMuller 😸

@udondan
Copy link
Contributor

udondan commented Mar 23, 2021

Is this going to be pushed to docker hub immediately or scheduled tonight?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants